diff --git a/CHANGELOG/CHANGELOG-1.6.md b/CHANGELOG/CHANGELOG-1.6.md
index 7eccac9bd..a6e5d95b4 100644
--- a/CHANGELOG/CHANGELOG-1.6.md
+++ b/CHANGELOG/CHANGELOG-1.6.md
@@ -1,4 +1,37 @@
+
+
+## [v1.6.2](https://github.com/aws/aws-k8s-tester/releases/tag/v1.6.2) (2021-09)
+
+See [code changes](https://github.com/aws/aws-k8s-tester/compare/v1.6.1...v1.6.2).
+
+### `aws-k8s-tester`
+
+- Update `helm` and `kubernetes` dependency.
+ - https://github.com/kubernetes/kubernetes/releases/tag/v1.21.1
+ - https://github.com/helm/helm/releases/tag/v3.6.3
+ - https://github.com/aws/aws-k8s-tester/pull/240
+
+### `k8s-tester`
+
+- Update `helm` and `kubernetes` dependency.
+ - https://github.com/kubernetes/kubernetes/releases/tag/v1.21.1
+ - https://github.com/helm/helm/releases/tag/v3.6.3
+ - https://github.com/aws/aws-k8s-tester/pull/240
+- Add [`k8s-tester/aqua`](https://github.com/aws/aws-k8s-tester/tree/v1.6.2/k8s-tester/aqua).
+- Add [`k8s-tester/armory`](https://github.com/aws/aws-k8s-tester/tree/v1.6.2/k8s-tester/armory).
+- Add [`k8s-tester/cni`](https://github.com/aws/aws-k8s-tester/tree/v1.6.2/k8s-tester/cni).
+- Add [`k8s-tester/epsagon`](https://github.com/aws/aws-k8s-tester/tree/v1.6.2/k8s-tester/epsagon).
+- Add [`k8s-tester/kubecost`](https://github.com/aws/aws-k8s-tester/tree/v1.6.2/k8s-tester/kubecost).
+- Add [`k8s-tester/splunk`](https://github.com/aws/aws-k8s-tester/tree/v1.6.2/k8s-tester/splunk).
+- Add [`k8s-tester/sysdig`](https://github.com/aws/aws-k8s-tester/tree/v1.6.2/k8s-tester/sysdig).
+- Add [`k8s-tester/vault`](https://github.com/aws/aws-k8s-tester/tree/v1.6.2/k8s-tester/vault).
+- See https://github.com/aws/aws-k8s-tester/blob/v1.6.2/k8s-tester/README.md.
+
+### Go
+
+- Compile with [*Go 1.17.1*](https://golang.org/doc/devel/release.html#go1.17).
+
diff --git a/client/go.mod b/client/go.mod
index d3eb52b36..74c2c51a1 100644
--- a/client/go.mod
+++ b/client/go.mod
@@ -1,12 +1,13 @@
module github.com/aws/aws-k8s-tester/client
-go 1.16
+go 1.17
require (
github.com/aws/aws-k8s-tester/utils v0.0.0-00010101000000-000000000000
github.com/aws/aws-sdk-go v1.38.50
github.com/briandowns/spinner v1.13.0
- go.uber.org/zap v1.17.0
+ github.com/onsi/ginkgo v1.11.0
+ go.uber.org/zap v1.19.1
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c
k8s.io/api v0.21.1
k8s.io/apiextensions-apiserver v0.21.1
diff --git a/client/go.sum b/client/go.sum
index 3f20f00c9..cc3711ee1 100644
--- a/client/go.sum
+++ b/client/go.sum
@@ -69,6 +69,8 @@ github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN
github.com/aws/aws-sdk-go v1.38.50 h1:9+dEpZbgjBMeoOes6QfZMC87uDMwM8Lw4E79L0/rPZI=
github.com/aws/aws-sdk-go v1.38.50/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
+github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
+github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
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/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
@@ -131,6 +133,7 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv
github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
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/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
@@ -258,6 +261,7 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
+github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
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=
@@ -354,9 +358,11 @@ github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6
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=
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw=
github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
+github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME=
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis=
@@ -464,6 +470,7 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
go.etcd.io/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/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
@@ -481,6 +488,8 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.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/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4=
+go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
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.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
@@ -488,8 +497,8 @@ go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9i
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
-go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U=
-go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
+go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI=
+go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
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-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
@@ -532,6 +541,7 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -569,8 +579,9 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20210224082022-3d97a244fca7 h1:OgUuv8lsRpBibGNbSizVwKWlysjaNzmC9gYMhPVfqFM=
golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -588,6 +599,7 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -635,8 +647,10 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w
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-20210309074719-68d13333faf2 h1:46ULzRKLh1CwgRq2dC5SlBzEqqNCi8rreOZnNrbqcIY=
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE=
@@ -707,6 +721,7 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
+golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -804,6 +819,7 @@ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8X
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/cheggaaa/pb.v1 v1.0.25/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 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o=
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
@@ -812,6 +828,7 @@ gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
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=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
diff --git a/go.mod b/go.mod
index c1e40b752..02b3fbbe4 100644
--- a/go.mod
+++ b/go.mod
@@ -1,34 +1,6 @@
module github.com/aws/aws-k8s-tester
-go 1.16
-
-replace (
- github.com/Azure/go-autorest => github.com/Azure/go-autorest v12.2.0+incompatible
- github.com/containerd/containerd => github.com/containerd/containerd v1.3.4
- github.com/google/cadvisor => github.com/google/cadvisor v0.36.0
- k8s.io/api => k8s.io/api v0.18.9-rc.0
- k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.18.9-rc.0
- k8s.io/apimachinery => k8s.io/apimachinery v0.18.9-rc.0
- k8s.io/apiserver => k8s.io/apiserver v0.18.9-rc.0
- k8s.io/cli-runtime => k8s.io/cli-runtime v0.18.9-rc.0
- k8s.io/client-go => k8s.io/client-go v0.18.9-rc.0
- k8s.io/cloud-provider => k8s.io/cloud-provider v0.18.9-rc.0
- k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.18.9-rc.0
- k8s.io/code-generator => k8s.io/code-generator v0.18.9-rc.0
- k8s.io/component-base => k8s.io/component-base v0.18.9-rc.0
- k8s.io/cri-api => k8s.io/cri-api v0.18.9-rc.0
- k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.18.9-rc.0
- k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.18.9-rc.0
- k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.18.9-rc.0
- k8s.io/kube-proxy => k8s.io/kube-proxy v0.18.9-rc.0
- k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.18.9-rc.0
- k8s.io/kubectl => k8s.io/kubectl v0.18.9-rc.0
- k8s.io/kubelet => k8s.io/kubelet v0.18.9-rc.0
- k8s.io/kubernetes => k8s.io/kubernetes v1.18.9-rc.0
- k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.18.9-rc.0
- k8s.io/metrics => k8s.io/metrics v0.18.9-rc.0
- k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.18.9-rc.0
-)
+go 1.17
require (
github.com/aws/aws-sdk-go v1.35.30
@@ -52,45 +24,279 @@ require (
github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575
github.com/davecgh/go-spew v1.1.1
github.com/dustin/go-humanize v1.0.0
- github.com/fatih/color v1.9.0 // indirect
github.com/go-ini/ini v1.55.0
- github.com/gofrs/flock v0.7.1
+ github.com/gofrs/flock v0.8.0
github.com/google/go-cmp v0.5.4
- github.com/google/uuid v1.1.1
+ github.com/google/uuid v1.1.2
github.com/manifoldco/promptui v0.7.0
- github.com/mattn/go-runewidth v0.0.8 // indirect
github.com/mholt/archiver/v3 v3.3.0
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db
github.com/mitchellh/ioprogress v0.0.0-20180201004757-6a23b12fa88e
- github.com/olekukonko/tablewriter v0.0.2
+ github.com/olekukonko/tablewriter v0.0.4
github.com/onsi/ginkgo v1.11.0
github.com/onsi/gomega v1.7.1
- github.com/prometheus/client_golang v1.6.0
+ github.com/prometheus/client_golang v1.7.1
github.com/prometheus/client_model v0.2.0
- github.com/prometheus/common v0.9.1
- github.com/spf13/cobra v1.0.0
+ github.com/prometheus/common v0.10.0
+ github.com/spf13/cobra v1.1.3
github.com/spf13/pflag v1.0.5
- github.com/stretchr/testify v1.6.1
+ github.com/stretchr/testify v1.7.0
// etcd v3.4.9
- go.etcd.io/etcd v0.5.0-alpha.5.0.20200520232829-54ba9589114f
- go.uber.org/zap v1.16.0
- golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9
- golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
- golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6 // indirect
- golang.org/x/text v0.3.3 // indirect
- golang.org/x/time v0.0.0-20191024005414-555d28b269f0
- gopkg.in/ini.v1 v1.46.0 // indirect
- gopkg.in/yaml.v2 v2.2.8
- helm.sh/helm/v3 v3.2.4
- k8s.io/api v0.18.9-rc.0
- k8s.io/apiextensions-apiserver v0.18.9-rc.0
- k8s.io/apimachinery v0.18.9-rc.0
- k8s.io/cli-runtime v0.18.9-rc.0
- k8s.io/client-go v0.18.9-rc.0
+ go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489
+ go.uber.org/zap v1.19.1
+ golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83
+ golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
+ golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba
+ gopkg.in/yaml.v2 v2.4.0
+ helm.sh/helm/v3 v3.6.3
+ k8s.io/api v0.21.1
+ k8s.io/apiextensions-apiserver v0.21.1
+ k8s.io/apimachinery v0.21.1
+ k8s.io/cli-runtime v0.21.1
+ k8s.io/client-go v0.21.1
k8s.io/klog v1.0.0
- k8s.io/kubernetes v1.18.9-rc.0
+ k8s.io/kubernetes v1.21.1
k8s.io/perf-tests/clusterloader2 v0.0.0-20200615121956-f3cf096d4378
- k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89
- rsc.io/letsencrypt v0.0.3 // indirect
+ k8s.io/utils v0.0.0-20201110183641-67b214c5f920
sigs.k8s.io/yaml v1.2.0
)
+
+require (
+ cloud.google.com/go v0.54.0 // indirect
+ github.com/Azure/azure-sdk-for-go v43.0.0+incompatible // indirect
+ github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect
+ github.com/Azure/go-autorest v14.2.0+incompatible // indirect
+ github.com/Azure/go-autorest/autorest v0.11.12 // indirect
+ github.com/Azure/go-autorest/autorest/adal v0.9.5 // indirect
+ github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
+ github.com/Azure/go-autorest/autorest/mocks v0.4.1 // indirect
+ github.com/Azure/go-autorest/autorest/to v0.2.0 // indirect
+ github.com/Azure/go-autorest/autorest/validation v0.1.0 // indirect
+ github.com/Azure/go-autorest/logger v0.2.0 // indirect
+ github.com/Azure/go-autorest/tracing v0.6.0 // indirect
+ github.com/BurntSushi/toml v0.3.1 // indirect
+ github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20200415212048-7901bc822317 // indirect
+ github.com/JeffAshton/win_pdh v0.0.0-20161109143554-76bb4ee9f0ab // indirect
+ github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd // indirect
+ github.com/Masterminds/goutils v1.1.1 // indirect
+ github.com/Masterminds/semver/v3 v3.1.1 // indirect
+ github.com/Masterminds/sprig/v3 v3.2.2 // indirect
+ github.com/Masterminds/squirrel v1.5.0 // indirect
+ github.com/Microsoft/go-winio v0.4.16 // indirect
+ github.com/Microsoft/hcsshim v0.8.14 // indirect
+ github.com/NYTimes/gziphandler v1.1.1 // indirect
+ github.com/PuerkitoBio/purell v1.1.1 // indirect
+ github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
+ github.com/andybalholm/brotli v0.0.0-20190621154722-5f990b63d2d6 // indirect
+ github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e // indirect
+ github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 // indirect
+ github.com/aws/aws-sdk-go-v2/credentials v1.0.0 // indirect
+ github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.0 // indirect
+ github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.0.0 // indirect
+ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.2.0 // indirect
+ github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.0.0 // indirect
+ github.com/beorn7/perks v1.0.1 // indirect
+ github.com/blang/semver v3.5.1+incompatible // indirect
+ github.com/cespare/xxhash/v2 v2.1.1 // indirect
+ github.com/checkpoint-restore/go-criu v0.0.0-20190109184317-bdb7599cd87b // indirect
+ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect
+ github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3 // indirect
+ github.com/clusterhq/flocker-go v0.0.0-20160920122132-2b8b7259d313 // indirect
+ github.com/container-storage-interface/spec v1.2.0 // indirect
+ github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59 // indirect
+ github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1 // indirect
+ github.com/containerd/containerd v1.4.4 // indirect
+ github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7 // indirect
+ github.com/containerd/ttrpc v0.0.0-20191028202541-4f1b8fe65a5c // indirect
+ github.com/containernetworking/cni v0.7.1 // indirect
+ github.com/coreos/go-semver v0.3.0 // indirect
+ github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e // indirect
+ github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect
+ github.com/cyphar/filepath-securejoin v0.2.2 // indirect
+ github.com/deislabs/oras v0.11.1 // indirect
+ github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect
+ github.com/docker/cli v20.10.5+incompatible // indirect
+ github.com/docker/distribution v2.7.1+incompatible // indirect
+ github.com/docker/docker v17.12.0-ce-rc1.0.20200618181300-9dc6525e6118+incompatible // indirect
+ github.com/docker/docker-credential-helpers v0.6.3 // indirect
+ github.com/docker/go-connections v0.4.0 // indirect
+ github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916 // indirect
+ github.com/docker/go-units v0.4.0 // indirect
+ github.com/dsnet/compress v0.0.1 // indirect
+ github.com/emicklei/go-restful v2.9.5+incompatible // indirect
+ github.com/euank/go-kmsg-parser v2.0.0+incompatible // indirect
+ github.com/evanphx/json-patch v4.9.0+incompatible // indirect
+ github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect
+ github.com/fatih/color v1.7.0 // indirect
+ github.com/form3tech-oss/jwt-go v3.2.2+incompatible // indirect
+ github.com/fsnotify/fsnotify v1.4.9 // indirect
+ github.com/go-errors/errors v1.0.1 // indirect
+ github.com/go-logr/logr v0.4.0 // indirect
+ github.com/go-openapi/jsonpointer v0.19.3 // indirect
+ github.com/go-openapi/jsonreference v0.19.3 // indirect
+ github.com/go-openapi/spec v0.19.5 // indirect
+ github.com/go-openapi/swag v0.19.5 // indirect
+ github.com/go-ozzo/ozzo-validation v3.5.0+incompatible // indirect
+ github.com/gobwas/glob v0.2.3 // indirect
+ github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e // indirect
+ github.com/gogo/protobuf v1.3.2 // indirect
+ github.com/golang/gddo v0.0.0-20190419222130-af0f2af80721 // indirect
+ github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
+ github.com/golang/mock v1.4.4 // indirect
+ github.com/golang/protobuf v1.4.3 // indirect
+ github.com/golang/snappy v0.0.1 // indirect
+ github.com/google/btree v1.0.0 // indirect
+ github.com/google/cadvisor v0.35.0 // indirect
+ github.com/google/gofuzz v1.1.0 // indirect
+ github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
+ github.com/googleapis/gax-go/v2 v2.0.5 // indirect
+ github.com/googleapis/gnostic v0.4.1 // indirect
+ github.com/gophercloud/gophercloud v0.1.0 // indirect
+ github.com/gorilla/mux v1.7.3 // indirect
+ github.com/gosuri/uitable v0.0.4 // indirect
+ github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 // indirect
+ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
+ github.com/hashicorp/golang-lru v0.5.3 // indirect
+ github.com/heketi/heketi v9.0.1-0.20190917153846-c2e2a4ab7ab9+incompatible // indirect
+ github.com/hpcloud/tail v1.0.0 // indirect
+ github.com/huandu/xstrings v1.3.1 // indirect
+ github.com/imdario/mergo v0.3.11 // indirect
+ github.com/inconshreveable/mousetrap v1.0.0 // indirect
+ github.com/jmespath/go-jmespath v0.4.0 // indirect
+ github.com/jmoiron/sqlx v1.3.1 // indirect
+ github.com/json-iterator/go v1.1.10 // indirect
+ github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a // indirect
+ github.com/karrick/godirwalk v1.7.5 // indirect
+ github.com/klauspost/compress v1.9.2 // indirect
+ github.com/klauspost/pgzip v1.2.1 // indirect
+ github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
+ github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
+ github.com/lib/pq v1.10.0 // indirect
+ github.com/libopenstorage/openstorage v1.0.0 // indirect
+ github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
+ github.com/lithammer/dedent v1.1.0 // indirect
+ github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a // indirect
+ github.com/mailru/easyjson v0.7.0 // indirect
+ github.com/mattn/go-colorable v0.1.2 // indirect
+ github.com/mattn/go-isatty v0.0.9 // indirect
+ github.com/mattn/go-runewidth v0.0.7 // indirect
+ github.com/mattn/go-shellwords v1.0.11 // indirect
+ github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
+ github.com/miekg/dns v1.1.4 // indirect
+ github.com/mindprince/gonvml v0.0.0-20190828220739-9ebdce4bb989 // indirect
+ github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible // indirect
+ github.com/mitchellh/copystructure v1.1.1 // indirect
+ github.com/mitchellh/go-wordwrap v1.0.0 // indirect
+ github.com/mitchellh/mapstructure v1.1.2 // indirect
+ github.com/mitchellh/reflectwalk v1.0.1 // indirect
+ github.com/moby/spdystream v0.2.0 // indirect
+ github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 // indirect
+ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
+ github.com/modern-go/reflect2 v1.0.1 // indirect
+ github.com/mohae/deepcopy v0.0.0-20170603005431-491d3605edfb // indirect
+ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
+ github.com/morikuni/aec v1.0.0 // indirect
+ github.com/mrunalp/fileutils v0.0.0-20171103030105-7d4729fb3618 // indirect
+ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
+ github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
+ github.com/nwaples/rardecode v1.0.0 // indirect
+ github.com/opencontainers/go-digest v1.0.0 // indirect
+ github.com/opencontainers/image-spec v1.0.1 // indirect
+ github.com/opencontainers/runc v1.0.0-rc10 // indirect
+ github.com/opencontainers/runtime-spec v1.0.2 // indirect
+ github.com/opencontainers/selinux v1.3.3 // indirect
+ github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
+ github.com/pierrec/lz4 v2.0.5+incompatible // indirect
+ github.com/pkg/errors v0.9.1 // indirect
+ github.com/pmezard/go-difflib v1.0.0 // indirect
+ github.com/prometheus/procfs v0.2.0 // indirect
+ github.com/quobyte/api v0.1.2 // indirect
+ github.com/rubenv/sql-migrate v0.0.0-20200616145509-8d140a17f351 // indirect
+ github.com/rubiojr/go-vhd v0.0.0-20200706105327-02e210299021 // indirect
+ github.com/russross/blackfriday v1.5.2 // indirect
+ github.com/satori/go.uuid v1.2.0 // indirect
+ github.com/seccomp/libseccomp-golang v0.9.1 // indirect
+ github.com/shopspring/decimal v1.2.0 // indirect
+ github.com/sirupsen/logrus v1.8.1 // indirect
+ github.com/spf13/afero v1.2.2 // indirect
+ github.com/spf13/cast v1.3.1 // indirect
+ github.com/storageos/go-api v0.0.0-20180912212459-343b3eff91fc // indirect
+ github.com/stretchr/objx v0.2.0 // indirect
+ github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2 // indirect
+ github.com/thecodeteam/goscaleio v0.1.0 // indirect
+ github.com/ulikunitz/xz v0.5.6 // indirect
+ github.com/vishvananda/netlink v1.0.0 // indirect
+ github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df // indirect
+ github.com/vmware/govmomi v0.20.3 // indirect
+ github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
+ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
+ github.com/xeipuuv/gojsonschema v1.2.0 // indirect
+ github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
+ github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca // indirect
+ go.opencensus.io v0.22.3 // indirect
+ go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect
+ go.uber.org/atomic v1.7.0 // indirect
+ go.uber.org/multierr v1.6.0 // indirect
+ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 // indirect
+ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
+ golang.org/x/sys v0.0.0-20210510120138-977fb7262007 // indirect
+ golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect
+ golang.org/x/text v0.3.4 // indirect
+ google.golang.org/api v0.20.0 // indirect
+ google.golang.org/appengine v1.6.5 // indirect
+ google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a // indirect
+ google.golang.org/grpc v1.27.1 // indirect
+ google.golang.org/protobuf v1.25.0 // indirect
+ gopkg.in/fsnotify.v1 v1.4.7 // indirect
+ gopkg.in/gcfg.v1 v1.2.3 // indirect
+ gopkg.in/gorp.v1 v1.7.2 // indirect
+ gopkg.in/inf.v0 v0.9.1 // indirect
+ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
+ gopkg.in/warnings.v0 v0.1.2 // indirect
+ gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
+ k8s.io/apiserver v0.21.1 // indirect
+ k8s.io/cloud-provider v0.21.1 // indirect
+ k8s.io/component-base v0.21.1 // indirect
+ k8s.io/cri-api v0.0.0 // indirect
+ k8s.io/csi-translation-lib v0.21.1 // indirect
+ k8s.io/klog/v2 v2.8.0 // indirect
+ k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 // indirect
+ k8s.io/kube-proxy v0.0.0 // indirect
+ k8s.io/kube-scheduler v0.0.0 // indirect
+ k8s.io/kubectl v0.21.0 // indirect
+ k8s.io/kubelet v0.0.0 // indirect
+ k8s.io/legacy-cloud-providers v0.0.0 // indirect
+ rsc.io/letsencrypt v0.0.3 // indirect
+ sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15 // indirect
+ sigs.k8s.io/kustomize/api v0.8.8 // indirect
+ sigs.k8s.io/kustomize/kyaml v0.10.17 // indirect
+ sigs.k8s.io/structured-merge-diff/v4 v4.1.0 // indirect
+)
+
+replace (
+ github.com/Azure/go-autorest => github.com/Azure/go-autorest v14.2.0+incompatible
+ github.com/containerd/containerd => github.com/containerd/containerd v1.3.4
+ github.com/google/cadvisor => github.com/google/cadvisor v0.36.0
+ k8s.io/api => k8s.io/api v0.21.1
+ k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.21.1
+ k8s.io/apimachinery => k8s.io/apimachinery v0.21.1
+ k8s.io/apiserver => k8s.io/apiserver v0.21.1
+ k8s.io/cli-runtime => k8s.io/cli-runtime v0.21.1
+ k8s.io/client-go => k8s.io/client-go v0.21.1
+ k8s.io/cloud-provider => k8s.io/cloud-provider v0.21.1
+ k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.21.1
+ k8s.io/code-generator => k8s.io/code-generator v0.21.1
+ k8s.io/component-base => k8s.io/component-base v0.21.1
+ k8s.io/cri-api => k8s.io/cri-api v0.21.1
+ k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.21.1
+ k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.21.1
+ k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.21.1
+ k8s.io/kube-proxy => k8s.io/kube-proxy v0.21.1
+ k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.21.1
+ k8s.io/kubectl => k8s.io/kubectl v0.21.1
+ k8s.io/kubelet => k8s.io/kubelet v0.21.1
+ k8s.io/kubernetes => k8s.io/kubernetes v1.18.9-rc.0
+ k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.21.1
+ k8s.io/metrics => k8s.io/metrics v0.21.1
+ k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.21.1
+)
diff --git a/go.sum b/go.sum
index 2a98ffd77..c0607c459 100644
--- a/go.sum
+++ b/go.sum
@@ -2,60 +2,95 @@ bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxo
bitbucket.org/bertimus9/systemstat v0.0.0-20180207000608-0eeff89b0690/go.mod h1:Ulb78X89vxKYgdL24HMTiXYHlyHEvruOj1ZPlqeNEZM=
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
-cloud.google.com/go v0.38.0 h1:ROfEUZz+Gh5pa62DJWXSaonyu3StP6EA6lPEXPI6mCo=
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
+cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU=
+cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=
+cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc=
+cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0=
+cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To=
+cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw=
+cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4=
+cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M=
+cloud.google.com/go v0.54.0 h1:3ithwDMr7/3vpAMXiH+ZQnYbuIsh+OPhUPMFC9enmn0=
+cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc=
+cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
+cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
+cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
+cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
+cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=
+cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk=
+cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
+cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=
+cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=
+cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
+cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=
+cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=
+dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
-github.com/Azure/azure-sdk-for-go v35.0.0+incompatible h1:PkmdmQUmeSdQQ5258f4SyCf2Zcz0w67qztEg37cOR7U=
github.com/Azure/azure-sdk-for-go v35.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
+github.com/Azure/azure-sdk-for-go v43.0.0+incompatible h1:/wSNCu0e6EsHFR4Qa3vBEBbicaprEHMyyga9g8RTULI=
+github.com/Azure/azure-sdk-for-go v43.0.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 v12.2.0+incompatible h1:2Fxszbg492oAJrcvJlgyVaTqnQYRkxmEK6VPCLLVpBI=
-github.com/Azure/go-autorest v12.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
-github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs=
+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/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU=
+github.com/Azure/go-autorest/autorest v0.11.12 h1:gI8ytXbxMfI+IVbI9mP2JGCTXIuhHLgRlvQ9X4PsnHE=
+github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw=
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/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.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA=
+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 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.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.2.0 h1:nQOZzFCudTh+TvquAtCRjM01VEYx85e9qbwt5ncW4L8=
github.com/Azure/go-autorest/autorest/to v0.2.0/go.mod h1:GunWKJp1AEqgMaGLV+iocmRAJWqST1wQYhyyjXJ3SJc=
github.com/Azure/go-autorest/autorest/validation v0.1.0 h1:ISSNzGUh+ZSzizJWOWzs8bwpXIePbGLW4z/AmUFGH5A=
github.com/Azure/go-autorest/autorest/validation v0.1.0/go.mod h1:Ha3z/SqBeaalWQvokg3NZAlQTalVMtOIAs1aGK7G6u8=
-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/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/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=
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
-github.com/DATA-DOG/go-sqlmock v1.4.1 h1:ThlnYciV1iM/V0OSF/dtkqWb6xo5qITT1TJBG1MRDJM=
-github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
-github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20190822182118-27a4ced34534 h1:N7lSsF+R7wSulUADi36SInSQA3RvfO/XclHQfedr0qk=
+github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60=
+github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20190822182118-27a4ced34534/go.mod h1:iroGtC8B3tQiqtds1l+mgk/BBOrxbqjH+eUfFQYRc14=
+github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20200415212048-7901bc822317 h1:JhyuWIqYrstW7KHMjk/fTqU0xtMpBOHuiTA2FVc7L4E=
+github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20200415212048-7901bc822317/go.mod h1:DF8FZRxMHMGv/vP2lQP6h+dYzzjpuRn24VeRiYn3qjQ=
github.com/JeffAshton/win_pdh v0.0.0-20161109143554-76bb4ee9f0ab h1:UKkYhof1njT1/xq4SEg5z+VpTgjmNeHwPGRQl7takDI=
github.com/JeffAshton/win_pdh v0.0.0-20161109143554-76bb4ee9f0ab/go.mod h1:3VYc5hodBMJ5+l/7J4xAyMeuM2PNuepvHlGs8yilUCA=
+github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd h1:sjQovDkwrZp8u+gxLtPgKGjk5hCxuy2hrRejBTA9xFU=
github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E=
-github.com/Masterminds/goutils v1.1.0 h1:zukEsf/1JZwCMgHiK3GZftabmxiCw4apj3a28RPBiVg=
-github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=
-github.com/Masterminds/semver/v3 v3.1.0 h1:Y2lUDsFKVRSYGojLJ1yLxSXdMmMYTYls0rCvoqmMUQk=
-github.com/Masterminds/semver/v3 v3.1.0/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
-github.com/Masterminds/sprig/v3 v3.1.0 h1:j7GpgZ7PdFqNsmncycTHsLmVPf5/3wJtlgW9TNDYD9Y=
-github.com/Masterminds/sprig/v3 v3.1.0/go.mod h1:ONGMf7UfYGAbMXCZmQLy8x3lCDIPrEZE/rU8pmrbihA=
-github.com/Masterminds/squirrel v1.2.0 h1:K1NhbTO21BWG47IVR0OnIZuE0LZcXAYqywrC3Ko53KI=
-github.com/Masterminds/squirrel v1.2.0/go.mod h1:yaPeOnPG5ZRwL9oKdTsO/prlkPbXWZlRVMQ/gGlzIuA=
+github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI=
+github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=
+github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc=
+github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
+github.com/Masterminds/sprig/v3 v3.2.2 h1:17jRggJu518dr3QaafizSXOjKYp94wKfABxUmyxvxX8=
+github.com/Masterminds/sprig/v3 v3.2.2/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk=
+github.com/Masterminds/squirrel v1.5.0 h1:JukIZisrUXadA9pl3rMkjhiamxiB0cXiu+HGp/Y8cY8=
+github.com/Masterminds/squirrel v1.5.0/go.mod h1:NNaOrjSoIDfDA40n7sr2tPNZRfjzjA400rg+riTZj10=
github.com/Masterminds/vcs v1.13.1/go.mod h1:N09YCmOQr6RLxC6UNHzuVwAdodYbbnycGHSmwVJjcKA=
github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA=
-github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5 h1:ygIc8M6trr62pF5DucadTWGdEB4mEyvzi0e2nbcmcyA=
github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw=
+github.com/Microsoft/go-winio v0.4.16-0.20201130162521-d1ffc52c7331/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0=
+github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk=
+github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0=
github.com/Microsoft/hcsshim v0.0.0-20190417211021-672e52e9209d/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg=
-github.com/Microsoft/hcsshim v0.8.7 h1:ptnOoufxGSzauVTsdE+wMYnCWA301PdoN4xg5oRdZpg=
github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ=
-github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46 h1:lsxEuwrXEAokXB9qhlbKWPpo3KMLZQ5WB5WLQRW1uq0=
+github.com/Microsoft/hcsshim v0.8.14 h1:lbPVK25c1cu5xTLITwpUcxoA9vKrKErASPYygvouJns=
+github.com/Microsoft/hcsshim v0.8.14/go.mod h1:NtVKoYxQuTLx6gEq0L96c9Ju4JbRJ4nY2ow3VK6a9Lg=
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=
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/OpenPeeDeeP/depguard v1.0.0/go.mod h1:7/4sitnI9YlQgTLLk734QlzXT8DuHVnAyztLplQjk+o=
@@ -74,9 +109,12 @@ github.com/SeanDolphin/bqschema v0.0.0-20150424181127-f92a08f515e1/go.mod h1:TYI
github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d h1:UrqY+r/OJnIp5u0s1SbQ8dVfLCZJsnvazdBP5hS4iRs=
github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ=
github.com/Shopify/sarama v1.8.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
+github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
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/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g=
github.com/abbot/go-http-auth v0.0.0-20140618235127-c0ef4539dfab/go.mod h1:Cz6ARTIzApMJDzh5bRMSUou6UMSp0IEXg9km/ci7TJM=
+github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c=
github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM=
github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
@@ -87,21 +125,29 @@ github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo
github.com/andybalholm/brotli v0.0.0-20190621154722-5f990b63d2d6 h1:bZ28Hqta7TFAK3Q08CMvv8y3/8ATaEqv2nGoc6yff6c=
github.com/andybalholm/brotli v0.0.0-20190621154722-5f990b63d2d6/go.mod h1:+lx6/Aqd1kLJ1GQfkvOnaZ1WGmLpMpbprPuIOOZX30U=
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c=
+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/armon/circbuf v0.0.0-20150827004946-bbbad097214e h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA=
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
+github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
+github.com/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 h1:zV3ejI06GQ59hwDQAvmK1qxOQGB3WuVTRoY0okPTAv0=
-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 h1:4daAzAu0S6Vi7/lbWECcX0j45yZReDZ56BQsrVBOEEY=
+github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg=
github.com/auth0/go-jwt-middleware v0.0.0-20170425171159-5493cabe49f7 h1:irR1cO6eek3n5uquIVaRAsQmZnlsfPuHNz31cXo4eyk=
github.com/auth0/go-jwt-middleware v0.0.0-20170425171159-5493cabe49f7/go.mod h1:LWMyo4iOLWXHGdBki7NIht1kHru/0wM179h+d3g8ATM=
+github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU=
github.com/aws/aws-sdk-go v1.6.10/go.mod h1:ZRmQr0FajVIyZ4ZzBYKG5P3ZqPz9IHG41ZoMu1ADI3k=
github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0=
+github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/aws/aws-sdk-go v1.28.2/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
+github.com/aws/aws-sdk-go v1.35.24/go.mod h1:tlPOdRjfxPBpNIwqDj61rmsnA85v9jc0Ps9+muhnW+k=
github.com/aws/aws-sdk-go v1.35.30 h1:ZT+70Tw1ar5U2bL81ZyIvcLorxlD1UoxoIgjsEkismY=
github.com/aws/aws-sdk-go v1.35.30/go.mod h1:tlPOdRjfxPBpNIwqDj61rmsnA85v9jc0Ps9+muhnW+k=
+github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
github.com/aws/aws-sdk-go-v2 v1.0.0/go.mod h1:smfAbmpW+tcRVuNUjo3MOArSZmW72t62rkCzc2i0TWM=
github.com/aws/aws-sdk-go-v2 v1.7.0 h1:UYGnoIPIzed+ycmgw8Snb/0HK+KlMD+SndLTneG8ncE=
github.com/aws/aws-sdk-go-v2 v1.7.0/go.mod h1:tb9wi5s61kTDA5qCkcDbt3KRVV74GGslQkl/DRdX/P4=
@@ -152,6 +198,8 @@ github.com/bazelbuild/bazel-gazelle v0.19.1-0.20191105222053-70208cbdc798/go.mod
github.com/bazelbuild/buildtools v0.0.0-20190731111112-f720930ceb60/go.mod h1:5JP0TXzWDHXv8qvxRC4InIazwdyDseBDbzESUMKk1yU=
github.com/bazelbuild/buildtools v0.0.0-20190917191645-69366ca98f89/go.mod h1:5JP0TXzWDHXv8qvxRC4InIazwdyDseBDbzESUMKk1yU=
github.com/bazelbuild/rules_go v0.0.0-20190719190356-6dae44dc5cab/go.mod h1:MC23Dc/wkXEyk3Wpq6lCqz0ZAYOZDw2DR5y3N1q2i7M=
+github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
+github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/beorn7/perks v0.0.0-20150223135152-b965b613227f/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
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=
@@ -161,9 +209,11 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
github.com/bifurcation/mint v0.0.0-20180715133206-93c51c6ce115/go.mod h1:zVt7zX3K/aDCk9Tj+VM7YymsX66ERvzCJzw8rFCX2JU=
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 h1:CGxCgetQ64DKk7rdZ++Vfnb1+ogGNnB17OJKJXD2Cfs=
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=
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4=
github.com/boltdb/bolt v1.3.1 h1:JQmyP4ZBrce+ZQu0dY660FMfatumYDLun9hBCUVIkF4=
github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps=
@@ -179,7 +229,9 @@ github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0Bsq
github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0 h1:nvj0OLI3YqYXer/kZD8Ri1aaunCxIEsOst1BVJswV0o=
github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE=
github.com/caddyserver/caddy v1.0.3/go.mod h1:G+ouvOY32gENkJC+jhgl62TyhvqEsFaDiZ4uw0RzP1E=
+github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ=
github.com/cenkalti/backoff v2.1.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
+github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cespare/prettybench v0.0.0-20150116022406-03b8cfe5406c/go.mod h1:Xe6ZsFhtM8HrDku0pxJ3/Lr51rwykrzgFwpmTzleatY=
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
@@ -200,27 +252,32 @@ github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMn
github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 h1:kHaBemcxl8o/pQ5VM1c8PVE1PubbNx3mjUr09OqWGCs=
github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575/go.mod h1:9d6lWj8KzO/fd/NrVaLscBKmPigpZpn5YawRPw+e3Yo=
github.com/cilium/ebpf v0.0.0-20191025125908-95b36a581eed/go.mod h1:MA5e5Lr8slmEg9bt0VpxxWqJlO4iwu3FBdHUzV7wQVg=
-github.com/cilium/ebpf v0.0.0-20191113100448-d9fb101ca1fb h1:bQ0NJ9dAB8vsw7ffajBDX/7Wr64BdLWeJkYY36UkeRY=
github.com/cilium/ebpf v0.0.0-20191113100448-d9fb101ca1fb/go.mod h1:MA5e5Lr8slmEg9bt0VpxxWqJlO4iwu3FBdHUzV7wQVg=
+github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3 h1:i8+1fuPLjSgAYXUyBlHNhFwjcfAsP4ufiuH1+PWkyDU=
+github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3/go.mod h1:MA5e5Lr8slmEg9bt0VpxxWqJlO4iwu3FBdHUzV7wQVg=
+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/clusterhq/flocker-go v0.0.0-20160920122132-2b8b7259d313 h1:eIHD9GNM3Hp7kcRW5mvcz7WTR3ETeoYYKwpgA04kaXE=
github.com/clusterhq/flocker-go v0.0.0-20160920122132-2b8b7259d313/go.mod h1:P1wt9Z3DP8O6W3rvwCt0REIlshg1InHImaLW0t3ObY0=
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa h1:OaNxuTZr7kxeODyLWsRMC+OD03aFUH+mW6r2d+MWa5Y=
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
+github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=
github.com/codegangsta/negroni v1.0.0/go.mod h1:v0y3T5G7Y1UlFfyxFn/QLRU4a2EuNau2iZY63YTKWo0=
github.com/container-storage-interface/spec v1.2.0 h1:bD9KIVgaVKKkQ/UbVUY9kCaH/CJbhNxe0eeB4JeJV2s=
github.com/container-storage-interface/spec v1.2.0/go.mod h1:6URME8mwIBbpVyZV93Ce5St17xBiQJQY67NDsuohiy4=
github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko=
-github.com/containerd/cgroups v0.0.0-20200108155730-918ed86e29cc h1:Euk3pMvf7cw8tKEi8ZlMHCrnd5iBlz8hWBUVNL44hmQ=
github.com/containerd/cgroups v0.0.0-20200108155730-918ed86e29cc/go.mod h1:6KyBUkSDshoWUZPkqlFXQzOMWNtlcJ1stduPAd2MRes=
+github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59 h1:qWj4qVYZ95vLWwqyNJCQg7rDsG5wPdze0UaPolH7DUk=
+github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59/go.mod h1:pA0z1pT8KYB3TCXK/ocprsh7MAkoW8bZVzPdih9snmM=
github.com/containerd/console v0.0.0-20170925154832-84eeaae905fa/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw=
github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1 h1:uict5mhHFTzKLUCufdSLym7z/J0CbBJT59lYbP9wtbg=
github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw=
github.com/containerd/containerd v1.3.4 h1:3o0smo5SKY7H6AJCmJhsnCjR2/V2T8VmiHt7seN2/kI=
github.com/containerd/containerd v1.3.4/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-20200107194136-26c1120b8d41 h1:kIFnQBO7rQ0XkMe6xEwbybYHBEaWmh/f++laI6Emt7M=
github.com/containerd/continuity v0.0.0-20200107194136-26c1120b8d41/go.mod h1:Dq467ZllaHgAtVp4p1xUQWBrFXR9s/wyoTpG8zOJGkY=
+github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7 h1:6ejg6Lkk8dskcM7wQ28gONkukbQkM4qpj4RnYbpFzrI=
+github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7/go.mod h1:kR3BEg7bDFaEddKm54WSmrol1fKWDU1nKYkgrcgZT7Y=
github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI=
github.com/containerd/fifo v0.0.0-20191213151349-ff969a566b00/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0=
github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0=
@@ -236,6 +293,7 @@ github.com/containernetworking/cni v0.7.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ
github.com/coredns/corefile-migration v1.0.6/go.mod h1:OFwBp/Wc9dJt5cAZzHWMNhK1r5L0p0jDwIBc6j8NC8E=
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
+github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk=
github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc=
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
@@ -246,6 +304,7 @@ github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8=
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/go-systemd/v22 v22.0.0-20191111152658-2d78030078ef/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk=
+github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk=
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=
@@ -254,6 +313,9 @@ github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwc
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-0.20170720062807-ae69057f2299/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4=
github.com/cyphar/filepath-securejoin v0.2.2 h1:jCwT2GTP+PY5nBz3c/YL5PAIbusElVrPujOBSCj8xRg=
github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4=
@@ -261,8 +323,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
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/daviddengcn/go-colortext v0.0.0-20160507010035-511bcaf42ccd/go.mod h1:dv4zxwHi5C/8AeI+4gX4dCWOIvNi7I6JCSX0HvlKPgE=
-github.com/deislabs/oras v0.8.1 h1:If674KraJVpujYR00rzdi0QAmW4BxzMJPVAZJKuhQ0c=
-github.com/deislabs/oras v0.8.1/go.mod h1:Mx0rMSbBNaNfY9hjpccEnxkOqJL6KGjtxNHPLC4G4As=
+github.com/deislabs/oras v0.11.1 h1:oo2J/3vXdcti8cjFi8ghMOkx0OacONxHC8dhJ17NdJ0=
+github.com/deislabs/oras v0.11.1/go.mod h1:39lCtf8Q6WDC7ul9cnyWXONNzKvabEKk+AX+L0ImnQk=
github.com/denisenkom/go-mssqldb v0.0.0-20191001013358-cfbb681360f0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
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=
@@ -271,15 +333,15 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
github.com/dnaeon/go-vcr v1.0.1 h1:r8L/HqC0Hje5AXMu1ooW8oyQyOFv4GxqpL0nRP7SLLY=
github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E=
-github.com/docker/cli v0.0.0-20200130152716-5d0cf8839492 h1:FwssHbCDJD025h+BchanCwE1Q8fyMgqDr2mOQAWOLGw=
-github.com/docker/cli v0.0.0-20200130152716-5d0cf8839492/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
+github.com/docker/cli v20.10.5+incompatible h1:bjflayQbWg+xOkF2WPEAOi4Y7zWhR7ptoPhV/VqLVDE=
+github.com/docker/cli v20.10.5+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
github.com/docker/distribution v0.0.0-20191216044856-a8371794149d/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY=
github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug=
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
-github.com/docker/docker v1.4.2-0.20200203170920-46ec8731fbce h1:KXS1Jg+ddGcWA8e1N7cupxaHHZhit5rB9tfDU+mfjyY=
-github.com/docker/docker v1.4.2-0.20200203170920-46ec8731fbce/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
+github.com/docker/docker v17.12.0-ce-rc1.0.20200618181300-9dc6525e6118+incompatible h1:iWPIG7pWIsCwT6ZtHnTUpoVMnete7O/pzd9HFE3+tn8=
+github.com/docker/docker v17.12.0-ce-rc1.0.20200618181300-9dc6525e6118+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/docker-credential-helpers v0.6.3 h1:zI2p9+1NQYdnG6sMU26EX4aVGlqbInSQxQXLvzJ4RPQ=
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=
@@ -293,8 +355,7 @@ github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw
github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1 h1:ZClxb8laGDf5arXfYcAtECDFgAgHklGI8CxgjHnXKJ4=
github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE=
-github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96 h1:cenwrSVm+Z7QLSV/BsnenAOcDXdX4cMv4wP0B/5QbPg=
-github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM=
+github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
github.com/dsnet/compress v0.0.1 h1:PlZu0n3Tuv04TzpfPbrnI0HW/YwodEXDS+oPKahKF0Q=
github.com/dsnet/compress v0.0.1/go.mod h1:Aw8dCMJ7RioblQeTqt88akK31OvO8Dhf5JflhBbQEHo=
github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdfkVLjJ8T6VcRQv3SXugXy999NBtR9aFY=
@@ -302,34 +363,44 @@ github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:Htrtb
github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/eapache/go-resiliency v1.0.1-0.20160104191539-b86b1ec0dd42/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
+github.com/eapache/go-resiliency v1.1.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.0.2/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
+github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
+github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153 h1:yUdfgN0XgIJw7foRItutHYUIhlcKzcSf5vDpdhQAKTc=
github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
github.com/emicklei/go-restful v2.9.5+incompatible h1:spTtZBk5DYEvbxMVutUuTyh1Ao2r4iyvLdACqsl/Ljk=
github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
+github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/euank/go-kmsg-parser v2.0.0+incompatible h1:cHD53+PLQuuQyLZeriD1V/esuG4MuU0Pjs5y6iknohY=
github.com/euank/go-kmsg-parser v2.0.0+incompatible/go.mod h1:MhmAMZ8V4CYH4ybgdRwPr2TU5ThnS43puaKEMpja1uw=
github.com/evanphx/json-patch v0.0.0-20200808040245-162e5629780b/go.mod h1:NAJj0yf/KaRKURN6nyi7A9IZydMivZEm9oQLWNjfKDc=
-github.com/evanphx/json-patch v4.5.0+incompatible h1:ouOWdg56aJriqS0huScTkVXPC5IcNrDCXZ6OoTAWu7M=
github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
+github.com/evanphx/json-patch v4.9.0+incompatible h1:kLcOMZeuLAJvL2BPWLMIj5oaZQobrkAqrL+WFZwQses=
+github.com/evanphx/json-patch v4.9.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/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc=
github.com/fatih/color v1.6.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
+github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
-github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s=
-github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k=
-github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
+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/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/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/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0=
github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7 h1:LofdAjjjqCSXMwLGgOgnE+rdPuvX9DxCqaHwKy7i/ko=
github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY=
github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
-github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0=
github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q=
@@ -337,17 +408,26 @@ github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0
github.com/go-acme/lego v2.5.0+incompatible/go.mod h1:yzMNe9CasVUhkquNvti5nAtPmG94USbYxYrZfTkIn0M=
github.com/go-bindata/go-bindata v3.1.1+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-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w=
github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=
+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.9.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
github.com/go-ini/ini v1.55.0 h1:0wVcG9udk2C3TGgmdIGKK9ScOZHZB5nbG+gwji9fhhc=
github.com/go-ini/ini v1.55.0/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-lintpack/lintpack v0.5.2/go.mod h1:NwZuYi2nUHho8XEIZ6SIxihrnPoqBTDqfpXvXAN0sXM=
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
+github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas=
+github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=
+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-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=
@@ -381,12 +461,14 @@ github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nA
github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI=
github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI=
github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY=
-github.com/go-openapi/spec v0.19.3 h1:0XRyw8kguri6Yw4SxhsQA/atC88yqrk0+G4YhI2wabc=
github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo=
+github.com/go-openapi/spec v0.19.5 h1:Xm0Ao53uqnk9QE/LlYV5DEU09UAgpliA85QoT9LzqPw=
+github.com/go-openapi/spec v0.19.5/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk=
github.com/go-openapi/strfmt v0.17.0/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.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU=
+github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk=
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.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg=
@@ -396,11 +478,13 @@ github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh
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.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4=
+github.com/go-openapi/validate v0.19.8/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4=
github.com/go-ozzo/ozzo-validation v3.5.0+incompatible h1:sUy/in/P6askYr16XJgTKq/0SZhiWsdg4WZGaLsGQkM=
github.com/go-ozzo/ozzo-validation v3.5.0+incompatible/go.mod h1:gsEKFIVnabGBt6mXmxK0MoFy+cZoTJY6mu5Ll3LVLBU=
github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
-github.com/go-sql-driver/mysql v1.4.1 h1:g24URVg0OFbNUTx9qqY1IRZ9D9z3iPyi5zKhQZpNwpA=
github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
+github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs=
+github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4=
github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ=
@@ -418,6 +502,7 @@ github.com/go-toolsmith/typep v1.0.0/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2
github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI=
github.com/gobuffalo/envy v1.7.1 h1:OQl5ys5MBea7OGCdvPbBJWRgnhC/fGona6QKfvFeau8=
github.com/gobuffalo/envy v1.7.1/go.mod h1:FurDp9+EDPE4aIUS3ZLyD+7/9fpx7YRt/ukY6jIHf0w=
+github.com/gobuffalo/here v0.6.0/go.mod h1:wAG085dHOYqUpf+Ap+WOdrPTp5IYcDAs/x7PLa8Y5fM=
github.com/gobuffalo/logger v1.0.1 h1:ZEgyRGgAm4ZAhAO45YXMs5Fp+bzGLESFewzAVBMKuTg=
github.com/gobuffalo/logger v1.0.1/go.mod h1:2zbswyIUa45I+c+FLXuWl9zSWEiVuthsk8ze5s8JvPs=
github.com/gobuffalo/packd v0.3.0 h1:eMwymTkA1uXsqxS0Tpoop3Lc0u3kTfiMBE6nKtQU4g4=
@@ -430,14 +515,18 @@ github.com/godbus/dbus v0.0.0-20181101234600-2ff6f7ffd60f/go.mod h1:/YcGZj5zSblf
github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e h1:BWhy2j3IXJhjCbC68FptL43tDKIq8FladmaTs3Xs7Z8=
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.7.1 h1:DP+LD/t0njgoPBvT5MJLeliUIVQR03hiKR6vezdwHlc=
-github.com/gofrs/flock v0.7.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU=
+github.com/godror/godror v0.13.3/go.mod h1:2ouUT4kdhUBk7TAkHWD4SN0CdI0pgEQbo8FVHhbSKWg=
+github.com/gofrs/flock v0.8.0 h1:MSdYClljsF3PbENUUEx85nkWfJSGfzYI9yEBZOJz6CY=
+github.com/gofrs/flock v0.8.0/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU=
+github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s=
github.com/gogo/googleapis v1.3.1/go.mod h1:d+q1s/xVJxZGKWwC/6UfPIF33J+G1Tq4GYv9Y+Tg/EU=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
+github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
-github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls=
github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
+github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
+github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=
github.com/golang/gddo v0.0.0-20190419222130-af0f2af80721 h1:KRMr9A3qfbVM7iV/WcLY/rL5LICqwMHLhwRXKu99fXw=
@@ -447,24 +536,34 @@ github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfU
github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/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-20191227052852-215e87163ea7 h1:5ZkaAPbicIKTF2I64qf5Fh8Aa83Q/dnOafMYV0OMwjA=
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
+github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY=
+github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/mock v1.0.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
-github.com/golang/mock v1.3.1 h1:qGJ6qTW+x6xX/my+8YUVl4WNpX9B7+/l2tRsHGZ7f2s=
github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
+github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
+github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
+github.com/golang/mock v1.4.4 h1:l75CXGRSwbaYNpl/Z2X1XIIAMSCquvXgpVZDhwEIJsc=
+github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
+github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
-github.com/golang/protobuf v1.4.0 h1:oOuy+ugB+P/kBdUnG5QaMXSIyJ1q38wWSojYCb3z5VQ=
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
+github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
+github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
+github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM=
+github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/snappy v0.0.0-20150730031844-723cc1e459b8/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
+github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4=
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4=
@@ -484,8 +583,6 @@ github.com/golangci/misspell v0.0.0-20180809174111-950f5d19e770/go.mod h1:dEbvlS
github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21/go.mod h1:tf5+bzsHdTM0bsB7+8mt0GUMvjCgwLpTapNZHU8AajI=
github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0/go.mod h1:qOQCunEYvmd/TLamH+7LlVccLvUH5kZNhbCgTHoBbp4=
github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ=
-github.com/golangplus/bytes v0.0.0-20160111154220-45c989fe5450/go.mod h1:Bk6SMAONeMXrxql8uvOKuAZSu8aM5RUGv+1C6IJaEho=
-github.com/golangplus/fmt v0.0.0-20150411045040-2a5d6d7d2995/go.mod h1:lJgMEyOkYFkPcDKwRXegd+iM6E7matEszMG5HhwytU8=
github.com/golangplus/testing v0.0.0-20180327235837-af21d9c3145e/go.mod h1:0AA//k/eakGydO4jKRoRL2j92ZKSzTgj9tclaCrvXHk=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo=
@@ -497,6 +594,8 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M=
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ=
@@ -506,14 +605,24 @@ github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g=
github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
+github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
+github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
+github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
+github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
+github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4=
+github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ=
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
-github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
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/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=
+github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY=
-github.com/googleapis/gnostic v0.1.0 h1:rVsPeBmXbYv4If/cumu1AzZPwV58q433hvONV1UEZoI=
github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY=
+github.com/googleapis/gnostic v0.4.1 h1:DLJCy1n/vrD4HPjOvYcT8aYQXpPIzoRZONaYwyycI+I=
+github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg=
github.com/gophercloud/gophercloud v0.1.0 h1:P/nh25+rzXouhytV2pUHBb65fnds26Ghl8/391+sT5o=
github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
@@ -522,13 +631,15 @@ github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8
github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33 h1:893HsJqtxp9z1SF76gg6hY70hRY1wVlTSnC/h1yUDCo=
github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ=
+github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
github.com/gorilla/mux v1.7.0/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 h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw=
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 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q=
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/gosuri/uitable v0.0.4 h1:IG2xLKRvErL3uhY6e1BylFzG+aJiwQviDDTfOKeKTpY=
@@ -544,11 +655,24 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf
github.com/grpc-ecosystem/grpc-gateway v1.9.0/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/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q=
+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 v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
+github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
+github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
+github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I=
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
+github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU=
+github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=
github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=
+github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
+github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
+github.com/hashicorp/go-version v1.2.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=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
@@ -556,6 +680,10 @@ github.com/hashicorp/golang-lru v0.5.3 h1:YPkqC67at8FYaadspW/6uE0COsBxS2656RLEr8
github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
github.com/hashicorp/hcl v0.0.0-20180404174102-ef8a98b0bbce/go.mod h1:oZtUIOe8dh44I2q6ScRibXws4Ajl+d+nod3AaR9vL5w=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
+github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
+github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
+github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
+github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
github.com/heketi/heketi v9.0.1-0.20190917153846-c2e2a4ab7ab9+incompatible h1:ysqc8k973k1lLJ4BOOHAkx14K2nt4cLjsIm+hwWDZDE=
github.com/heketi/heketi v9.0.1-0.20190917153846-c2e2a4ab7ab9+incompatible/go.mod h1:bB9ly3RchcQqsQ9CpyaQwvva7RS5ytVoSoholZQON6o=
github.com/heketi/tests v0.0.0-20151005000721-f3775cbcefd6 h1:oJ/NLadJn5HoxvonA6VxG31lg0d6XOURNA09BTtM4fY=
@@ -564,11 +692,14 @@ github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/huandu/xstrings v1.3.1 h1:4jgBlKK6tLKFvO8u5pmYjG91cqytmDCDvGh7ECVFfFs=
github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
+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.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
-github.com/imdario/mergo v0.3.8 h1:CGgOkSJeqMRmt0D9XLWExdT4m4F1vd3FV3VPt+0VxkQ=
-github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
+github.com/imdario/mergo v0.3.11 h1:3tnifQM4i+fbajXKBHXWEH+KvNHqojZ778UH75j3bGA=
+github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
+github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo=
github.com/influxdb/influxdb v0.9.6-0.20151125225445-9eab56311373/go.mod h1:GpjLgHRqWhDGlPAg7+Rj6NAYuzPojBM8XLG5Ouvvq+Q=
github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU=
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
@@ -580,8 +711,8 @@ github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9Y
github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8=
github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
-github.com/jmoiron/sqlx v1.2.0 h1:41Ip0zITnmWNR/vHV+S4m+VoUivnWY5E4OJfLZjCJMA=
-github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks=
+github.com/jmoiron/sqlx v1.3.1 h1:aLN7YINNZ7cYOPK3QC83dbM6KT0NMqVMw961TqrejlE=
+github.com/jmoiron/sqlx v1.3.1/go.mod h1:2BljVx/86SuTyjE+aPYlHCTNvZrnJXghYGpNiXLBMCQ=
github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc=
github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg=
github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo=
@@ -589,9 +720,10 @@ github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
-github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns=
-github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
+github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68=
+github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
+github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a h1:FaWFmfWdAUKbSCtOU2QjDaorUexogfaMgbipgYATUMU=
@@ -603,6 +735,7 @@ github.com/karrick/godirwalk v1.7.5/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46s
github.com/kevinburke/go-bindata v3.17.0+incompatible/go.mod h1:/pEEZ72flUW2p0yi30bslSp9YqD9pysLxunQDdb2CPM=
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
+github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v0.0.0-20161130080628-0de1eaf82fa3/go.mod h1:jxZFDH7ILpTPQTk+E2s+z4CUas9lVNjIuKR4c5/zKgM=
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=
@@ -615,31 +748,33 @@ github.com/klauspost/crc32 v0.0.0-20151223135126-a3b15ae34567/go.mod h1:+ZoRqAPR
github.com/klauspost/pgzip v1.2.1 h1:oIPZROsWuPHpOdMVWLuJZXwgjhrW8r1yEX8UqMyeNHM=
github.com/klauspost/pgzip v1.2.1/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
-github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s=
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
+github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.0.0-20140723054909-088c856450c0/go.mod h1:Bvhd+E3laJ0AVkG0c9rmtZcnhV0HQ3+c3YxxqTvc/gA=
-github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
+github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
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.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
github.com/kr/text v0.0.0-20130911015532-6807e777504f/go.mod h1:sjUstKUATFIcff4qlB53Kml0wQPtJVc/3fWrmuUmcfA=
-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/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
+github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k=
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 h1:SOEGU9fKiNWd/HOJuq6+3iTQz8KNCLtVX6idSoTLdUw=
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0/go.mod h1:dXGbAdH5GtBTC4WfIxhKZfyBF/HBFgRZSWwZ9g/He9o=
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 h1:P6pPBnrTSX3DEVR4fDembhRWSsG5rVo6hYhAB/ADZrk=
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0/go.mod h1:vmVJ0l/dxyfGW6FmdpVm2joNMFikkuWg0EoCKLGUMNw=
-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/lib/pq v1.3.0 h1:/qkRGz8zljWiDcFvgpwUpwIAPu3r07TDvs3Rws+o/pU=
-github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
+github.com/lib/pq v1.10.0 h1:Zx5DJFEYQXio93kgXnQ09fXNiUKsqv4OUEu2UtGcB1E=
+github.com/lib/pq v1.10.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/libopenstorage/openstorage v1.0.0 h1:GLPam7/0mpdP8ZZtKjbfcXJBTIA/T1O6CBErVEFEyIM=
github.com/libopenstorage/openstorage v1.0.0/go.mod h1:Sp1sIObHjat1BeXhfMqLZ14wnOzEhNx2YQedreMcUyc=
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.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4=
github.com/lithammer/dedent v1.1.0 h1:VNzHMVCBNG1j0fh3OrsFRkVUwStdDArbgBWoPAffktY=
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=
@@ -651,6 +786,7 @@ github.com/lucas-clemente/quic-go v0.10.2/go.mod h1:hvaRS9IHjFLMq76puFJeWNfmn+H7
github.com/lucas-clemente/quic-go-certificates v0.0.0-20160823095156-d2f86524cced/go.mod h1:NCcRLrOTZbzhZvixZLlERbJtDtYsmMw8Jc4vS8Z0g58=
github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a h1:weJVJJRzAJBFRlAiJQROKQs8oC9vOxvm4rZmBBk0ONw=
github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI=
+github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ=
github.com/magiconair/properties v1.7.6/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
@@ -663,29 +799,29 @@ github.com/mailru/easyjson v0.7.0 h1:aizVhC/NAAcKWb+5QsU1iNOZb4Yws5UO2I+aIprQITM
github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs=
github.com/manifoldco/promptui v0.7.0 h1:3l11YT8tm9MnwGFQ4kETwkzpAwY2Jt9lCrumCUW4+z4=
github.com/manifoldco/promptui v0.7.0/go.mod h1:n4zTdgP0vr0S3w7/O/g98U+e0gwLScEXGwov2nIKuGQ=
+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/marten-seemann/qtls v0.2.3/go.mod h1:xzjG7avBwGGbdZ8dTGxlBnLArsVKLvwmjgmPuiQEcYk=
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-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA=
-github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
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.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
+github.com/mattn/go-isatty v0.0.9 h1:d5US/mDsogSGW37IV293h//ZFaeajb69h+EHFsv2xGg=
github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ=
-github.com/mattn/go-isatty v0.0.11 h1:FxPOTFNqGkuDUGi3H/qkUbQO4ZiBa2brKq5r0l8TGeM=
-github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE=
+github.com/mattn/go-oci8 v0.0.7/go.mod h1:wjDx6Xm9q7dFtHJvIlrI99JytznLw5wQ4R+9mNXJwGI=
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.8 h1:3tS41NlGYSmhhe/8fhGRzc+z3AYCw1Fe1WAyLuujKs0=
-github.com/mattn/go-runewidth v0.0.8/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
+github.com/mattn/go-runewidth v0.0.7 h1:Ei8KR0497xHyKJPAv59M1dkC+rOZCMBJ+t3fZ+twI54=
+github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
github.com/mattn/go-shellwords v1.0.4-0.20180201004752-39dbbfa24bbc/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.10 h1:Y7Xqm8piKOO3v10Thp7Z36h4FYFjt5xB//6XvOrs2Gw=
-github.com/mattn/go-shellwords v1.0.10/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y=
-github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
-github.com/mattn/go-sqlite3 v1.12.0 h1:u/x3mp++qUxvYfulZ4HKOvVO0JWhk7HtE8lWhbGz/Do=
+github.com/mattn/go-shellwords v1.0.11 h1:vCoR9VPpsk/TZFW2JwK5I9S0xdrtUq2bph6/YjEPnaw=
+github.com/mattn/go-shellwords v1.0.11/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y=
github.com/mattn/go-sqlite3 v1.12.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
+github.com/mattn/go-sqlite3 v1.14.6 h1:dNPt6NO46WmLVt2DLNpwczCmdV5boIZ6g/tlDrlRUbg=
+github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw=
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=
@@ -696,6 +832,7 @@ github.com/mesos/mesos-go v0.0.9/go.mod h1:kPYCMQ9gsOXVAle1OsoY4I1+9kPu8GHkf88aV
github.com/mholt/archiver/v3 v3.3.0 h1:vWjhY8SQp5yzM9P6OJ/eZEkmi3UAbRrxCq48MxjAzig=
github.com/mholt/archiver/v3 v3.3.0/go.mod h1:YnQtqsp+94Rwd0D/rk5cnLrxusUBUXg+08Ebtr1Mqao=
github.com/mholt/certmagic v0.6.2-0.20190624175158-6a42ef9fe8c2/go.mod h1:g4cOPxcjV0oFq3qwpjSA30LReKD8AoIfwAY9VvG35NY=
+github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
github.com/miekg/dns v1.1.3/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
github.com/miekg/dns v1.1.4 h1:rCMZsU2ScVSYcAsOXgmC6+AKOK+6pmQTOcw03nfwYV0=
github.com/miekg/dns v1.1.4/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
@@ -707,21 +844,31 @@ github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db h1:62I3jR2EmQ4l5rM/4FEfDWcRD+abF5XlKShorW5LRoQ=
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw=
-github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ=
github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw=
+github.com/mitchellh/copystructure v1.1.1 h1:Bp6x9R1Wn16SIz3OfeDr0b7RnCG2OB66Y7PQyC/cvq4=
+github.com/mitchellh/copystructure v1.1.1/go.mod h1:EBArHfARyrSWO/+Wyr9zwEkc6XMFB9XyNgFNmRkZZU4=
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/go-ps v0.0.0-20170309133038-4fdf99ab2936/go.mod h1:r1VsdOzOPt1ZSrGZWFoNhsAedKnEd6r9Np1+5blZCWk=
+github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4=
github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo=
+github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg=
+github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
github.com/mitchellh/ioprogress v0.0.0-20180201004757-6a23b12fa88e h1:Qa6dnn8DlasdXRnacluu8HzPts0S1I9zvvUPDbBnXFI=
github.com/mitchellh/ioprogress v0.0.0-20180201004757-6a23b12fa88e/go.mod h1:waEya8ee1Ro/lgxpVhkJI4BVASzkm3UZqkx/cFJiYHM=
+github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/mapstructure v0.0.0-20180220230111-00c29f56e238/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A=
-github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY=
github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
+github.com/mitchellh/reflectwalk v1.0.1 h1:FVzMWA5RllMAKIdUSC8mdWo3XtwoecrH79BY70sEEpE=
+github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
+github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8=
+github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c=
+github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 h1:rzf0wL0CHVc8CEsgyygG0Mn9CNCCPZqOPaz8RiiHYQk=
+github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
@@ -730,6 +877,8 @@ github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/mohae/deepcopy v0.0.0-20170603005431-491d3605edfb h1:e+l77LJOEqXTIQihQJVkA6ZxPOUmfPM5e4H7rcpgtSk=
github.com/mohae/deepcopy v0.0.0-20170603005431-491d3605edfb/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 v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
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=
@@ -745,18 +894,31 @@ github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0=
github.com/naoina/toml v0.1.1/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E=
+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/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/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM=
+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/nwaples/rardecode v1.0.0 h1:r7vGuS5akxOnR4JQSkko62RJ1ReCMXxQRPtxsiFMBOs=
github.com/nwaples/rardecode v1.0.0/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0=
+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/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 h1:sq53g+DWf0J6/ceFUHpQ0nAEb6WgM++fq16MZ91cS6o=
github.com/olekukonko/tablewriter v0.0.2/go.mod h1:rSAaSIOAGT9odnlyGlUfAJaoc5w2fSBUmeGDbRWPxyQ=
+github.com/olekukonko/tablewriter v0.0.4 h1:vHD/YYe1Wolo78koG299f7V/VAS08c6IpCLn+Ejf/w8=
+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=
+github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
@@ -769,10 +931,12 @@ github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/onsi/gomega v1.7.1 h1:K0jcRCwNQM3vFGh1ppMtDh/+7ApJrjldlX8fA0jDTLQ=
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
+github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
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/opencontainers/go-digest v1.0.0-rc1 h1:WzifXhOVOEOuFYOJAW6aQqW0TooG2iki3E3Ii+WN7gQ=
github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
+github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
+github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI=
github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
@@ -782,20 +946,33 @@ github.com/opencontainers/runc v1.0.0-rc10 h1:AbmCEuSZXVflng0/cboQkpdEOeBsPMjz6t
github.com/opencontainers/runc v1.0.0-rc10/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-spec v1.0.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
-github.com/opencontainers/runtime-spec v1.0.1 h1:wY4pOY8fBdSIvs9+IDHC55thBuEulhzfSgKeC1yFvzQ=
github.com/opencontainers/runtime-spec v1.0.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
+github.com/opencontainers/runtime-spec v1.0.2 h1:UfAcuLBJB9Coz72x1hgl8O5RVzTdNiaglX6v2DM6FI0=
+github.com/opencontainers/runtime-spec v1.0.2/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/opencontainers/selinux v1.3.1-0.20190929122143-5215b1806f52/go.mod h1:+BLncwf63G4dgOzykXAxcmnFlUaOlkDdmw/CqsW6pjs=
github.com/opencontainers/selinux v1.3.3 h1:RX0wAeqtvVSYQcr017X3pFXPkLEtB6V4NjRD7gVQgg4=
github.com/opencontainers/selinux v1.3.3/go.mod h1:yTcKuYAh6R95iDpefGLQaPaRwJFwyzAJufJyiTt7s0g=
+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.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw=
+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/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/pborman/uuid v0.0.0-20150824212802-cccd189d45f7/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34=
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/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/freeport v0.0.0-20180830031419-95f893ade6f2 h1:JhzVVoYvbOACxoUmOs6V/G4D5nPVUW73rKvXxP4XUJc=
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 h1:2xWsjqPFWcplujydGg4WmhC/6fZqK42wMM8aXeqhl0I=
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
@@ -803,6 +980,7 @@ github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV
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/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
@@ -812,35 +990,45 @@ github.com/pquerna/ffjson v0.0.0-20180717144149-af8b230fcd20 h1:7sBb9iOkeq+O7AXl
github.com/pquerna/ffjson v0.0.0-20180717144149-af8b230fcd20/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M=
github.com/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
+github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs=
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.6.0 h1:YVPodQOcK15POxhgARIvnDRVpLcuK8mglnMrWfyrw6A=
-github.com/prometheus/client_golang v1.6.0/go.mod h1:ZLOG9ck3JLRdB5MgO8f+lLTe83AXG6ro35rLTxvnIl4=
+github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og=
+github.com/prometheus/client_golang v1.7.1 h1:NTGy1Ja9pByO+xAeH/qiWnLrKtr3hJPNjaVUwnjpdpA=
+github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
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-20170220103846-49fee292b27b/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
github.com/prometheus/common v0.0.0-20180110214958-89604d197083/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
+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.9.1 h1:KOMtN28tlbam3/7ZKEYKHhKoJZYYj3gMH4uc62x7X7U=
-github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4=
+github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA=
+github.com/prometheus/common v0.10.0 h1:RyRA7RzGXQZiW+tGMr7sxa85G1z0yOpM1qq5c8lNawc=
+github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/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-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/procfs v0.0.0-20190522114515-bc1a522cf7b1/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ=
-github.com/prometheus/procfs v0.0.11 h1:DhHlBtkHWPYi8O2y31JkK0TF+DGM+51OopZjH/Ia5qI=
-github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
+github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=
+github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
+github.com/prometheus/procfs v0.2.0 h1:wH4vA7pcjKuZzjF7lM8awk4fnuJO6idemZXoKnULUx4=
+github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI=
github.com/quobyte/api v0.1.2 h1:lPHLsuvtjFyk8WhC4uHoHRkScijIHcffTWBBP+YpzYo=
github.com/quobyte/api v0.1.2/go.mod h1:jL7lIHrmqQ7yh05OJ+eEEdHr0u/kmT1Ff9iHd+4H6VI=
+github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M=
github.com/robfig/cron v1.1.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
@@ -849,23 +1037,30 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR
github.com/rogpeppe/go-internal v1.3.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
github.com/rogpeppe/go-internal v1.4.0 h1:LUa41nrWTQNGhzdsZ5lTnkwbNjj6rXTdazA1cSdjkOY=
github.com/rogpeppe/go-internal v1.4.0/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
-github.com/rubenv/sql-migrate v0.0.0-20200212082348-64f95ea68aa3 h1:xkBtI5JktwbW/vf4vopBbhYsRFTGfQWHYXzC0/qYwxI=
-github.com/rubenv/sql-migrate v0.0.0-20200212082348-64f95ea68aa3/go.mod h1:rtQlpHw+eR6UrqaS3kX1VYeaCxzCVdimDS7g5Ln4pPc=
-github.com/rubiojr/go-vhd v0.0.0-20160810183302-0bfd3b39853c h1:ht7N4d/B7Ezf58nvMNVF3OlvDlz9pp+WHVcRNS0nink=
-github.com/rubiojr/go-vhd v0.0.0-20160810183302-0bfd3b39853c/go.mod h1:DM5xW0nvfNNm2uytzsvhI3OnX8uzaRAg8UX/CnDqbto=
+github.com/rubenv/sql-migrate v0.0.0-20200616145509-8d140a17f351 h1:HXr/qUllAWv9riaI4zh2eXWKmCSDqVS/XH1MRHLKRwk=
+github.com/rubenv/sql-migrate v0.0.0-20200616145509-8d140a17f351/go.mod h1:DCgfY80j8GYL7MLEfvcpSFvjD0L5yZq/aZUJmhZklyg=
+github.com/rubiojr/go-vhd v0.0.0-20200706105327-02e210299021 h1:if3/24+h9Sq6eDx8UUz1SO9cT9tizyIsATfB7b4D3tc=
+github.com/rubiojr/go-vhd v0.0.0-20200706105327-02e210299021/go.mod h1:DM5xW0nvfNNm2uytzsvhI3OnX8uzaRAg8UX/CnDqbto=
github.com/russross/blackfriday v0.0.0-20170610170232-067529f716f4/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
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=
+github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/ryanuber/go-glob v0.0.0-20170128012129-256dc444b735/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc=
+github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E=
github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww=
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
+github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
github.com/seccomp/libseccomp-golang v0.0.0-20150813023252-1b506fc7c24e/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo=
github.com/seccomp/libseccomp-golang v0.9.1 h1:NJjM5DNFOs0s3kYE1WUOr6G8V97sdt46rlXTMfXGWBo=
github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo=
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
+github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
+github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
github.com/shirou/gopsutil v0.0.0-20180427012116-c95755e4bcd7/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc=
+github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ=
+github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk=
github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ=
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
@@ -874,8 +1069,11 @@ github.com/sirupsen/logrus v1.0.5/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjM
github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
github.com/sirupsen/logrus v1.2.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 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
+github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
+github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
+github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
+github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
@@ -883,6 +1081,7 @@ github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIK
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E=
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
+github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY=
github.com/sourcegraph/go-diff v0.5.1/go.mod h1:j2dHj3m8aZgQO8lMTcTnBcXkRRRqi34cd2MNlA9u1mE=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/spf13/afero v1.1.0/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
@@ -897,8 +1096,10 @@ github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKv
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 v1.0.0 h1:6m/oheQuQ13N9ks4hubMG6BnvwOeaJrqSPLahSnczz8=
github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE=
+github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI=
+github.com/spf13/cobra v1.1.3 h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M=
+github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo=
github.com/spf13/jwalterweatherman v0.0.0-20180109140146-7c0cea34c8ec/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
@@ -911,8 +1112,12 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An
github.com/spf13/viper v1.0.2/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM=
github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s=
github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE=
+github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg=
github.com/storageos/go-api v0.0.0-20180912212459-343b3eff91fc h1:n+WYaU0kQ6WIiuEyWSgbXqkBx16irO69kYCtwVYoO5s=
github.com/storageos/go-api v0.0.0-20180912212459-343b3eff91fc/go.mod h1:ZrLn+e0ZuF3Y65PNF6dIwbJPZqfmtCXxFm9ckv0agOY=
+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 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48=
@@ -921,8 +1126,10 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
-github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
+github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2 h1:b6uOv7YOFK0TYG7HtkIgExQo+2RdLuwRft63jn2HWj8=
github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
@@ -943,6 +1150,7 @@ github.com/ultraware/funlen v0.0.2/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lP
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/urfave/negroni v1.0.0 h1:kIimOitoypq34K7TG7DUaJ9kq/N4Ofuwi1sjz0KipXc=
github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
@@ -963,14 +1171,18 @@ github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0=
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 h1:ngVtJC9TY/lg0AA/1k48FYhBrhRoFlEmWzsehpNAaZg=
-github.com/xeipuuv/gojsonschema v1.1.0/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs=
+github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74=
+github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 h1:nIPpBwaJSVYIxUFsDv3M8ofmx9yWTog9BfvIu0q41lo=
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos=
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-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/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43 h1:+lm10QQTNSBd8DVTNGHx7o/IKu9HYDvLMffDhbyLccI=
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 h1:hlE8//ciYMztlGpl/VA+Zm1AcTPHYkHJPbHqE6WJUXE=
@@ -980,35 +1192,46 @@ github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go
github.com/ziutek/mymysql v1.5.4 h1:GB0qdRGsTwQSBVYuVShFBKaXSnSnYYC2d9knnE1LHFs=
github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0=
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
-go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk=
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
+go.etcd.io/bbolt v1.3.5 h1:XAzx9gjCb0Rxj7EoqcClPD1d5ZBxZJk0jbuoPHenBt0=
+go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg=
-go.etcd.io/etcd v0.5.0-alpha.5.0.20200520232829-54ba9589114f h1:pBCD+Z7cy5WPTq+R6MmJJvDRpn88cp7bmTypBsn91g4=
-go.etcd.io/etcd v0.5.0-alpha.5.0.20200520232829-54ba9589114f/go.mod h1:skWido08r9w6Lq/w70DO5XYIKMu4QFu1+4VsqLQuJy8=
+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.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM=
go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM=
+go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
+go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
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 h1:75k/FF0Q2YM8QYo07VPddOLBslDt1MZOdEslOHvmzAs=
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
+go.opencensus.io v0.22.3 h1:8sGtKOrtQqkN1bp2AtX+misvLIlOmsEsNd+9NIcPEm8=
+go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
+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 v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
-go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk=
-go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
+go.uber.org/atomic v1.5.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/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4=
+go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
-go.uber.org/multierr v1.5.0 h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A=
-go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU=
-go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4=
+go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4=
+go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
+go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
-go.uber.org/zap v1.16.0 h1:uFRZXykJGK9lLY4HtgSw44DnIcAM+kRBP7x5m+NpAOM=
-go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ=
+go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
+go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI=
+go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE=
golang.org/x/build v0.0.0-20190927031335-2835ba2e683f/go.mod h1:fYw7AShPAhGMdXqA9gRadk/CcMsvLlClpE5oBwnS3dM=
golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20180426230345-b49d69b5da94/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-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
@@ -1019,30 +1242,56 @@ golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACk
golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190424203555-c05e17bb3b2d/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-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-20200128174031-69ecbb4d6d5d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
-golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/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/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
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=
golang.org/x/exp v0.0.0-20190312203227-4b39c73a6495/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
+golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
+golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek=
+golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY=
+golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
+golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
+golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
+golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
+golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
+golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
-golang.org/x/lint v0.0.0-20190930215403-16217165b5de h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs=
+golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
+golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
+golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
+golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
+golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
+golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
+golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
+golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
+golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.2/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-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -1050,8 +1299,10 @@ golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73r
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
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-20181102091132-c10e9556a7bc/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=
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -1068,31 +1319,47 @@ golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR
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-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/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-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200202094626-16171245cfb2 h1:CCH4IOTTfewWjGOlSp+zGcjutRKlBEZQ6wTn8ozI/nI=
+golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
+golang.org/x/net v0.0.0-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-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
-golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
+golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
+golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw=
+golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e 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-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20171026204733-164713f0dfce/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
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=
@@ -1114,35 +1381,69 @@ golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20190515120540-06a5c4944438/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190522044717-8097e1b27ff5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/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-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
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-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+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-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191112214154-59a1497f0cea/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191115151921-52ab43148777/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-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6 h1:DvY3Zkh7KabQE/kfzMvYvKirSiguP9Q/veMtkYyf0o8=
-golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-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-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
+golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
+golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE=
+golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+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.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
-golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc=
+golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
-golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba h1:O8mE0/t419eoIwhTFpKVkHiTs/Igowgfkj25AcZrtiE=
+golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20170915040203-e531a2a1c15f/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
@@ -1164,18 +1465,47 @@ golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBn
golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/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-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-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-20190816200558-6889da9d5479/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-20190911174233-4f2ddba30aff/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-20191004055002-72853e10c5a3/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 h1:hKsoRgsbwY1NafxrwTs+k64bikrLBkAgPir1TNCj3Zs=
golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
+golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/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-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
+golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
+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=
gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo=
gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0=
gonum.org/v1/gonum v0.6.2/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU=
@@ -1184,12 +1514,25 @@ gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e/go.mod h1:kS+toOQn6AQKjmK
gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc=
google.golang.org/api v0.0.0-20150730141719-0c2979aeaa5b/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0=
google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0=
+google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk=
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
-google.golang.org/api v0.6.1-0.20190607001116-5213b8090861 h1:ppLucX0K/60T3t6LPZQzTOkt5PytkEbQLIaSteq+TpE=
google.golang.org/api v0.6.1-0.20190607001116-5213b8090861/go.mod h1:btoxGiFvQNVUZQ8W08zLtrVS08CNpINPEfxXxgJL1Q4=
+google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
+google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
+google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
+google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
+google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
+google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
+google.golang.org/api v0.15.1-0.20200106000736-b8fc810ca6b5/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
+google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
+google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
+google.golang.org/api v0.20.0 h1:jz2KixHX7EcCPiQrySzPdnYT7DbINAypCqKZ1Z7GM40=
+google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
+google.golang.org/appengine v1.2.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.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM=
google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
google.golang.org/cloud v0.0.0-20151119220103-975617b05ea8/go.mod h1:0H1ncTHf11KCFhTc/+EFRbzSCOZx+VUbRMk55Yv5MYk=
@@ -1199,44 +1542,70 @@ google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRn
google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190522204451-c2c4e71fbf69/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s=
+google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s=
+google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
-google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb h1:ADPHZzpzM4tk4V4S5cnCrr5SwzvlrPRmqqCuJDB8UTs=
+google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=
+google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
+google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
+google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
+google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
+google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
+google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA=
+google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
+google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
+google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
+google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
+google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a h1:pOwg4OoaRYScjmR4LlLgdtnyoHYTSAVhhqe5uPdpII8=
+google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
+google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
+google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
+google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
+google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
-google.golang.org/grpc v1.27.0 h1:rRYRFMVgRv6E0D70Skyfsr28tDXIuuPZyWGMPdMcnXg=
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
+google.golang.org/grpc v1.27.1 h1:zvIju4sqAGvwKspUQOhwnpcqSbzi7/H6QomNNjTL4sk=
+google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
-google.golang.org/protobuf v1.21.0 h1:qdOKuR/EIArgaWNjetjgTzgVTAZ+S/WXVrq9HW9zimw=
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
+google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
+google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
+google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
+google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
+google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c=
+google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
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/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 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
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/cheggaaa/pb.v1 v1.0.25/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 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
-gopkg.in/gcfg.v1 v1.2.0 h1:0HIbH907iBTAntm+88IJV2qmJALDAh8sPekI9Vc1fm0=
gopkg.in/gcfg.v1 v1.2.0/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o=
+gopkg.in/gcfg.v1 v1.2.3 h1:m8OOJ4ccYHnx2f4gQwpno8nAX5OGOh7RLaaz0pj3Ogs=
+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 h1:j3DWlAyGVv8whO7AcIWznQ2Yj7yJkn34B8s63GViAAw=
gopkg.in/gorp.v1 v1.7.2/go.mod h1:Wo3h+DBQZIxATwftsglhdD/62zRFPhGhTiu5jUJmCaw=
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
-gopkg.in/ini.v1 v1.46.0 h1:VeDZbLYGaupuvIrsYCEOe/L/2Pcs5n7hdO1ZTjporag=
-gopkg.in/ini.v1 v1.46.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
+gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno=
+gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/mcuadros/go-syslog.v2 v2.2.1/go.mod h1:l5LPIyOOyIdQquNg+oU6Z3524YwrcqEm0aKH+5zpt2U=
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
gopkg.in/olivere/elastic.v2 v2.0.12/go.mod h1:CTVyl1gckiFw1aLZYxC00g3f9jnHmhoOKcWF7W3c6n4=
@@ -1245,85 +1614,104 @@ gopkg.in/square/go-jose.v2 v2.2.2 h1:orlkJ3myw8CN1nVQHBFfloD+L3egixIa4FvUP6RosSA
gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
-gopkg.in/warnings.v0 v0.1.1 h1:XM28wIgFzaBmeZ5dNHIpWLQpt/9DGKxk+rCg/22nnYE=
gopkg.in/warnings.v0 v0.1.1/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
+gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME=
+gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
+gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
+gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
+gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
+gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gotest.tools v2.1.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo=
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
gotest.tools/gotestsum v0.3.5/go.mod h1:Mnf3e5FUzXbkCfynWBGOwLssY7gTQgCHObK9tMpAriY=
+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.2.4 h1:lz/0ZRkSgyIF+pCo6pjFzap1udCARB1IN6CRfqkpcOg=
-helm.sh/helm/v3 v3.2.4/go.mod h1:ZaXz/vzktgwjyGGFbUWtIQkscfE7WYoRGP2szqAFHR0=
+helm.sh/helm/v3 v3.6.3 h1:0nKDyXJr23nI3JrcP7HH7NcR+CYRvro/52Dvr1KhGO0=
+helm.sh/helm/v3 v3.6.3/go.mod h1:mIIus8EOqj+obtycw3sidsR4ORr2aFDmXMSI3k+oeVY=
+honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.1-2019.2.2/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
-honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM=
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
-k8s.io/api v0.18.9-rc.0 h1:F0w3wSknVIrICAt9/L8DTXQ34faxSBDX4oVFj12n/tY=
-k8s.io/api v0.18.9-rc.0/go.mod h1:32vFAuLAX89RZVkp4GtXk81UEzc/lDGxAYghfu8qFEI=
-k8s.io/apiextensions-apiserver v0.18.9-rc.0 h1:Ehs8GhlBxr/cA0zqS4CBAmE8G1uVjdyFS6wI21oyZsM=
-k8s.io/apiextensions-apiserver v0.18.9-rc.0/go.mod h1:NOMJxMJOANriRThUBdmXJzZfESKANMDaXp2B1EzxX20=
-k8s.io/apimachinery v0.18.9-rc.0 h1:RnhcqZsTFI3l4z1iXNJhP0PrC4Gnrw5WlSjRhoRYifs=
-k8s.io/apimachinery v0.18.9-rc.0/go.mod h1:6sQd+iHEqmOtALqOFjSWp2KZ9F0wlU/nWm0ZgsYWMig=
-k8s.io/apiserver v0.18.9-rc.0 h1:m3es22wT2zK/T29MSV/vnhTXT5TSMv5/4/O9yClWfyQ=
-k8s.io/apiserver v0.18.9-rc.0/go.mod h1:snsqE09K/OLWDatgIkORAlZOvdR4G8rmyVkgFPAgIF0=
-k8s.io/cli-runtime v0.18.9-rc.0 h1:cg/aRXG7PTnHmih8k81N3P5JmN34DGnCDCuSRZUVtJc=
-k8s.io/cli-runtime v0.18.9-rc.0/go.mod h1:CAw3/xS/Kb7ERMha5eu2F/KGUDGecQT+8ghA74GHBms=
-k8s.io/client-go v0.18.9-rc.0 h1:bjKRmPF1BaSs8RuhGEtMdjN+I0n2wmte+bjowYCnXj4=
-k8s.io/client-go v0.18.9-rc.0/go.mod h1:xAnLmQozVjArGTzWHnTcJN73MMET/rr4ptPqTGMC07s=
-k8s.io/cloud-provider v0.18.9-rc.0 h1:vVH//oGCg0dMFAGrGS8VMVrvWGze+6w+ZvYU7H45faE=
-k8s.io/cloud-provider v0.18.9-rc.0/go.mod h1:mQ6ePljHsecjQNwxAt4Ulpx4mDINup95quHdIb+ktaw=
-k8s.io/cluster-bootstrap v0.18.9-rc.0/go.mod h1:4KjywbV3KAdr+57sCdzDCPC/ujpLkyzrMuSKFEBvi24=
-k8s.io/code-generator v0.18.9-rc.0/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c=
-k8s.io/component-base v0.18.9-rc.0 h1:tfpo2jAaOx8zmM71Ix91PGWiEDll8dJrulOIDHkBQjw=
-k8s.io/component-base v0.18.9-rc.0/go.mod h1:kiQ+qSb3aTw9HS2MMdUoewEKebvWRHj3/KNrRcFCJsw=
-k8s.io/cri-api v0.18.9-rc.0 h1:sTclnjBTEAN2ZYfHqWg2yfHcGYcHktHrBdcKoW+cmks=
-k8s.io/cri-api v0.18.9-rc.0/go.mod h1:OJtpjDvfsKoLGhvcc0qfygved0S0dGX56IJzPbqTG1s=
-k8s.io/csi-translation-lib v0.18.9-rc.0 h1:YQforI0XURIrn32AVPZV8Rg0SUfIWa06758XxVAUkkI=
-k8s.io/csi-translation-lib v0.18.9-rc.0/go.mod h1:qNQjuqctFuNsawkAVAKlvEeMopM/2TuhdLN9RfKKdjk=
+honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
+k8s.io/api v0.21.1 h1:94bbZ5NTjdINJEdzOkpS4vdPhkb1VFpTYC9zh43f75c=
+k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s=
+k8s.io/apiextensions-apiserver v0.21.1 h1:AA+cnsb6w7SZ1vD32Z+zdgfXdXY8X9uGX5bN6EoPEIo=
+k8s.io/apiextensions-apiserver v0.21.1/go.mod h1:KESQFCGjqVcVsZ9g0xX5bacMjyX5emuWcS2arzdEouA=
+k8s.io/apimachinery v0.21.1 h1:Q6XuHGlj2xc+hlMCvqyYfbv3H7SRGn2c8NycxJquDVs=
+k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY=
+k8s.io/apiserver v0.21.1 h1:wTRcid53IhxhbFt4KTrFSw8tAncfr01EP91lzfcygVg=
+k8s.io/apiserver v0.21.1/go.mod h1:nLLYZvMWn35glJ4/FZRhzLG/3MPxAaZTgV4FJZdr+tY=
+k8s.io/cli-runtime v0.21.1 h1:Oj/iZxa7LLXrhzShaLNF4rFJEIEBTDHj0dJw4ra2vX4=
+k8s.io/cli-runtime v0.21.1/go.mod h1:TI9Bvl8lQWZB2KqE91QLCp9AZE4l29zNFnj/x4IX4Fw=
+k8s.io/client-go v0.21.1 h1:bhblWYLZKUu+pm50plvQF8WpY6TXdRRtcS/K9WauOj4=
+k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs=
+k8s.io/cloud-provider v0.21.1 h1:V7ro0ZuxMBNYVH4lJKxCdI+h2bQ7EApC5f7sQYrQLVE=
+k8s.io/cloud-provider v0.21.1/go.mod h1:GgiRu7hOsZh3+VqMMbfLJJS9ZZM9A8k/YiZG8zkWpX4=
+k8s.io/cluster-bootstrap v0.21.1/go.mod h1:izdXmPTfqI9gkjQLf9PQ1Y9/DSqG54zU2UByEzgdajs=
+k8s.io/code-generator v0.21.1/go.mod h1:hUlps5+9QaTrKx+jiM4rmq7YmH8wPOIko64uZCHDh6Q=
+k8s.io/component-base v0.21.1 h1:iLpj2btXbR326s/xNQWmPNGu0gaYSjzn7IN/5i28nQw=
+k8s.io/component-base v0.21.1/go.mod h1:NgzFZ2qu4m1juby4TnrmpR8adRk6ka62YdH5DkIIyKA=
+k8s.io/component-helpers v0.21.1/go.mod h1:FtC1flbiQlosHQrLrRUulnKxE4ajgWCGy/67fT2GRlQ=
+k8s.io/controller-manager v0.21.1/go.mod h1:8ugs8DCcHqybiwdVERhnnyGoS5Ksq/ea1p2B0CosHyc=
+k8s.io/cri-api v0.21.1 h1:dLQx77FHendlecUB9SE9GPls6clStVQ3eRsAzLIsr54=
+k8s.io/cri-api v0.21.1/go.mod h1:nJbXlTpXwYCYuGMR7v3PQb1Du4WOGj2I9085xMVjr3I=
+k8s.io/csi-translation-lib v0.21.1 h1:yzAIfaMKv+j5pPtMKwGgAOLaIVhPBv+UjMRyusq+im4=
+k8s.io/csi-translation-lib v0.21.1/go.mod h1:y6NwcsxV1IsoqOm07G4hqANvCLXNDMC1t00lf+CqKRA=
k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/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-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E=
k8s.io/heapster v1.2.0-beta.1/go.mod h1:h1uhptVXMwC8xtZBYsPXKVi8fpdlYkTs6k949KozGrM=
k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8=
k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I=
-k8s.io/kube-aggregator v0.18.9-rc.0/go.mod h1:mmfM4wU5/A3fPxaQoFgH1FIf36aMpr425LRQiYunKhs=
-k8s.io/kube-controller-manager v0.18.9-rc.0/go.mod h1:nSH60FXNm6aLOdX9849b4ALVLN1trHJDyDIVyoCc4OU=
-k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6 h1:Oh3Mzx5pJ+yIumsAD0MOECPVeXsVot0UkiaCGVyfGQY=
+k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
+k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=
+k8s.io/klog/v2 v2.8.0 h1:Q3gmuM9hKEjefWFFYF0Mat+YyFJvsUyYuwyNNJ5C9Ts=
+k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec=
+k8s.io/kube-aggregator v0.21.1/go.mod h1:cAZ0n02IiSl57sQSHz4vvrz3upQRMbytOiZnpPJaQzQ=
+k8s.io/kube-controller-manager v0.21.1/go.mod h1:zEzQfcDGMQFFFpeWXv5GdJKIDR00LB4wp+hKYeRw7yc=
k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E=
-k8s.io/kube-proxy v0.18.9-rc.0 h1:aa3RWwFJ7dAf1UQ/pi+95VzVeCq5cMOu5xkeeoe2ktQ=
-k8s.io/kube-proxy v0.18.9-rc.0/go.mod h1:LFWF+iSLceHAZUqWO0eYFwGOKfsuB70nhM4B+PI0jj8=
-k8s.io/kube-scheduler v0.18.9-rc.0 h1:5NBoRpqJ5IxEtahfAbm+XQYGyQ7K+IXklOfyvtDEFYs=
-k8s.io/kube-scheduler v0.18.9-rc.0/go.mod h1:QCUmOJpW98BJWNWYkcdQVQFSwlzizqiFOGoeGbWGYcY=
-k8s.io/kubectl v0.18.9-rc.0 h1:pBzMg0QPKPoXkdsdHaQVAWUzzuu88oI7kP0qeRxB29s=
-k8s.io/kubectl v0.18.9-rc.0/go.mod h1:omYKAtvggIJidEQMwxJnoQziXsUAJTL8xplbO/Ofx3w=
-k8s.io/kubelet v0.18.9-rc.0 h1:ymVPzlRoGRpOyBH1c3busxLlHo9/BuFRHaQ0m1jRKXs=
-k8s.io/kubelet v0.18.9-rc.0/go.mod h1:WY6ArFLqGBK+kyrgtxKT2As4ATIJ4A0maFvK0TGik8s=
+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-proxy v0.21.1 h1:gymHGKPlPcqQNrAVgVu6d1jI0dFqtInC6TrThu8KIpc=
+k8s.io/kube-proxy v0.21.1/go.mod h1:5/Vg0HZHf2+475YhaeXWPvrw7PcQF0hW1Kx3Ug6kyBI=
+k8s.io/kube-scheduler v0.21.1 h1:knkUyAYE8i3v4hMdsLd7s2cHfhc+GjKOj3vzcBdInEM=
+k8s.io/kube-scheduler v0.21.1/go.mod h1:AFLD3tRlC0lbhB+WClraGOV/e5+NQyi5PeeL2CMKx/Y=
+k8s.io/kubectl v0.21.1 h1:ySEusoeSgSDSiSBncDMsNrthSa3OSlXqT4R2rf1VFTw=
+k8s.io/kubectl v0.21.1/go.mod h1:PMYR88MqESuysBM/MX+Vu4JbX/50nY4d4kny+SPEI2U=
+k8s.io/kubelet v0.21.1 h1:JeZsCr3GN2Kjg3gn21jLU10RFu0APUK/vdpFWa8P8Nw=
+k8s.io/kubelet v0.21.1/go.mod h1:poOR6Iaa5WqytFOp0egXFV8c2XTLFxaXTdj5njUlnVY=
k8s.io/kubernetes v1.18.9-rc.0 h1:bRse8/sSvQa8Af7UI3e7e7k2PQCaXQet648dPCNoXlE=
k8s.io/kubernetes v1.18.9-rc.0/go.mod h1:SU7bBi8ZNHRjqzNhY4U78gClS1O7Q7avCrfF5aSiDko=
-k8s.io/legacy-cloud-providers v0.18.9-rc.0 h1:icu9VUWOmD4KCY8v7tbn/DQ8BwUMO+oLGg4RaeSVtxk=
-k8s.io/legacy-cloud-providers v0.18.9-rc.0/go.mod h1:sjcpD640wYhYs65te8U2743QG4ytbRXhDWEfva3o7bE=
-k8s.io/metrics v0.18.9-rc.0/go.mod h1:HeXiWqT3icjSuBEANmcn5zLwYS3+186gDAyu+fBNsHQ=
+k8s.io/legacy-cloud-providers v0.21.1 h1:neX7VlKre9c/oc0KFZRJpPMUe7JvuyaSt7MF/9tHCrE=
+k8s.io/legacy-cloud-providers v0.21.1/go.mod h1:rpyWrAsPV1YNn7MmkZydMqleJijhay1Eqx+32K06Rd0=
+k8s.io/metrics v0.21.1/go.mod h1:pyDVLsLe++FIGDBFU80NcW4xMFsuiVTWL8Zfi7+PpNo=
k8s.io/perf-tests/clusterloader2 v0.0.0-20200615121956-f3cf096d4378 h1:oW8Pb48NXrSoalv4hx00YGRJw0DGZh+bxsiI1KyaKC4=
k8s.io/perf-tests/clusterloader2 v0.0.0-20200615121956-f3cf096d4378/go.mod h1:nDVvVD705+1ERKC1KyFt5Id2SeGiS0SWOvzjnFolg4c=
k8s.io/repo-infra v0.0.1-alpha.1/go.mod h1:wO1t9WaB99V80ljbeENTnayuEEwNZt7gECYh/CEyOJ8=
-k8s.io/sample-apiserver v0.18.9-rc.0/go.mod h1:QiHKiufDGgdYtHtHXPY9s7t/lautGfxyBoxgvzDx/n8=
+k8s.io/sample-apiserver v0.21.1/go.mod h1:haiFU1SSB0+EaaqTpg+CxqOLVwsmjBOJ/CeOk6BTabs=
k8s.io/system-validators v1.0.4/go.mod h1:HgSgTg4NAGNoYYjKsUyk52gdNi2PVDswQ9Iyn66R7NI=
k8s.io/utils v0.0.0-20200122174043-1e243dd1a584/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
-k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89 h1:d4vVOjXm687F1iLSP2q3lyPPuyvTUt3aVoBpi2DqRsU=
k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
+k8s.io/utils v0.0.0-20201110183641-67b214c5f920 h1:CbnUZsM497iRC5QMVkHwyl8s2tB3g7yaSHkYPkpgelw=
+k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw=
modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk=
modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k=
@@ -1332,18 +1720,28 @@ modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I=
mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc=
mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4=
mvdan.cc/unparam v0.0.0-20190209190245-fbb59629db34/go.mod h1:H6SUd1XjIs+qQCyskXg5OFSrilMRUkD8ePJpHKDPaeY=
+rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/letsencrypt v0.0.3 h1:H7xDfhkaFFSYEJlKeq38RwX2jYcnTeHuDQyT+mMNMwM=
rsc.io/letsencrypt v0.0.3/go.mod h1:buyQKZ6IXrRnB7TdkHP0RyEybLx18HHyOSoTyoOLqNY=
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
-sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7 h1:uuHDyjllyzRyCIvvn0OBjiRB0SgBZGqHNYAmjR7fO50=
-sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0=
+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.15 h1:4uqm9Mv+w2MmBYD+F4qf/v6tDFUdPOk29C095RbU5mY=
+sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg=
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.8.8 h1:G2z6JPSSjtWWgMeWSoHdXqyftJNmMmyxXpwENGoOtGE=
+sigs.k8s.io/kustomize/api v0.8.8/go.mod h1:He1zoK0nk43Pc6NlV085xDXDXTNprtcyKZVm3swsdNY=
+sigs.k8s.io/kustomize/cmd/config v0.9.10/go.mod h1:Mrby0WnRH7hA6OwOYnYpfpiY0WJIMgYrEDfwOeFdMK0=
+sigs.k8s.io/kustomize/kustomize/v4 v4.1.2/go.mod h1:PxBvo4WGYlCLeRPL+ziT64wBXqbgfcalOS/SXa/tcyo=
+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/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw=
-sigs.k8s.io/structured-merge-diff/v3 v3.0.0 h1:dOmIZBMfhcHS09XZkMyUgkq5trg3/jRyJYFZUiaOp8E=
-sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw=
+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/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/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/k8s-tester/README.md b/k8s-tester/README.md
index f2c9cf9db..ccdc0d2c6 100644
--- a/k8s-tester/README.md
+++ b/k8s-tester/README.md
@@ -47,7 +47,7 @@ See example commits:
### Environmental variables
-Total 21 test cases!
+Total 28 test cases!
```
*----------------------------------*----------------------*----------------------------------------*---------------*
@@ -98,6 +98,15 @@ Total 21 test cases!
| K8S_TESTER_ADD_ON_METRICS_SERVER_MINIMUM_NODES | SETTABLE VIA ENV VAR | *metrics_server.Config.MinimumNodes | int |
*------------------------------------------------*----------------------*-------------------------------------*---------*
+*------------------------------------------------*----------------------*-----------------------------------*---------*
+| ENVIRONMENTAL VARIABLE | FIELD TYPE | TYPE | GO TYPE |
+*------------------------------------------------*----------------------*-----------------------------------*---------*
+| K8S_TESTER_ADD_ON_KUBECOST_ENABLE | SETTABLE VIA ENV VAR | *kubecost.Config.Enable | bool |
+| K8S_TESTER_ADD_ON_KUBECOST_MINIMUM_NODES | SETTABLE VIA ENV VAR | *kubecost.Config.MinimumNodes | int |
+| K8S_TESTER_ADD_ON_KUBECOST_HELM_CHART_REPO_URL | SETTABLE VIA ENV VAR | *kubecost.Config.HelmChartRepoURL | string |
+| K8S_TESTER_ADD_ON_KUBECOST_NAMESPACE | SETTABLE VIA ENV VAR | *kubecost.Config.Namespace | string |
+*------------------------------------------------*----------------------*-----------------------------------*---------*
+
*-------------------------------------*----------------------*--------------------------*---------*
| ENVIRONMENTAL VARIABLE | FIELD TYPE | TYPE | GO TYPE |
*-------------------------------------*----------------------*--------------------------*---------*
@@ -225,6 +234,15 @@ Total 21 test cases!
| K8S_TESTER_ADD_ON_WORDPRESS_ELB_URL | READ-ONLY | *wordpress.Config.ELBURL | string |
*-------------------------------------------*----------------------*--------------------------------*---------*
+*---------------------------------------------*----------------------*--------------------------------*---------*
+| ENVIRONMENTAL VARIABLE | FIELD TYPE | TYPE | GO TYPE |
+*---------------------------------------------*----------------------*--------------------------------*---------*
+| K8S_TESTER_ADD_ON_VAULT_ENABLE | SETTABLE VIA ENV VAR | *vault.Config.Enable | bool |
+| K8S_TESTER_ADD_ON_VAULT_MINIMUM_NODES | SETTABLE VIA ENV VAR | *vault.Config.MinimumNodes | int |
+| K8S_TESTER_ADD_ON_VAULT_HELM_CHART_REPO_URL | SETTABLE VIA ENV VAR | *vault.Config.HelmChartRepoURL | string |
+| K8S_TESTER_ADD_ON_VAULT_NAMESPACE | SETTABLE VIA ENV VAR | *vault.Config.Namespace | string |
+*---------------------------------------------*----------------------*--------------------------------*---------*
+
*-----------------------------------------*----------------------*------------------------------*---------*
| ENVIRONMENTAL VARIABLE | FIELD TYPE | TYPE | GO TYPE |
*-----------------------------------------*----------------------*------------------------------*---------*
@@ -432,4 +450,59 @@ Total 21 test cases!
| K8S_TESTER_ADD_ON_STRESS_IN_CLUSTER_K8S_TESTER_STRESS_CLI_BUSYBOX_REPOSITORY_NAME | SETTABLE VIA ENV VAR | *ecr.Repository.Name | string |
| K8S_TESTER_ADD_ON_STRESS_IN_CLUSTER_K8S_TESTER_STRESS_CLI_BUSYBOX_REPOSITORY_IMAGE_TAG | SETTABLE VIA ENV VAR | *ecr.Repository.ImageTag | string |
*-----------------------------------------------------------------------------------------*----------------------*---------------------------*---------*
+
+*--------------------------------------------*----------------------*-------------------------------*---------*
+| ENVIRONMENTAL VARIABLE | FIELD TYPE | TYPE | GO TYPE |
+*--------------------------------------------*----------------------*-------------------------------*---------*
+| K8S_TESTER_ADD_ON_AQUA_ENABLE | SETTABLE VIA ENV VAR | *aqua.Config.Enable | bool |
+| K8S_TESTER_ADD_ON_AQUA_MINIMUM_NODES | SETTABLE VIA ENV VAR | *aqua.Config.MinimumNodes | int |
+| K8S_TESTER_ADD_ON_AQUA_HELM_CHART_REPO_URL | SETTABLE VIA ENV VAR | *aqua.Config.HelmChartRepoURL | string |
+| K8S_TESTER_ADD_ON_AQUA_NAMESPACE | SETTABLE VIA ENV VAR | *aqua.Config.Namespace | string |
+| K8S_TESTER_ADD_ON_AQUA_AQUA_LICENSE | SETTABLE VIA ENV VAR | *aqua.Config.AquaLicense | string |
+| K8S_TESTER_ADD_ON_AQUA_AQUA_USERNAME | SETTABLE VIA ENV VAR | *aqua.Config.AquaUsername | string |
+| K8S_TESTER_ADD_ON_AQUA_AQUA_PASSWORD | SETTABLE VIA ENV VAR | *aqua.Config.AquaPassword | string |
+*--------------------------------------------*----------------------*-------------------------------*---------*
+
+*----------------------------------------------*----------------------*---------------------------------*---------*
+| ENVIRONMENTAL VARIABLE | FIELD TYPE | TYPE | GO TYPE |
+*----------------------------------------------*----------------------*---------------------------------*---------*
+| K8S_TESTER_ADD_ON_ARMORY_ENABLE | SETTABLE VIA ENV VAR | *armory.Config.Enable | bool |
+| K8S_TESTER_ADD_ON_ARMORY_MINIMUM_NODES | SETTABLE VIA ENV VAR | *armory.Config.MinimumNodes | int |
+| K8S_TESTER_ADD_ON_ARMORY_HELM_CHART_REPO_URL | SETTABLE VIA ENV VAR | *armory.Config.HelmChartRepoURL | string |
+| K8S_TESTER_ADD_ON_ARMORY_NAMESPACE | SETTABLE VIA ENV VAR | *armory.Config.Namespace | string |
+*----------------------------------------------*----------------------*---------------------------------*---------*
+
+*-----------------------------------------------*----------------------*-----------------------------------*---------*
+| ENVIRONMENTAL VARIABLE | FIELD TYPE | TYPE | GO TYPE |
+*-----------------------------------------------*----------------------*-----------------------------------*---------*
+| K8S_TESTER_ADD_ON_EPSAGON_ENABLE | SETTABLE VIA ENV VAR | *epsagon.Config.Enable | bool |
+| K8S_TESTER_ADD_ON_EPSAGON_MINIMUM_NODES | SETTABLE VIA ENV VAR | *epsagon.Config.MinimumNodes | int |
+| K8S_TESTER_ADD_ON_EPSAGON_HELM_CHART_REPO_URL | SETTABLE VIA ENV VAR | *epsagon.Config.HelmChartRepoURL | string |
+| K8S_TESTER_ADD_ON_EPSAGON_NAMESPACE | SETTABLE VIA ENV VAR | *epsagon.Config.Namespace | string |
+| K8S_TESTER_ADD_ON_EPSAGON_COLLECTOR_ENDPOINT | SETTABLE VIA ENV VAR | *epsagon.Config.CollectorEndpoint | string |
+| K8S_TESTER_ADD_ON_EPSAGON_API_TOKEN | SETTABLE VIA ENV VAR | *epsagon.Config.APIToken | string |
+| K8S_TESTER_ADD_ON_EPSAGON_CLUSTER_NAME | SETTABLE VIA ENV VAR | *epsagon.Config.ClusterName | string |
+*-----------------------------------------------*----------------------*-----------------------------------*---------*
+
+*----------------------------------------------*----------------------*----------------------------------*---------*
+| ENVIRONMENTAL VARIABLE | FIELD TYPE | TYPE | GO TYPE |
+*----------------------------------------------*----------------------*----------------------------------*---------*
+| K8S_TESTER_ADD_ON_SYSDIG_ENABLE | SETTABLE VIA ENV VAR | *sysdig.Config.Enable | bool |
+| K8S_TESTER_ADD_ON_SYSDIG_MINIMUM_NODES | SETTABLE VIA ENV VAR | *sysdig.Config.MinimumNodes | int |
+| K8S_TESTER_ADD_ON_SYSDIG_HELM_CHART_REPO_URL | SETTABLE VIA ENV VAR | *sysdig.Config.HelmChartRepoURL | string |
+| K8S_TESTER_ADD_ON_SYSDIG_NAMESPACE | SETTABLE VIA ENV VAR | *sysdig.Config.Namespace | string |
+| K8S_TESTER_ADD_ON_SYSDIG_ACCESS_KEY | SETTABLE VIA ENV VAR | *sysdig.Config.AccessKey | string |
+| K8S_TESTER_ADD_ON_SYSDIG_COLLECTOR_ENDPOINT | SETTABLE VIA ENV VAR | *sysdig.Config.CollectorEndpoint | string |
+*----------------------------------------------*----------------------*----------------------------------*---------*
+
+*----------------------------------------------*----------------------*---------------------------------*---------*
+| ENVIRONMENTAL VARIABLE | FIELD TYPE | TYPE | GO TYPE |
+*----------------------------------------------*----------------------*---------------------------------*---------*
+| K8S_TESTER_ADD_ON_SPLUNK_ENABLE | SETTABLE VIA ENV VAR | *splunk.Config.Enable | bool |
+| K8S_TESTER_ADD_ON_SPLUNK_MINIMUM_NODES | SETTABLE VIA ENV VAR | *splunk.Config.MinimumNodes | int |
+| K8S_TESTER_ADD_ON_SPLUNK_HELM_CHART_REPO_URL | SETTABLE VIA ENV VAR | *splunk.Config.HelmChartRepoURL | string |
+| K8S_TESTER_ADD_ON_SPLUNK_NAMESPACE | SETTABLE VIA ENV VAR | *splunk.Config.Namespace | string |
+| K8S_TESTER_ADD_ON_SPLUNK_ACCESS_KEY | SETTABLE VIA ENV VAR | *splunk.Config.AccessKey | string |
+| K8S_TESTER_ADD_ON_SPLUNK_SPLUNK_REALM | SETTABLE VIA ENV VAR | *splunk.Config.SplunkRealm | string |
+*----------------------------------------------*----------------------*---------------------------------*---------*
```
diff --git a/k8s-tester/aqua/go.mod b/k8s-tester/aqua/go.mod
index f316e3e71..83691edba 100644
--- a/k8s-tester/aqua/go.mod
+++ b/k8s-tester/aqua/go.mod
@@ -1,21 +1,21 @@
module github.com/aws/aws-k8s-tester/k8s-tester/aqua
-go 1.16
-
-replace (
- github.com/aws/aws-k8s-tester/client => ../../client
- github.com/aws/aws-k8s-tester/k8s-tester/helm => ../helm
- github.com/aws/aws-k8s-tester/k8s-tester/tester => ../tester
- github.com/aws/aws-k8s-tester/utils => ../../utils
-)
+go 1.17
require (
github.com/aws/aws-k8s-tester/client v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/helm v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/tester v0.0.0-00010101000000-000000000000
- github.com/aws/aws-k8s-tester/utils v0.0.0-20210722211631-7411a257e5a3
+ github.com/aws/aws-k8s-tester/utils v0.0.0-00010101000000-000000000000
github.com/manifoldco/promptui v0.8.0
github.com/spf13/cobra v1.2.1
- go.uber.org/zap v1.18.1
+ go.uber.org/zap v1.19.1
k8s.io/utils v0.0.0-20210802155522-efc7438f0176
)
+
+replace (
+ github.com/aws/aws-k8s-tester/client => ../../client
+ github.com/aws/aws-k8s-tester/k8s-tester/helm => ../helm
+ github.com/aws/aws-k8s-tester/k8s-tester/tester => ../tester
+ github.com/aws/aws-k8s-tester/utils => ../../utils
+)
diff --git a/k8s-tester/aqua/go.sum b/k8s-tester/aqua/go.sum
index 7926c1728..29d603f0b 100644
--- a/k8s-tester/aqua/go.sum
+++ b/k8s-tester/aqua/go.sum
@@ -860,8 +860,8 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.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/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0=
-go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A=
+go.uber.org/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4=
+go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
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.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
@@ -870,8 +870,8 @@ go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9E
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
-go.uber.org/zap v1.18.1 h1:CSUJ2mjFszzEWt4CdKISEuChVIXGBn3lAPwkRGyVrc4=
-go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI=
+go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI=
+go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
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-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
@@ -915,7 +915,6 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu
golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
-golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug=
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
@@ -1117,7 +1116,6 @@ golang.org/x/tools v0.0.0-20191004055002-72853e10c5a3/go.mod h1:b+2E5dAYhXwXZwtn
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-20191108193012-7d206e10da11/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=
@@ -1154,8 +1152,8 @@ golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4f
golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
-golang.org/x/tools v0.1.2 h1:kRBLX7v7Af8W7Gdbbc908OJcdgtK8bOz9Uaj8/F1ACA=
golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
+golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
diff --git a/k8s-tester/armory/go.mod b/k8s-tester/armory/go.mod
index e2d4301f9..313073356 100644
--- a/k8s-tester/armory/go.mod
+++ b/k8s-tester/armory/go.mod
@@ -1,21 +1,21 @@
module github.com/aws/aws-k8s-tester/k8s-tester/armory
-go 1.16
-
-replace (
- github.com/aws/aws-k8s-tester/client => ../../client
- github.com/aws/aws-k8s-tester/k8s-tester/helm => ../helm
- github.com/aws/aws-k8s-tester/k8s-tester/tester => ../tester
- github.com/aws/aws-k8s-tester/utils => ../../utils
-)
+go 1.17
require (
github.com/aws/aws-k8s-tester/client v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/helm v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/tester v0.0.0-00010101000000-000000000000
- github.com/aws/aws-k8s-tester/utils v0.0.0-20210722211631-7411a257e5a3
+ github.com/aws/aws-k8s-tester/utils v0.0.0-00010101000000-000000000000
github.com/manifoldco/promptui v0.8.0
github.com/spf13/cobra v1.2.1
- go.uber.org/zap v1.18.1
+ go.uber.org/zap v1.19.1
k8s.io/utils v0.0.0-20210802155522-efc7438f0176
)
+
+replace (
+ github.com/aws/aws-k8s-tester/client => ../../client
+ github.com/aws/aws-k8s-tester/k8s-tester/helm => ../helm
+ github.com/aws/aws-k8s-tester/k8s-tester/tester => ../tester
+ github.com/aws/aws-k8s-tester/utils => ../../utils
+)
diff --git a/k8s-tester/armory/go.sum b/k8s-tester/armory/go.sum
index 7926c1728..29d603f0b 100644
--- a/k8s-tester/armory/go.sum
+++ b/k8s-tester/armory/go.sum
@@ -860,8 +860,8 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.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/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0=
-go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A=
+go.uber.org/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4=
+go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
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.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
@@ -870,8 +870,8 @@ go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9E
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
-go.uber.org/zap v1.18.1 h1:CSUJ2mjFszzEWt4CdKISEuChVIXGBn3lAPwkRGyVrc4=
-go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI=
+go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI=
+go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
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-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
@@ -915,7 +915,6 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu
golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
-golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug=
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
@@ -1117,7 +1116,6 @@ golang.org/x/tools v0.0.0-20191004055002-72853e10c5a3/go.mod h1:b+2E5dAYhXwXZwtn
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-20191108193012-7d206e10da11/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=
@@ -1154,8 +1152,8 @@ golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4f
golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
-golang.org/x/tools v0.1.2 h1:kRBLX7v7Af8W7Gdbbc908OJcdgtK8bOz9Uaj8/F1ACA=
golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
+golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
diff --git a/k8s-tester/cloudwatch-agent/go.mod b/k8s-tester/cloudwatch-agent/go.mod
index 1c3b9dc08..0e1618b37 100644
--- a/k8s-tester/cloudwatch-agent/go.mod
+++ b/k8s-tester/cloudwatch-agent/go.mod
@@ -1,6 +1,6 @@
module github.com/aws/aws-k8s-tester/k8s-tester/cloudwatch-agent
-go 1.16
+go 1.17
require (
github.com/aws/aws-k8s-tester/client v0.0.0-00010101000000-000000000000
@@ -8,7 +8,7 @@ require (
github.com/aws/aws-k8s-tester/utils v0.0.0-00010101000000-000000000000
github.com/manifoldco/promptui v0.8.0
github.com/spf13/cobra v1.1.3
- go.uber.org/zap v1.17.0
+ go.uber.org/zap v1.19.1
k8s.io/api v0.21.1
k8s.io/apimachinery v0.21.1
k8s.io/utils v0.0.0-20210527160623-6fdb442a123b
@@ -16,7 +16,6 @@ require (
replace (
github.com/aws/aws-k8s-tester/client => ../../client
- github.com/aws/aws-k8s-tester/k8s-tester/helm => ../helm
github.com/aws/aws-k8s-tester/k8s-tester/tester => ../tester
github.com/aws/aws-k8s-tester/utils => ../../utils
)
diff --git a/k8s-tester/cloudwatch-agent/go.sum b/k8s-tester/cloudwatch-agent/go.sum
index c9a6c607e..21a63d461 100644
--- a/k8s-tester/cloudwatch-agent/go.sum
+++ b/k8s-tester/cloudwatch-agent/go.sum
@@ -69,6 +69,8 @@ github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN
github.com/aws/aws-sdk-go v1.38.50 h1:9+dEpZbgjBMeoOes6QfZMC87uDMwM8Lw4E79L0/rPZI=
github.com/aws/aws-sdk-go v1.38.50/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
+github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
+github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
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/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
@@ -134,6 +136,7 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv
github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
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/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
@@ -261,6 +264,7 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
+github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
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=
@@ -364,9 +368,11 @@ github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6
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=
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw=
github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
+github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME=
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis=
@@ -476,6 +482,7 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
go.etcd.io/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/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
@@ -493,6 +500,8 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.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/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4=
+go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
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.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
@@ -500,8 +509,8 @@ go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9i
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
-go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U=
-go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
+go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI=
+go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
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-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
@@ -544,6 +553,7 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -581,8 +591,9 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20210224082022-3d97a244fca7 h1:OgUuv8lsRpBibGNbSizVwKWlysjaNzmC9gYMhPVfqFM=
golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -600,6 +611,7 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -647,8 +659,10 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w
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-20210309074719-68d13333faf2 h1:46ULzRKLh1CwgRq2dC5SlBzEqqNCi8rreOZnNrbqcIY=
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE=
@@ -719,6 +733,7 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
+golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -816,6 +831,7 @@ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8X
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/cheggaaa/pb.v1 v1.0.25/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 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o=
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
@@ -824,6 +840,7 @@ gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
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=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
diff --git a/k8s-tester/clusterloader/go.mod b/k8s-tester/clusterloader/go.mod
index f3421c6fb..cae7ee5ab 100644
--- a/k8s-tester/clusterloader/go.mod
+++ b/k8s-tester/clusterloader/go.mod
@@ -1,6 +1,6 @@
module github.com/aws/aws-k8s-tester/k8s-tester/clusterloader
-go 1.16
+go 1.17
require (
github.com/aws/aws-k8s-tester/client v0.0.0-00010101000000-000000000000
@@ -10,13 +10,12 @@ require (
github.com/manifoldco/promptui v0.8.0
github.com/mholt/archiver/v3 v3.5.0
github.com/spf13/cobra v1.1.3
- go.uber.org/zap v1.17.0
+ go.uber.org/zap v1.19.1
k8s.io/utils v0.0.0-20210527160623-6fdb442a123b
)
replace (
github.com/aws/aws-k8s-tester/client => ../../client
- github.com/aws/aws-k8s-tester/k8s-tester/helm => ../helm
github.com/aws/aws-k8s-tester/k8s-tester/tester => ../tester
github.com/aws/aws-k8s-tester/utils => ../../utils
)
diff --git a/k8s-tester/clusterloader/go.sum b/k8s-tester/clusterloader/go.sum
index a06cb9cc1..8becc38b6 100644
--- a/k8s-tester/clusterloader/go.sum
+++ b/k8s-tester/clusterloader/go.sum
@@ -71,6 +71,8 @@ github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN
github.com/aws/aws-sdk-go v1.38.50 h1:9+dEpZbgjBMeoOes6QfZMC87uDMwM8Lw4E79L0/rPZI=
github.com/aws/aws-sdk-go v1.38.50/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
+github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
+github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
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/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
@@ -139,6 +141,7 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv
github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
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/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
@@ -268,6 +271,7 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
+github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
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=
@@ -381,9 +385,11 @@ github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6
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=
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw=
github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
+github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME=
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis=
@@ -501,6 +507,7 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
go.etcd.io/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/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
@@ -518,6 +525,8 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.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/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4=
+go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
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.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
@@ -525,8 +534,8 @@ go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9i
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
-go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U=
-go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
+go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI=
+go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
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-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
@@ -569,6 +578,7 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -606,8 +616,9 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20210224082022-3d97a244fca7 h1:OgUuv8lsRpBibGNbSizVwKWlysjaNzmC9gYMhPVfqFM=
golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -625,6 +636,7 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -672,8 +684,10 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w
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-20210309074719-68d13333faf2 h1:46ULzRKLh1CwgRq2dC5SlBzEqqNCi8rreOZnNrbqcIY=
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE=
@@ -744,6 +758,7 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
+golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -841,6 +856,7 @@ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8X
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/cheggaaa/pb.v1 v1.0.25/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 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o=
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
@@ -849,6 +865,7 @@ gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
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=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
diff --git a/k8s-tester/cmd/k8s-tester/go.mod b/k8s-tester/cmd/k8s-tester/go.mod
index f2bda28de..68fa86076 100644
--- a/k8s-tester/cmd/k8s-tester/go.mod
+++ b/k8s-tester/cmd/k8s-tester/go.mod
@@ -1,13 +1,195 @@
module github.com/aws/aws-k8s-tester/k8s-tester/cmd/k8s-tester
-go 1.16
+go 1.17
require (
github.com/aws/aws-k8s-tester/k8s-tester v0.0.0-00010101000000-000000000000
- github.com/aws/aws-k8s-tester/utils v0.0.0-20210610170531-2e5d31e5196c
+ github.com/aws/aws-k8s-tester/utils v0.0.0-00010101000000-000000000000
github.com/spf13/cobra v1.1.3
)
+require (
+ github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect
+ github.com/BurntSushi/toml v0.3.1 // indirect
+ github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd // indirect
+ github.com/Masterminds/goutils v1.1.1 // indirect
+ github.com/Masterminds/semver/v3 v3.1.1 // indirect
+ github.com/Masterminds/sprig/v3 v3.2.2 // indirect
+ github.com/Masterminds/squirrel v1.5.0 // indirect
+ github.com/Microsoft/go-winio v0.4.16 // indirect
+ github.com/Microsoft/hcsshim v0.8.14 // indirect
+ github.com/PuerkitoBio/purell v1.1.1 // indirect
+ github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
+ github.com/andybalholm/brotli v1.0.0 // indirect
+ github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 // indirect
+ github.com/aws/aws-k8s-tester/client v0.0.0-00010101000000-000000000000 // indirect
+ github.com/aws/aws-k8s-tester/k8s-tester/cloudwatch-agent v0.0.0-00010101000000-000000000000 // indirect
+ github.com/aws/aws-k8s-tester/k8s-tester/clusterloader v0.0.0-00010101000000-000000000000 // indirect
+ github.com/aws/aws-k8s-tester/k8s-tester/cni v0.0.0-00010101000000-000000000000 // indirect
+ github.com/aws/aws-k8s-tester/k8s-tester/configmaps v0.0.0-00010101000000-000000000000 // indirect
+ github.com/aws/aws-k8s-tester/k8s-tester/conformance v0.0.0-00010101000000-000000000000 // indirect
+ github.com/aws/aws-k8s-tester/k8s-tester/csi-ebs v0.0.0-00010101000000-000000000000 // indirect
+ github.com/aws/aws-k8s-tester/k8s-tester/csrs v0.0.0-00010101000000-000000000000 // indirect
+ github.com/aws/aws-k8s-tester/k8s-tester/falco v0.0.0-00010101000000-000000000000 // indirect
+ github.com/aws/aws-k8s-tester/k8s-tester/fluent-bit v0.0.0-00010101000000-000000000000 // indirect
+ github.com/aws/aws-k8s-tester/k8s-tester/helm v0.0.0-00010101000000-000000000000 // indirect
+ github.com/aws/aws-k8s-tester/k8s-tester/jobs-echo v0.0.0-00010101000000-000000000000 // indirect
+ github.com/aws/aws-k8s-tester/k8s-tester/jobs-pi v0.0.0-00010101000000-000000000000 // indirect
+ github.com/aws/aws-k8s-tester/k8s-tester/kubernetes-dashboard v0.0.0-00010101000000-000000000000 // indirect
+ github.com/aws/aws-k8s-tester/k8s-tester/metrics-server v0.0.0-00010101000000-000000000000 // indirect
+ github.com/aws/aws-k8s-tester/k8s-tester/nlb-guestbook v0.0.0-00010101000000-000000000000 // indirect
+ github.com/aws/aws-k8s-tester/k8s-tester/nlb-hello-world v0.0.0-00010101000000-000000000000 // indirect
+ github.com/aws/aws-k8s-tester/k8s-tester/php-apache v0.0.0-00010101000000-000000000000 // indirect
+ github.com/aws/aws-k8s-tester/k8s-tester/secrets v0.0.0-00010101000000-000000000000 // indirect
+ github.com/aws/aws-k8s-tester/k8s-tester/stress v0.0.0-00010101000000-000000000000 // indirect
+ github.com/aws/aws-k8s-tester/k8s-tester/tester v0.0.0-00010101000000-000000000000 // indirect
+ github.com/aws/aws-k8s-tester/k8s-tester/wordpress v0.0.0-00010101000000-000000000000 // indirect
+ github.com/aws/aws-sdk-go v1.38.50 // indirect
+ github.com/beorn7/perks v1.0.1 // indirect
+ github.com/briandowns/spinner v1.13.0 // indirect
+ github.com/cespare/xxhash/v2 v2.1.1 // indirect
+ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect
+ github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59 // indirect
+ github.com/containerd/containerd v1.4.4 // indirect
+ github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7 // indirect
+ github.com/cyphar/filepath-securejoin v0.2.2 // indirect
+ github.com/davecgh/go-spew v1.1.1 // indirect
+ github.com/deislabs/oras v0.11.1 // indirect
+ github.com/docker/cli v20.10.5+incompatible // indirect
+ github.com/docker/distribution v2.7.1+incompatible // indirect
+ github.com/docker/docker v17.12.0-ce-rc1.0.20200618181300-9dc6525e6118+incompatible // indirect
+ github.com/docker/docker-credential-helpers v0.6.3 // indirect
+ github.com/docker/go-connections v0.4.0 // indirect
+ github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916 // indirect
+ github.com/docker/go-units v0.4.0 // indirect
+ github.com/dsnet/compress v0.0.1 // indirect
+ github.com/dustin/go-humanize v1.0.0 // indirect
+ github.com/evanphx/json-patch v4.9.0+incompatible // indirect
+ github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect
+ github.com/fatih/color v1.7.0 // indirect
+ github.com/fsnotify/fsnotify v1.4.9 // indirect
+ github.com/go-errors/errors v1.0.1 // indirect
+ github.com/go-logr/logr v0.4.0 // indirect
+ github.com/go-openapi/jsonpointer v0.19.3 // indirect
+ github.com/go-openapi/jsonreference v0.19.3 // indirect
+ github.com/go-openapi/spec v0.19.5 // indirect
+ github.com/go-openapi/swag v0.19.5 // indirect
+ github.com/gobwas/glob v0.2.3 // indirect
+ github.com/gofrs/flock v0.8.0 // indirect
+ github.com/gogo/protobuf v1.3.2 // indirect
+ github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
+ github.com/golang/protobuf v1.4.3 // indirect
+ github.com/golang/snappy v0.0.1 // indirect
+ github.com/google/btree v1.0.0 // indirect
+ github.com/google/go-cmp v0.5.4 // indirect
+ github.com/google/gofuzz v1.1.0 // indirect
+ github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
+ github.com/google/uuid v1.1.2 // indirect
+ github.com/googleapis/gnostic v0.4.1 // indirect
+ github.com/gorilla/mux v1.7.3 // indirect
+ github.com/gosuri/uitable v0.0.4 // indirect
+ github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 // indirect
+ github.com/hashicorp/golang-lru v0.5.1 // indirect
+ github.com/huandu/xstrings v1.3.1 // indirect
+ github.com/imdario/mergo v0.3.11 // indirect
+ github.com/inconshreveable/mousetrap v1.0.0 // indirect
+ github.com/jmespath/go-jmespath v0.4.0 // indirect
+ github.com/jmoiron/sqlx v1.3.1 // indirect
+ github.com/json-iterator/go v1.1.10 // indirect
+ github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a // indirect
+ github.com/klauspost/compress v1.10.10 // indirect
+ github.com/klauspost/pgzip v1.2.4 // indirect
+ github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
+ github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
+ github.com/lib/pq v1.10.0 // indirect
+ github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
+ github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a // indirect
+ github.com/mailru/easyjson v0.7.0 // indirect
+ github.com/manifoldco/promptui v0.8.0 // indirect
+ github.com/mattn/go-colorable v0.1.2 // indirect
+ github.com/mattn/go-isatty v0.0.8 // indirect
+ github.com/mattn/go-runewidth v0.0.9 // indirect
+ github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
+ github.com/mholt/archiver/v3 v3.5.0 // indirect
+ github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
+ github.com/mitchellh/copystructure v1.1.1 // indirect
+ github.com/mitchellh/go-wordwrap v1.0.0 // indirect
+ github.com/mitchellh/ioprogress v0.0.0-20180201004757-6a23b12fa88e // indirect
+ github.com/mitchellh/reflectwalk v1.0.1 // indirect
+ github.com/moby/spdystream v0.2.0 // indirect
+ github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 // indirect
+ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
+ github.com/modern-go/reflect2 v1.0.1 // indirect
+ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
+ github.com/morikuni/aec v1.0.0 // indirect
+ github.com/nwaples/rardecode v1.1.0 // indirect
+ github.com/nxadm/tail v1.4.8 // indirect
+ github.com/olekukonko/tablewriter v0.0.5 // indirect
+ github.com/onsi/ginkgo v1.16.2 // indirect
+ github.com/opencontainers/go-digest v1.0.0 // indirect
+ github.com/opencontainers/image-spec v1.0.1 // indirect
+ github.com/opencontainers/runc v0.1.1 // indirect
+ github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
+ github.com/pierrec/lz4/v4 v4.0.3 // indirect
+ github.com/pkg/errors v0.9.1 // indirect
+ github.com/pmezard/go-difflib v1.0.0 // indirect
+ github.com/prometheus/client_golang v1.10.0 // indirect
+ github.com/prometheus/client_model v0.2.0 // indirect
+ github.com/prometheus/common v0.18.0 // indirect
+ github.com/prometheus/procfs v0.6.0 // indirect
+ github.com/rubenv/sql-migrate v0.0.0-20200616145509-8d140a17f351 // indirect
+ github.com/russross/blackfriday v1.5.2 // indirect
+ github.com/shopspring/decimal v1.2.0 // indirect
+ github.com/sirupsen/logrus v1.8.1 // indirect
+ github.com/spf13/cast v1.3.1 // indirect
+ github.com/spf13/pflag v1.0.5 // indirect
+ github.com/stretchr/testify v1.7.0 // indirect
+ github.com/ulikunitz/xz v0.5.7 // indirect
+ github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
+ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
+ github.com/xeipuuv/gojsonschema v1.2.0 // indirect
+ github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
+ github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca // indirect
+ go.opencensus.io v0.22.4 // indirect
+ go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect
+ go.uber.org/atomic v1.7.0 // indirect
+ go.uber.org/multierr v1.6.0 // indirect
+ go.uber.org/zap v1.19.1 // indirect
+ golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 // indirect
+ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 // indirect
+ golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c // indirect
+ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
+ golang.org/x/sys v0.0.0-20210510120138-977fb7262007 // indirect
+ golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect
+ golang.org/x/text v0.3.4 // indirect
+ golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect
+ google.golang.org/appengine v1.6.6 // indirect
+ google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a // indirect
+ google.golang.org/grpc v1.31.0 // indirect
+ google.golang.org/protobuf v1.25.0 // indirect
+ gopkg.in/gorp.v1 v1.7.2 // indirect
+ gopkg.in/inf.v0 v0.9.1 // indirect
+ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
+ gopkg.in/yaml.v2 v2.4.0 // indirect
+ gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
+ helm.sh/helm/v3 v3.6.3 // indirect
+ k8s.io/api v0.21.1 // indirect
+ k8s.io/apiextensions-apiserver v0.21.1 // indirect
+ k8s.io/apimachinery v0.21.2 // indirect
+ k8s.io/apiserver v0.21.1 // indirect
+ k8s.io/cli-runtime v0.21.1 // indirect
+ k8s.io/client-go v0.21.1 // indirect
+ k8s.io/component-base v0.21.1 // indirect
+ k8s.io/klog/v2 v2.8.0 // indirect
+ k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 // indirect
+ k8s.io/kubectl v0.21.0 // indirect
+ k8s.io/utils v0.0.0-20210527160623-6fdb442a123b // indirect
+ sigs.k8s.io/kustomize/api v0.8.8 // indirect
+ sigs.k8s.io/kustomize/kyaml v0.10.17 // indirect
+ sigs.k8s.io/structured-merge-diff/v4 v4.1.0 // indirect
+ sigs.k8s.io/yaml v1.2.0 // indirect
+)
+
replace (
github.com/aws/aws-k8s-tester/client => ../../../client
github.com/aws/aws-k8s-tester/k8s-tester => ../..
diff --git a/k8s-tester/cmd/k8s-tester/go.sum b/k8s-tester/cmd/k8s-tester/go.sum
index e31e232f6..5c56e19bb 100644
--- a/k8s-tester/cmd/k8s-tester/go.sum
+++ b/k8s-tester/cmd/k8s-tester/go.sum
@@ -106,6 +106,8 @@ github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN
github.com/aws/aws-sdk-go v1.38.50 h1:9+dEpZbgjBMeoOes6QfZMC87uDMwM8Lw4E79L0/rPZI=
github.com/aws/aws-sdk-go v1.38.50/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
+github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
+github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
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=
@@ -818,6 +820,7 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43 h1:+lm10QQTNSBd8DVTNGHx7o/IKu9HYDvLMffDhbyLccI=
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 h1:hlE8//ciYMztlGpl/VA+Zm1AcTPHYkHJPbHqE6WJUXE=
@@ -849,6 +852,8 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.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/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4=
+go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
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.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
@@ -856,8 +861,8 @@ go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9i
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
-go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U=
-go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
+go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI=
+go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
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-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
@@ -908,6 +913,7 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -1113,6 +1119,7 @@ golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc
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.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
+golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -1247,8 +1254,8 @@ gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81
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=
-helm.sh/helm/v3 v3.6.0 h1:/9IMxJ2lXJHbvTMHcW1AO71lXQHqDC+3bcpGp7yCsb8=
-helm.sh/helm/v3 v3.6.0/go.mod h1:mIIus8EOqj+obtycw3sidsR4ORr2aFDmXMSI3k+oeVY=
+helm.sh/helm/v3 v3.6.3 h1:0nKDyXJr23nI3JrcP7HH7NcR+CYRvro/52Dvr1KhGO0=
+helm.sh/helm/v3 v3.6.3/go.mod h1:mIIus8EOqj+obtycw3sidsR4ORr2aFDmXMSI3k+oeVY=
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
@@ -1258,9 +1265,8 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt
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=
k8s.io/api v0.21.0/go.mod h1:+YbrhBBGgsxbF6o6Kj4KJPJnBmAKuXDeS3E18bgHNVU=
+k8s.io/api v0.21.1 h1:94bbZ5NTjdINJEdzOkpS4vdPhkb1VFpTYC9zh43f75c=
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.21.0/go.mod h1:gsQGNtGkc/YoDG9loKI0V+oLZM4ljRPjc/sql5tmvzc=
k8s.io/apiextensions-apiserver v0.21.1 h1:AA+cnsb6w7SZ1vD32Z+zdgfXdXY8X9uGX5bN6EoPEIo=
k8s.io/apiextensions-apiserver v0.21.1/go.mod h1:KESQFCGjqVcVsZ9g0xX5bacMjyX5emuWcS2arzdEouA=
diff --git a/k8s-tester/cmd/readme-gen/go.mod b/k8s-tester/cmd/readme-gen/go.mod
index d80684697..b0a90f881 100644
--- a/k8s-tester/cmd/readme-gen/go.mod
+++ b/k8s-tester/cmd/readme-gen/go.mod
@@ -1,9 +1,11 @@
module github.com/aws/aws-k8s-tester/k8s-tester/cmd/readme-gen
-go 1.16
+go 1.17
require (
github.com/aws/aws-k8s-tester/k8s-tester v0.0.0-00010101000000-000000000000
+ github.com/aws/aws-k8s-tester/k8s-tester/aqua v0.0.0-00010101000000-000000000000
+ github.com/aws/aws-k8s-tester/k8s-tester/armory v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/cloudwatch-agent v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/clusterloader v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/cni v0.0.0-00010101000000-000000000000
@@ -11,25 +13,195 @@ require (
github.com/aws/aws-k8s-tester/k8s-tester/conformance v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/csi-ebs v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/csrs v0.0.0-00010101000000-000000000000
+ github.com/aws/aws-k8s-tester/k8s-tester/epsagon v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/falco v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/fluent-bit v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/jobs-echo v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/jobs-pi v0.0.0-00010101000000-000000000000
+ github.com/aws/aws-k8s-tester/k8s-tester/kubecost v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/kubernetes-dashboard v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/metrics-server v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/nlb-guestbook v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/nlb-hello-world v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/php-apache v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/secrets v0.0.0-00010101000000-000000000000
+ github.com/aws/aws-k8s-tester/k8s-tester/splunk v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/stress v0.0.0-00010101000000-000000000000
+ github.com/aws/aws-k8s-tester/k8s-tester/sysdig v0.0.0-00010101000000-000000000000
+ github.com/aws/aws-k8s-tester/k8s-tester/vault v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/wordpress v0.0.0-00010101000000-000000000000
- github.com/aws/aws-k8s-tester/utils v0.0.0-20210610170531-2e5d31e5196c
+ github.com/aws/aws-k8s-tester/utils v0.0.0-00010101000000-000000000000
github.com/olekukonko/tablewriter v0.0.5
)
+require (
+ github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect
+ github.com/BurntSushi/toml v0.3.1 // indirect
+ github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd // indirect
+ github.com/Masterminds/goutils v1.1.1 // indirect
+ github.com/Masterminds/semver/v3 v3.1.1 // indirect
+ github.com/Masterminds/sprig/v3 v3.2.2 // indirect
+ github.com/Masterminds/squirrel v1.5.0 // indirect
+ github.com/Microsoft/go-winio v0.4.16 // indirect
+ github.com/Microsoft/hcsshim v0.8.14 // indirect
+ github.com/PuerkitoBio/purell v1.1.1 // indirect
+ github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
+ github.com/andybalholm/brotli v1.0.0 // indirect
+ github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 // indirect
+ github.com/aws/aws-k8s-tester/client v0.0.0-00010101000000-000000000000 // indirect
+ github.com/aws/aws-k8s-tester/k8s-tester/helm v0.0.0-00010101000000-000000000000 // indirect
+ github.com/aws/aws-k8s-tester/k8s-tester/tester v0.0.0-00010101000000-000000000000 // indirect
+ github.com/aws/aws-sdk-go v1.38.50 // indirect
+ github.com/beorn7/perks v1.0.1 // indirect
+ github.com/briandowns/spinner v1.13.0 // indirect
+ github.com/cespare/xxhash/v2 v2.1.1 // indirect
+ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect
+ github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59 // indirect
+ github.com/containerd/containerd v1.4.4 // indirect
+ github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7 // indirect
+ github.com/cyphar/filepath-securejoin v0.2.2 // indirect
+ github.com/davecgh/go-spew v1.1.1 // indirect
+ github.com/deislabs/oras v0.11.1 // indirect
+ github.com/docker/cli v20.10.5+incompatible // indirect
+ github.com/docker/distribution v2.7.1+incompatible // indirect
+ github.com/docker/docker v17.12.0-ce-rc1.0.20200618181300-9dc6525e6118+incompatible // indirect
+ github.com/docker/docker-credential-helpers v0.6.3 // indirect
+ github.com/docker/go-connections v0.4.0 // indirect
+ github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916 // indirect
+ github.com/docker/go-units v0.4.0 // indirect
+ github.com/dsnet/compress v0.0.1 // indirect
+ github.com/dustin/go-humanize v1.0.0 // indirect
+ github.com/evanphx/json-patch v4.9.0+incompatible // indirect
+ github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect
+ github.com/fatih/color v1.7.0 // indirect
+ github.com/fsnotify/fsnotify v1.4.9 // indirect
+ github.com/go-errors/errors v1.0.1 // indirect
+ github.com/go-logr/logr v0.4.0 // indirect
+ github.com/go-openapi/jsonpointer v0.19.3 // indirect
+ github.com/go-openapi/jsonreference v0.19.3 // indirect
+ github.com/go-openapi/spec v0.19.5 // indirect
+ github.com/go-openapi/swag v0.19.5 // indirect
+ github.com/gobwas/glob v0.2.3 // indirect
+ github.com/gofrs/flock v0.8.0 // indirect
+ github.com/gogo/protobuf v1.3.2 // indirect
+ github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
+ github.com/golang/protobuf v1.5.2 // indirect
+ github.com/golang/snappy v0.0.1 // indirect
+ github.com/google/btree v1.0.0 // indirect
+ github.com/google/go-cmp v0.5.5 // indirect
+ github.com/google/gofuzz v1.1.0 // indirect
+ github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
+ github.com/google/uuid v1.1.2 // indirect
+ github.com/googleapis/gnostic v0.4.1 // indirect
+ github.com/gorilla/mux v1.7.3 // indirect
+ github.com/gosuri/uitable v0.0.4 // indirect
+ github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 // indirect
+ github.com/hashicorp/golang-lru v0.5.1 // indirect
+ github.com/huandu/xstrings v1.3.1 // indirect
+ github.com/imdario/mergo v0.3.11 // indirect
+ github.com/inconshreveable/mousetrap v1.0.0 // indirect
+ github.com/jmespath/go-jmespath v0.4.0 // indirect
+ github.com/jmoiron/sqlx v1.3.1 // indirect
+ github.com/json-iterator/go v1.1.11 // indirect
+ github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a // indirect
+ github.com/klauspost/compress v1.10.10 // indirect
+ github.com/klauspost/pgzip v1.2.4 // indirect
+ github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
+ github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
+ github.com/lib/pq v1.10.0 // indirect
+ github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
+ github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a // indirect
+ github.com/mailru/easyjson v0.7.0 // indirect
+ github.com/manifoldco/promptui v0.8.0 // indirect
+ github.com/mattn/go-colorable v0.1.2 // indirect
+ github.com/mattn/go-isatty v0.0.8 // indirect
+ github.com/mattn/go-runewidth v0.0.9 // indirect
+ github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
+ github.com/mholt/archiver/v3 v3.5.0 // indirect
+ github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
+ github.com/mitchellh/copystructure v1.1.1 // indirect
+ github.com/mitchellh/go-wordwrap v1.0.0 // indirect
+ github.com/mitchellh/ioprogress v0.0.0-20180201004757-6a23b12fa88e // indirect
+ github.com/mitchellh/reflectwalk v1.0.1 // indirect
+ github.com/moby/spdystream v0.2.0 // indirect
+ github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 // indirect
+ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
+ github.com/modern-go/reflect2 v1.0.1 // indirect
+ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
+ github.com/morikuni/aec v1.0.0 // indirect
+ github.com/nwaples/rardecode v1.1.0 // indirect
+ github.com/nxadm/tail v1.4.8 // indirect
+ github.com/onsi/ginkgo v1.16.2 // indirect
+ github.com/opencontainers/go-digest v1.0.0 // indirect
+ github.com/opencontainers/image-spec v1.0.1 // indirect
+ github.com/opencontainers/runc v0.1.1 // indirect
+ github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
+ github.com/pierrec/lz4/v4 v4.0.3 // indirect
+ github.com/pkg/errors v0.9.1 // indirect
+ github.com/pmezard/go-difflib v1.0.0 // indirect
+ github.com/prometheus/client_golang v1.10.0 // indirect
+ github.com/prometheus/client_model v0.2.0 // indirect
+ github.com/prometheus/common v0.18.0 // indirect
+ github.com/prometheus/procfs v0.6.0 // indirect
+ github.com/rubenv/sql-migrate v0.0.0-20200616145509-8d140a17f351 // indirect
+ github.com/russross/blackfriday v1.5.2 // indirect
+ github.com/shopspring/decimal v1.2.0 // indirect
+ github.com/sirupsen/logrus v1.8.1 // indirect
+ github.com/spf13/cast v1.3.1 // indirect
+ github.com/spf13/cobra v1.2.1 // indirect
+ github.com/spf13/pflag v1.0.5 // indirect
+ github.com/stretchr/testify v1.7.0 // indirect
+ github.com/ulikunitz/xz v0.5.7 // indirect
+ github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
+ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
+ github.com/xeipuuv/gojsonschema v1.2.0 // indirect
+ github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
+ github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca // indirect
+ go.opencensus.io v0.23.0 // indirect
+ go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect
+ go.uber.org/atomic v1.7.0 // indirect
+ go.uber.org/multierr v1.6.0 // indirect
+ go.uber.org/zap v1.19.1 // indirect
+ golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 // indirect
+ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 // indirect
+ golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c // indirect
+ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
+ golang.org/x/sys v0.0.0-20210510120138-977fb7262007 // indirect
+ golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect
+ golang.org/x/text v0.3.5 // indirect
+ golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect
+ google.golang.org/appengine v1.6.7 // indirect
+ google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c // indirect
+ google.golang.org/grpc v1.38.0 // indirect
+ google.golang.org/protobuf v1.26.0 // indirect
+ gopkg.in/gorp.v1 v1.7.2 // indirect
+ gopkg.in/inf.v0 v0.9.1 // indirect
+ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
+ gopkg.in/yaml.v2 v2.4.0 // indirect
+ gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
+ helm.sh/helm/v3 v3.6.3 // indirect
+ k8s.io/api v0.21.1 // indirect
+ k8s.io/apiextensions-apiserver v0.21.1 // indirect
+ k8s.io/apimachinery v0.21.2 // indirect
+ k8s.io/apiserver v0.21.1 // indirect
+ k8s.io/cli-runtime v0.21.1 // indirect
+ k8s.io/client-go v0.21.1 // indirect
+ k8s.io/component-base v0.21.1 // indirect
+ k8s.io/klog/v2 v2.8.0 // indirect
+ k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 // indirect
+ k8s.io/kubectl v0.21.0 // indirect
+ k8s.io/utils v0.0.0-20210802155522-efc7438f0176 // indirect
+ sigs.k8s.io/kustomize/api v0.8.8 // indirect
+ sigs.k8s.io/kustomize/kyaml v0.10.17 // indirect
+ sigs.k8s.io/structured-merge-diff/v4 v4.1.0 // indirect
+ sigs.k8s.io/yaml v1.2.0 // indirect
+)
+
replace (
github.com/aws/aws-k8s-tester/client => ../../../client
github.com/aws/aws-k8s-tester/k8s-tester => ../..
+ github.com/aws/aws-k8s-tester/k8s-tester/aqua => ../../aqua
+ github.com/aws/aws-k8s-tester/k8s-tester/armory => ../../armory
github.com/aws/aws-k8s-tester/k8s-tester/cloudwatch-agent => ../../cloudwatch-agent
github.com/aws/aws-k8s-tester/k8s-tester/clusterloader => ../../clusterloader
github.com/aws/aws-k8s-tester/k8s-tester/cni => ../../cni
@@ -37,19 +209,24 @@ replace (
github.com/aws/aws-k8s-tester/k8s-tester/conformance => ../../conformance
github.com/aws/aws-k8s-tester/k8s-tester/csi-ebs => ../../csi-ebs
github.com/aws/aws-k8s-tester/k8s-tester/csrs => ../../csrs
+ github.com/aws/aws-k8s-tester/k8s-tester/epsagon => ../../epsagon
github.com/aws/aws-k8s-tester/k8s-tester/falco => ../../falco
github.com/aws/aws-k8s-tester/k8s-tester/fluent-bit => ../../fluent-bit
github.com/aws/aws-k8s-tester/k8s-tester/helm => ../../helm
github.com/aws/aws-k8s-tester/k8s-tester/jobs-echo => ../../jobs-echo
github.com/aws/aws-k8s-tester/k8s-tester/jobs-pi => ../../jobs-pi
+ github.com/aws/aws-k8s-tester/k8s-tester/kubecost => ../../kubecost
github.com/aws/aws-k8s-tester/k8s-tester/kubernetes-dashboard => ../../kubernetes-dashboard
github.com/aws/aws-k8s-tester/k8s-tester/metrics-server => ../../metrics-server
github.com/aws/aws-k8s-tester/k8s-tester/nlb-guestbook => ../../nlb-guestbook
github.com/aws/aws-k8s-tester/k8s-tester/nlb-hello-world => ../../nlb-hello-world
github.com/aws/aws-k8s-tester/k8s-tester/php-apache => ../../php-apache
github.com/aws/aws-k8s-tester/k8s-tester/secrets => ../../secrets
+ github.com/aws/aws-k8s-tester/k8s-tester/splunk => ../../splunk
github.com/aws/aws-k8s-tester/k8s-tester/stress => ../../stress
+ github.com/aws/aws-k8s-tester/k8s-tester/sysdig => ../../sysdig
github.com/aws/aws-k8s-tester/k8s-tester/tester => ../../tester
+ github.com/aws/aws-k8s-tester/k8s-tester/vault => ../../vault
github.com/aws/aws-k8s-tester/k8s-tester/wordpress => ../../wordpress
github.com/aws/aws-k8s-tester/utils => ../../../utils
)
diff --git a/k8s-tester/cmd/readme-gen/go.sum b/k8s-tester/cmd/readme-gen/go.sum
index e31e232f6..4c3d6d93f 100644
--- a/k8s-tester/cmd/readme-gen/go.sum
+++ b/k8s-tester/cmd/readme-gen/go.sum
@@ -14,6 +14,11 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV
cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs=
cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc=
cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY=
+cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI=
+cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk=
+cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg=
+cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8=
+cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0=
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
@@ -89,6 +94,7 @@ github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk5
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8=
github.com/andybalholm/brotli v1.0.0 h1:7UCwP93aiSfvWpapti8g88vVVGp2qqtGyePsSuDafo4=
github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y=
+github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
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/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
@@ -106,6 +112,8 @@ github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN
github.com/aws/aws-sdk-go v1.38.50 h1:9+dEpZbgjBMeoOes6QfZMC87uDMwM8Lw4E79L0/rPZI=
github.com/aws/aws-sdk-go v1.38.50/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
+github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
+github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
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=
@@ -114,6 +122,7 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
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/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM=
github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4=
github.com/briandowns/spinner v1.13.0 h1:q/Y9LtpwtvL0CRzXrAMj0keVXqNhBYUFg6tBOUiY8ek=
@@ -144,6 +153,8 @@ github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3/go.mod h1:MA5e5Lr8slmE
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/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
+github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
+github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=
github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59 h1:qWj4qVYZ95vLWwqyNJCQg7rDsG5wPdze0UaPolH7DUk=
@@ -169,6 +180,7 @@ github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee
github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk=
+github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
@@ -229,6 +241,9 @@ github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4s
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
+github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po=
+github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
+github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/evanphx/json-patch v4.9.0+incompatible h1:kLcOMZeuLAJvL2BPWLMIj5oaZQobrkAqrL+WFZwQses=
@@ -330,6 +345,7 @@ github.com/gobuffalo/packr/v2 v2.7.1/go.mod h1:qYEvAazPaVxy7Y7KR0W8qYEE+RymX74kE
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/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
+github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/godror/godror v0.13.3/go.mod h1:2ouUT4kdhUBk7TAkHWD4SN0CdI0pgEQbo8FVHhbSKWg=
github.com/gofrs/flock v0.8.0 h1:MSdYClljsF3PbENUUEx85nkWfJSGfzYI9yEBZOJz6CY=
github.com/gofrs/flock v0.8.0/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU=
@@ -355,6 +371,7 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt
github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
+github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
@@ -368,8 +385,11 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
-github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM=
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
+github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
+github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM=
+github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
+github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4=
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
@@ -385,13 +405,16 @@ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M=
+github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
+github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g=
github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
+github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
@@ -399,6 +422,10 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf
github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
+github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
+github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
+github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
+github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4=
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ=
@@ -430,6 +457,7 @@ github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
+github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q=
github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE=
github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
@@ -459,6 +487,7 @@ github.com/huandu/xstrings v1.3.1 h1:4jgBlKK6tLKFvO8u5pmYjG91cqytmDCDvGh7ECVFfFs
github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
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/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
github.com/imdario/mergo v0.3.11 h1:3tnifQM4i+fbajXKBHXWEH+KvNHqojZ778UH75j3bGA=
github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
@@ -481,8 +510,9 @@ github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
-github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68=
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
+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/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
@@ -503,6 +533,7 @@ github.com/klauspost/pgzip v1.2.4/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQ
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
+github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
@@ -528,6 +559,7 @@ github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a/go.mod h1:pHhQN
github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ=
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
+github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
@@ -578,6 +610,7 @@ github.com/mitchellh/ioprogress v0.0.0-20180201004757-6a23b12fa88e h1:Qa6dnn8Dla
github.com/mitchellh/ioprogress v0.0.0-20180201004757-6a23b12fa88e/go.mod h1:waEya8ee1Ro/lgxpVhkJI4BVASzkm3UZqkx/cFJiYHM=
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
+github.com/mitchellh/mapstructure v1.4.1/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/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
github.com/mitchellh/reflectwalk v1.0.1 h1:FVzMWA5RllMAKIdUSC8mdWo3XtwoecrH79BY70sEEpE=
@@ -662,6 +695,7 @@ github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIw
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
+github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
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=
@@ -677,6 +711,7 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
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/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
@@ -720,6 +755,7 @@ github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
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.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.3.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
@@ -755,6 +791,7 @@ github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJ
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
+github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I=
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=
@@ -763,9 +800,11 @@ github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3
github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU=
github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE=
github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI=
-github.com/spf13/cobra v1.1.3 h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M=
github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo=
+github.com/spf13/cobra v1.2.1 h1:+KmjbUw1hriSNMF55oPrkZcb27aECyrj8V2ytv7kWDw=
+github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk=
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
+github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
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=
@@ -775,6 +814,7 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An
github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s=
github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE=
github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg=
+github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns=
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=
@@ -818,6 +858,7 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43 h1:+lm10QQTNSBd8DVTNGHx7o/IKu9HYDvLMffDhbyLccI=
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 h1:hlE8//ciYMztlGpl/VA+Zm1AcTPHYkHJPbHqE6WJUXE=
@@ -831,6 +872,9 @@ go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg=
go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg=
+go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs=
+go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=
+go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ=
go.mongodb.org/mongo-driver v1.0.3/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=
@@ -840,8 +884,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/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
+go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M=
+go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
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 v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
@@ -849,6 +895,8 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.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/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4=
+go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
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.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
@@ -856,8 +904,9 @@ go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9i
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
-go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U=
go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
+go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI=
+go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
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-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
@@ -870,6 +919,7 @@ golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8U
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-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
@@ -899,6 +949,8 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl
golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
+golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
+golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
@@ -908,6 +960,9 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -950,8 +1005,13 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-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-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
@@ -959,6 +1019,13 @@ golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4Iltr
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
+golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c h1:pkQiBZBvdos9qq4wBAHqlzuZHEXo07pqV06ef90u1WI=
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -1026,15 +1093,22 @@ golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-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-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
@@ -1047,8 +1121,9 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc=
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ=
+golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@@ -1110,9 +1185,16 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY
golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
+golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE=
+golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
+golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
+golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -1136,14 +1218,21 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M
google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM=
google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc=
+google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg=
+google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE=
+google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8=
+google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU=
+google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94=
+google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.2.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.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 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc=
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-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
@@ -1169,14 +1258,26 @@ google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfG
google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
+google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a h1:pOwg4OoaRYScjmR4LlLgdtnyoHYTSAVhhqe5uPdpII8=
+google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A=
+google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c h1:wtujag7C+4D6KMoulW9YauvK2lgdvCMS260jsqqBXr0=
+google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
@@ -1194,8 +1295,16 @@ google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8
google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
-google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI=
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
+google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
+google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
+google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
+google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8=
+google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
+google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
+google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
+google.golang.org/grpc v1.38.0 h1:/9BgsAsa5nWe26HqOlvlgJnqBuktYOLCgjCPqsa56W0=
+google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
@@ -1205,8 +1314,10 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
-google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c=
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
+google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
+google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk=
+google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
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=
@@ -1223,6 +1334,7 @@ gopkg.in/gorp.v1 v1.7.2/go.mod h1:Wo3h+DBQZIxATwftsglhdD/62zRFPhGhTiu5jUJmCaw=
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
+gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
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=
@@ -1232,6 +1344,7 @@ gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRN
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
@@ -1247,8 +1360,8 @@ gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81
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=
-helm.sh/helm/v3 v3.6.0 h1:/9IMxJ2lXJHbvTMHcW1AO71lXQHqDC+3bcpGp7yCsb8=
-helm.sh/helm/v3 v3.6.0/go.mod h1:mIIus8EOqj+obtycw3sidsR4ORr2aFDmXMSI3k+oeVY=
+helm.sh/helm/v3 v3.6.3 h1:0nKDyXJr23nI3JrcP7HH7NcR+CYRvro/52Dvr1KhGO0=
+helm.sh/helm/v3 v3.6.3/go.mod h1:mIIus8EOqj+obtycw3sidsR4ORr2aFDmXMSI3k+oeVY=
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
@@ -1258,9 +1371,8 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt
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=
k8s.io/api v0.21.0/go.mod h1:+YbrhBBGgsxbF6o6Kj4KJPJnBmAKuXDeS3E18bgHNVU=
+k8s.io/api v0.21.1 h1:94bbZ5NTjdINJEdzOkpS4vdPhkb1VFpTYC9zh43f75c=
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.21.0/go.mod h1:gsQGNtGkc/YoDG9loKI0V+oLZM4ljRPjc/sql5tmvzc=
k8s.io/apiextensions-apiserver v0.21.1 h1:AA+cnsb6w7SZ1vD32Z+zdgfXdXY8X9uGX5bN6EoPEIo=
k8s.io/apiextensions-apiserver v0.21.1/go.mod h1:KESQFCGjqVcVsZ9g0xX5bacMjyX5emuWcS2arzdEouA=
@@ -1295,8 +1407,10 @@ k8s.io/kubectl v0.21.0 h1:WZXlnG/yjcE4LWO2g6ULjFxtzK6H1TKzsfaBFuVIhNg=
k8s.io/kubectl v0.21.0/go.mod h1:EU37NukZRXn1TpAkMUoy8Z/B2u6wjHDS4aInsDzVvks=
k8s.io/metrics v0.21.0/go.mod h1:L3Ji9EGPP1YBbfm9sPfEXSpnj8i24bfQbAFAsW0NueQ=
k8s.io/utils v0.0.0-20201110183641-67b214c5f920/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=
+k8s.io/utils v0.0.0-20210722164352-7f3ee0f31471/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
+k8s.io/utils v0.0.0-20210802155522-efc7438f0176 h1:Mx0aa+SUAcNRQbs5jUzV8lkDlGFU8laZsY9jrcVX5SY=
+k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/letsencrypt v0.0.3 h1:H7xDfhkaFFSYEJlKeq38RwX2jYcnTeHuDQyT+mMNMwM=
rsc.io/letsencrypt v0.0.3/go.mod h1:buyQKZ6IXrRnB7TdkHP0RyEybLx18HHyOSoTyoOLqNY=
diff --git a/k8s-tester/cmd/readme-gen/main.go b/k8s-tester/cmd/readme-gen/main.go
index 7fa29e117..96f3215bf 100644
--- a/k8s-tester/cmd/readme-gen/main.go
+++ b/k8s-tester/cmd/readme-gen/main.go
@@ -12,6 +12,8 @@ import (
"strings"
k8s_tester "github.com/aws/aws-k8s-tester/k8s-tester"
+ "github.com/aws/aws-k8s-tester/k8s-tester/aqua"
+ "github.com/aws/aws-k8s-tester/k8s-tester/armory"
cloudwatch_agent "github.com/aws/aws-k8s-tester/k8s-tester/cloudwatch-agent"
"github.com/aws/aws-k8s-tester/k8s-tester/clusterloader"
"github.com/aws/aws-k8s-tester/k8s-tester/cni"
@@ -19,18 +21,23 @@ import (
"github.com/aws/aws-k8s-tester/k8s-tester/conformance"
csi_ebs "github.com/aws/aws-k8s-tester/k8s-tester/csi-ebs"
"github.com/aws/aws-k8s-tester/k8s-tester/csrs"
+ "github.com/aws/aws-k8s-tester/k8s-tester/epsagon"
"github.com/aws/aws-k8s-tester/k8s-tester/falco"
fluent_bit "github.com/aws/aws-k8s-tester/k8s-tester/fluent-bit"
jobs_echo "github.com/aws/aws-k8s-tester/k8s-tester/jobs-echo"
jobs_pi "github.com/aws/aws-k8s-tester/k8s-tester/jobs-pi"
+ "github.com/aws/aws-k8s-tester/k8s-tester/kubecost"
kubernetes_dashboard "github.com/aws/aws-k8s-tester/k8s-tester/kubernetes-dashboard"
metrics_server "github.com/aws/aws-k8s-tester/k8s-tester/metrics-server"
nlb_guestbook "github.com/aws/aws-k8s-tester/k8s-tester/nlb-guestbook"
nlb_hello_world "github.com/aws/aws-k8s-tester/k8s-tester/nlb-hello-world"
php_apache "github.com/aws/aws-k8s-tester/k8s-tester/php-apache"
"github.com/aws/aws-k8s-tester/k8s-tester/secrets"
+ "github.com/aws/aws-k8s-tester/k8s-tester/splunk"
"github.com/aws/aws-k8s-tester/k8s-tester/stress"
stress_in_cluster "github.com/aws/aws-k8s-tester/k8s-tester/stress/in-cluster"
+ "github.com/aws/aws-k8s-tester/k8s-tester/sysdig"
+ "github.com/aws/aws-k8s-tester/k8s-tester/vault"
"github.com/aws/aws-k8s-tester/k8s-tester/wordpress"
aws_v1_ecr "github.com/aws/aws-k8s-tester/utils/aws/v1/ecr"
"github.com/olekukonko/tablewriter"
@@ -82,6 +89,10 @@ func createDoc() string {
b.WriteString(es.writeDoc(k8s_tester.ENV_PREFIX+metrics_server.Env()+"_", &metrics_server.Config{}))
totalTestCases++
+ b.WriteByte('\n')
+ b.WriteString(es.writeDoc(k8s_tester.ENV_PREFIX+kubecost.Env()+"_", &kubecost.Config{}))
+ totalTestCases++
+
b.WriteByte('\n')
b.WriteString(es.writeDoc(k8s_tester.ENV_PREFIX+cni.Env()+"_", &cni.Config{}))
totalTestCases++
@@ -120,6 +131,10 @@ func createDoc() string {
b.WriteString(es.writeDoc(k8s_tester.ENV_PREFIX+wordpress.Env()+"_", &wordpress.Config{}))
totalTestCases++
+ b.WriteByte('\n')
+ b.WriteString(es.writeDoc(k8s_tester.ENV_PREFIX+vault.Env()+"_", &vault.Config{}))
+ totalTestCases++
+
b.WriteByte('\n')
b.WriteString(es.writeDoc(k8s_tester.ENV_PREFIX+jobs_pi.Env()+"_", &jobs_pi.Config{}))
totalTestCases++
@@ -170,6 +185,26 @@ func createDoc() string {
b.WriteString(es.writeDoc(k8s_tester.ENV_PREFIX+stress_in_cluster.EnvK8sTesterStressCLIBusyboxRepository()+"_", &aws_v1_ecr.Repository{}))
totalTestCases++
+ b.WriteByte('\n')
+ b.WriteString(es.writeDoc(k8s_tester.ENV_PREFIX+aqua.Env()+"_", &aqua.Config{}))
+ totalTestCases++
+
+ b.WriteByte('\n')
+ b.WriteString(es.writeDoc(k8s_tester.ENV_PREFIX+armory.Env()+"_", &armory.Config{}))
+ totalTestCases++
+
+ b.WriteByte('\n')
+ b.WriteString(es.writeDoc(k8s_tester.ENV_PREFIX+epsagon.Env()+"_", &epsagon.Config{}))
+ totalTestCases++
+
+ b.WriteByte('\n')
+ b.WriteString(es.writeDoc(k8s_tester.ENV_PREFIX+sysdig.Env()+"_", &sysdig.Config{}))
+ totalTestCases++
+
+ b.WriteByte('\n')
+ b.WriteString(es.writeDoc(k8s_tester.ENV_PREFIX+splunk.Env()+"_", &splunk.Config{}))
+ totalTestCases++
+
return header + fmt.Sprintf("\n\nTotal %d test cases!\n\n", totalTestCases) + "```\n" + b.String() + "```\n"
}
diff --git a/k8s-tester/cni/go.mod b/k8s-tester/cni/go.mod
index 9969e547d..1c2ffef6c 100644
--- a/k8s-tester/cni/go.mod
+++ b/k8s-tester/cni/go.mod
@@ -1,23 +1,69 @@
module github.com/aws/aws-k8s-tester/k8s-tester/cni
-go 1.16
+go 1.17
require (
github.com/aws/aws-k8s-tester/client v0.0.0-00010101000000-000000000000
- github.com/aws/aws-k8s-tester/k8s-tester/helm v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/tester v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/utils v0.0.0-00010101000000-000000000000
github.com/manifoldco/promptui v0.8.0
github.com/spf13/cobra v1.1.3
- go.uber.org/zap v1.17.0
- k8s.io/api v0.21.2
+ go.uber.org/zap v1.19.1
k8s.io/apimachinery v0.21.2
- k8s.io/utils v0.0.0-20210527160623-6fdb442a123b
+)
+
+require (
+ github.com/aws/aws-sdk-go v1.38.50 // indirect
+ github.com/briandowns/spinner v1.13.0 // indirect
+ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect
+ github.com/davecgh/go-spew v1.1.1 // indirect
+ github.com/dustin/go-humanize v1.0.0 // indirect
+ github.com/fatih/color v1.7.0 // indirect
+ github.com/go-logr/logr v0.4.0 // indirect
+ github.com/gogo/protobuf v1.3.2 // indirect
+ github.com/golang/protobuf v1.4.3 // indirect
+ github.com/google/go-cmp v0.5.4 // indirect
+ github.com/google/gofuzz v1.1.0 // indirect
+ github.com/googleapis/gnostic v0.4.1 // indirect
+ github.com/hpcloud/tail v1.0.0 // indirect
+ github.com/imdario/mergo v0.3.5 // indirect
+ github.com/inconshreveable/mousetrap v1.0.0 // indirect
+ github.com/jmespath/go-jmespath v0.4.0 // indirect
+ github.com/json-iterator/go v1.1.10 // indirect
+ github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a // indirect
+ github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a // indirect
+ github.com/mattn/go-colorable v0.1.2 // indirect
+ github.com/mattn/go-isatty v0.0.8 // indirect
+ github.com/mitchellh/ioprogress v0.0.0-20180201004757-6a23b12fa88e // indirect
+ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
+ github.com/modern-go/reflect2 v1.0.1 // indirect
+ github.com/onsi/ginkgo v1.11.0 // indirect
+ github.com/spf13/pflag v1.0.5 // indirect
+ go.uber.org/atomic v1.7.0 // indirect
+ go.uber.org/multierr v1.6.0 // indirect
+ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 // indirect
+ golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c // indirect
+ golang.org/x/sys v0.0.0-20210510120138-977fb7262007 // indirect
+ golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect
+ golang.org/x/text v0.3.4 // indirect
+ golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect
+ google.golang.org/appengine v1.6.6 // indirect
+ google.golang.org/protobuf v1.25.0 // indirect
+ gopkg.in/fsnotify.v1 v1.4.7 // indirect
+ gopkg.in/inf.v0 v0.9.1 // indirect
+ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
+ gopkg.in/yaml.v2 v2.4.0 // indirect
+ k8s.io/api v0.21.1 // indirect
+ k8s.io/apiextensions-apiserver v0.21.1 // indirect
+ k8s.io/client-go v0.21.1 // indirect
+ k8s.io/klog/v2 v2.8.0 // indirect
+ k8s.io/utils v0.0.0-20210527160623-6fdb442a123b // indirect
+ sigs.k8s.io/structured-merge-diff/v4 v4.1.0 // indirect
+ sigs.k8s.io/yaml v1.2.0 // indirect
)
replace (
github.com/aws/aws-k8s-tester/client => ../../client
- github.com/aws/aws-k8s-tester/k8s-tester/helm => ../helm
github.com/aws/aws-k8s-tester/k8s-tester/tester => ../tester
github.com/aws/aws-k8s-tester/utils => ../../utils
-)
\ No newline at end of file
+)
diff --git a/k8s-tester/cni/go.sum b/k8s-tester/cni/go.sum
index fdaff91ce..22609afda 100644
--- a/k8s-tester/cni/go.sum
+++ b/k8s-tester/cni/go.sum
@@ -1,4 +1,3 @@
-bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8=
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
@@ -33,10 +32,7 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl
cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
-github.com/Azure/azure-sdk-for-go v16.2.1+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 v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw=
github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A=
@@ -44,170 +40,80 @@ github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSY
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/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8=
github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU=
-github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
-github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60=
-github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
-github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd h1:sjQovDkwrZp8u+gxLtPgKGjk5hCxuy2hrRejBTA9xFU=
-github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E=
-github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI=
-github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=
-github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc=
-github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
-github.com/Masterminds/sprig/v3 v3.2.2 h1:17jRggJu518dr3QaafizSXOjKYp94wKfABxUmyxvxX8=
-github.com/Masterminds/sprig/v3 v3.2.2/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk=
-github.com/Masterminds/squirrel v1.5.0 h1:JukIZisrUXadA9pl3rMkjhiamxiB0cXiu+HGp/Y8cY8=
-github.com/Masterminds/squirrel v1.5.0/go.mod h1:NNaOrjSoIDfDA40n7sr2tPNZRfjzjA400rg+riTZj10=
-github.com/Masterminds/vcs v1.13.1/go.mod h1:N09YCmOQr6RLxC6UNHzuVwAdodYbbnycGHSmwVJjcKA=
-github.com/Microsoft/go-winio v0.4.16-0.20201130162521-d1ffc52c7331/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0=
-github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk=
-github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0=
-github.com/Microsoft/hcsshim v0.8.14 h1:lbPVK25c1cu5xTLITwpUcxoA9vKrKErASPYygvouJns=
-github.com/Microsoft/hcsshim v0.8.14/go.mod h1:NtVKoYxQuTLx6gEq0L96c9Ju4JbRJ4nY2ow3VK6a9Lg=
github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
-github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
-github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI=
github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
-github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M=
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
-github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d h1:UrqY+r/OJnIp5u0s1SbQ8dVfLCZJsnvazdBP5hS4iRs=
-github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ=
github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g=
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c=
-github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
-github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8=
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/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
-github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/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-20200428143746-21a406dcc535 h1:4daAzAu0S6Vi7/lbWECcX0j45yZReDZ56BQsrVBOEEY=
-github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg=
github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU=
-github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0=
github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/aws/aws-sdk-go v1.38.50 h1:9+dEpZbgjBMeoOes6QfZMC87uDMwM8Lw4E79L0/rPZI=
github.com/aws/aws-sdk-go v1.38.50/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
-github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
+github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
+github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
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=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
-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.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
-github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4=
github.com/briandowns/spinner v1.13.0 h1:q/Y9LtpwtvL0CRzXrAMj0keVXqNhBYUFg6tBOUiY8ek=
github.com/briandowns/spinner v1.13.0/go.mod h1:QOuQk7x+EaDASo80FEXwlwiA+j/PPIcX3FScO+3/ZPQ=
-github.com/bshuster-repo/logrus-logstash-hook v0.4.1 h1:pgAtgj+A31JBVtEHu2uHuEx0n+2ukqUJnS2vVe5pQNA=
-github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk=
-github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd h1:rFt+Y/IK1aEZkEHchZRSq9OQbsSzIT/OrI8YFFmRIng=
-github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8=
-github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b h1:otBG+dV+YK+Soembjv71DPz3uX/V/6MMlSyD9JBQ6kQ=
-github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50=
-github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0 h1:nvj0OLI3YqYXer/kZD8Ri1aaunCxIEsOst1BVJswV0o=
-github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE=
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.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
-github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
-github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
-github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5/go.mod h1:/iP1qXHoty45bqomnu2LM+VVyAEdWN+vtSHGlQgyxbw=
github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 h1:q763qf9huN11kDQavWsoZXJNW3xEE4JJyHa5Q25/sd8=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
-github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3/go.mod h1:MA5e5Lr8slmEg9bt0VpxxWqJlO4iwu3FBdHUzV7wQVg=
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/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=
-github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59 h1:qWj4qVYZ95vLWwqyNJCQg7rDsG5wPdze0UaPolH7DUk=
-github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59/go.mod h1:pA0z1pT8KYB3TCXK/ocprsh7MAkoW8bZVzPdih9snmM=
-github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw=
-github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
-github.com/containerd/containerd v1.4.4 h1:rtRG4N6Ct7GNssATwgpvMGfnjnwfjnu/Zs9W3Ikzq+M=
-github.com/containerd/containerd v1.4.4/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-20201208142359-180525291bb7 h1:6ejg6Lkk8dskcM7wQ28gONkukbQkM4qpj4RnYbpFzrI=
-github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7/go.mod h1:kR3BEg7bDFaEddKm54WSmrol1fKWDU1nKYkgrcgZT7Y=
-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/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
-github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
-github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk=
github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc=
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
-github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk=
github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
-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 h1:jCwT2GTP+PY5nBz3c/YL5PAIbusElVrPujOBSCj8xRg=
-github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4=
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/daviddengcn/go-colortext v0.0.0-20160507010035-511bcaf42ccd/go.mod h1:dv4zxwHi5C/8AeI+4gX4dCWOIvNi7I6JCSX0HvlKPgE=
-github.com/deislabs/oras v0.11.1 h1:oo2J/3vXdcti8cjFi8ghMOkx0OacONxHC8dhJ17NdJ0=
-github.com/deislabs/oras v0.11.1/go.mod h1:39lCtf8Q6WDC7ul9cnyWXONNzKvabEKk+AX+L0ImnQk=
-github.com/denisenkom/go-mssqldb v0.0.0-20191001013358-cfbb681360f0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
-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/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/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E=
-github.com/docker/cli v20.10.5+incompatible h1:bjflayQbWg+xOkF2WPEAOi4Y7zWhR7ptoPhV/VqLVDE=
-github.com/docker/cli v20.10.5+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
-github.com/docker/distribution v0.0.0-20191216044856-a8371794149d/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY=
-github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug=
-github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
-github.com/docker/docker v17.12.0-ce-rc1.0.20200618181300-9dc6525e6118+incompatible h1:iWPIG7pWIsCwT6ZtHnTUpoVMnete7O/pzd9HFE3+tn8=
-github.com/docker/docker v17.12.0-ce-rc1.0.20200618181300-9dc6525e6118+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
-github.com/docker/docker-credential-helpers v0.6.3 h1:zI2p9+1NQYdnG6sMU26EX4aVGlqbInSQxQXLvzJ4RPQ=
-github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y=
-github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=
-github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
-github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916 h1:yWHOI+vFjEsAakUTSrtqc/SAHrhSkmn48pqjidZX3QA=
-github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI=
-github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
-github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw=
-github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
-github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1 h1:ZClxb8laGDf5arXfYcAtECDFgAgHklGI8CxgjHnXKJ4=
-github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE=
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
@@ -216,7 +122,6 @@ github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5m
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 v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
-github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153 h1:yUdfgN0XgIJw7foRItutHYUIhlcKzcSf5vDpdhQAKTc=
github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
@@ -225,31 +130,18 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
-github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
-github.com/evanphx/json-patch v4.9.0+incompatible h1:kLcOMZeuLAJvL2BPWLMIj5oaZQobrkAqrL+WFZwQses=
github.com/evanphx/json-patch v4.9.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/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc=
github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
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/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
-github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
-github.com/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0=
-github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7 h1:LofdAjjjqCSXMwLGgOgnE+rdPuvX9DxCqaHwKy7i/ko=
-github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
-github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q=
-github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q=
-github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w=
-github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=
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=
@@ -260,86 +152,27 @@ github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7
github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=
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-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.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.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU=
-github.com/go-openapi/errors v0.17.0/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/jsonpointer v0.17.0/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/jsonreference v0.17.0/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.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc=
-github.com/go-openapi/jsonreference v0.19.3 h1:5cxNfTy0UVC3X8JL5ymxzyoUZmo8iZb+jeTWn7tUa8o=
github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8=
-github.com/go-openapi/loads v0.17.0/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.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCsn0N0ZrQsk=
-github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA=
-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/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI=
-github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI=
-github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY=
github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo=
-github.com/go-openapi/spec v0.19.5 h1:Xm0Ao53uqnk9QE/LlYV5DEU09UAgpliA85QoT9LzqPw=
github.com/go-openapi/spec v0.19.5/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk=
-github.com/go-openapi/strfmt v0.17.0/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.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU=
-github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk=
-github.com/go-openapi/swag v0.17.0/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.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY=
github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
-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.8/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4=
github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
-github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
-github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs=
-github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
-github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI=
-github.com/gobuffalo/envy v1.7.1 h1:OQl5ys5MBea7OGCdvPbBJWRgnhC/fGona6QKfvFeau8=
-github.com/gobuffalo/envy v1.7.1/go.mod h1:FurDp9+EDPE4aIUS3ZLyD+7/9fpx7YRt/ukY6jIHf0w=
-github.com/gobuffalo/here v0.6.0/go.mod h1:wAG085dHOYqUpf+Ap+WOdrPTp5IYcDAs/x7PLa8Y5fM=
-github.com/gobuffalo/logger v1.0.1 h1:ZEgyRGgAm4ZAhAO45YXMs5Fp+bzGLESFewzAVBMKuTg=
-github.com/gobuffalo/logger v1.0.1/go.mod h1:2zbswyIUa45I+c+FLXuWl9zSWEiVuthsk8ze5s8JvPs=
-github.com/gobuffalo/packd v0.3.0 h1:eMwymTkA1uXsqxS0Tpoop3Lc0u3kTfiMBE6nKtQU4g4=
-github.com/gobuffalo/packd v0.3.0/go.mod h1:zC7QkmNkYVGKPw4tHpBQ+ml7W/3tIebgeo1b36chA3Q=
-github.com/gobuffalo/packr/v2 v2.7.1 h1:n3CIW5T17T8v4GGK5sWXLVWJhCz7b5aNLSxW6gYim4o=
-github.com/gobuffalo/packr/v2 v2.7.1/go.mod h1:qYEvAazPaVxy7Y7KR0W8qYEE+RymX74kETFqjFoFlOc=
-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/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
-github.com/godror/godror v0.13.3/go.mod h1:2ouUT4kdhUBk7TAkHWD4SN0CdI0pgEQbo8FVHhbSKWg=
-github.com/gofrs/flock v0.8.0 h1:MSdYClljsF3PbENUUEx85nkWfJSGfzYI9yEBZOJz6CY=
-github.com/gofrs/flock v0.8.0/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU=
github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
-github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
-github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
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-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-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
-github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY=
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
@@ -364,9 +197,7 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw
github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM=
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
-github.com/golangplus/testing v0.0.0-20180327235837-af21d9c3145e/go.mod h1:0AA//k/eakGydO4jKRoRL2j92ZKSzTgj9tclaCrvXHk=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
-github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
@@ -391,11 +222,8 @@ github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hf
github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
-github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4=
-github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ=
github.com/google/uuid v1.0.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/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
@@ -403,18 +231,10 @@ github.com/googleapis/gnostic v0.4.1 h1:DLJCy1n/vrD4HPjOvYcT8aYQXpPIzoRZONaYwyyc
github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
-github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33 h1:893HsJqtxp9z1SF76gg6hY70hRY1wVlTSnC/h1yUDCo=
-github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ=
github.com/gorilla/mux v1.6.2/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 h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw=
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/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
-github.com/gosuri/uitable v0.0.4 h1:IG2xLKRvErL3uhY6e1BylFzG+aJiwQviDDTfOKeKTpY=
-github.com/gosuri/uitable v0.0.4/go.mod h1:tKR86bXuXPZazfOTG1FIzvjIdXzd0mo4Vtn16vt0PJo=
-github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 h1:pdN6V1QBWetyv/0+wjACpqVH+eVULgEjkurDLq3goeM=
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
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/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
@@ -438,7 +258,6 @@ github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b
github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
-github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
@@ -447,27 +266,18 @@ github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2p
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
-github.com/huandu/xstrings v1.3.1 h1:4jgBlKK6tLKFvO8u5pmYjG91cqytmDCDvGh7ECVFfFs=
-github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
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.3.5 h1:JboBksRwiiAJWvIYJVo46AfV+IAIKZpfrSzVKj42R4Q=
github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
-github.com/imdario/mergo v0.3.11 h1:3tnifQM4i+fbajXKBHXWEH+KvNHqojZ778UH75j3bGA=
-github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo=
-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.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8=
github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
-github.com/jmoiron/sqlx v1.3.1 h1:aLN7YINNZ7cYOPK3QC83dbM6KT0NMqVMw961TqrejlE=
-github.com/jmoiron/sqlx v1.3.1/go.mod h1:2BljVx/86SuTyjE+aPYlHCTNvZrnJXghYGpNiXLBMCQ=
-github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc=
-github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg=
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
@@ -483,11 +293,9 @@ github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a/go.mod h1:UJSiEoRfvx
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
-github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
-github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
@@ -497,33 +305,17 @@ github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
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/lann/builder v0.0.0-20180802200727-47ae307949d0 h1:SOEGU9fKiNWd/HOJuq6+3iTQz8KNCLtVX6idSoTLdUw=
-github.com/lann/builder v0.0.0-20180802200727-47ae307949d0/go.mod h1:dXGbAdH5GtBTC4WfIxhKZfyBF/HBFgRZSWwZ9g/He9o=
-github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 h1:P6pPBnrTSX3DEVR4fDembhRWSsG5rVo6hYhAB/ADZrk=
-github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0/go.mod h1:vmVJ0l/dxyfGW6FmdpVm2joNMFikkuWg0EoCKLGUMNw=
-github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
-github.com/lib/pq v1.10.0 h1:Zx5DJFEYQXio93kgXnQ09fXNiUKsqv4OUEu2UtGcB1E=
-github.com/lib/pq v1.10.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
-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.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4=
-github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc=
github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a h1:weJVJJRzAJBFRlAiJQROKQs8oC9vOxvm4rZmBBk0ONw=
github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI=
github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ=
-github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
-github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
-github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
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 h1:aizVhC/NAAcKWb+5QsU1iNOZb4Yws5UO2I+aIprQITM=
github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs=
github.com/manifoldco/promptui v0.8.0 h1:R95mMF+McvXZQ7j1g8ucVZE1gLP3Sv6j9vlF9kyRqQo=
github.com/manifoldco/promptui v0.8.0/go.mod h1:n4zTdgP0vr0S3w7/O/g98U+e0gwLScEXGwov2nIKuGQ=
-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/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=
@@ -531,42 +323,22 @@ github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNx
github.com/mattn/go-isatty v0.0.4/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/mattn/go-oci8 v0.0.7/go.mod h1:wjDx6Xm9q7dFtHJvIlrI99JytznLw5wQ4R+9mNXJwGI=
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.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
-github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0=
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
-github.com/mattn/go-shellwords v1.0.11/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y=
-github.com/mattn/go-sqlite3 v1.12.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
-github.com/mattn/go-sqlite3 v1.14.6 h1:dNPt6NO46WmLVt2DLNpwczCmdV5boIZ6g/tlDrlRUbg=
-github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
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/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
-github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw=
-github.com/mitchellh/copystructure v1.1.1 h1:Bp6x9R1Wn16SIz3OfeDr0b7RnCG2OB66Y7PQyC/cvq4=
-github.com/mitchellh/copystructure v1.1.1/go.mod h1:EBArHfARyrSWO/+Wyr9zwEkc6XMFB9XyNgFNmRkZZU4=
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
-github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4=
-github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo=
github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg=
github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
github.com/mitchellh/ioprogress v0.0.0-20180201004757-6a23b12fa88e h1:Qa6dnn8DlasdXRnacluu8HzPts0S1I9zvvUPDbBnXFI=
github.com/mitchellh/ioprogress v0.0.0-20180201004757-6a23b12fa88e/go.mod h1:waEya8ee1Ro/lgxpVhkJI4BVASzkm3UZqkx/cFJiYHM=
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
-github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A=
-github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
-github.com/mitchellh/reflectwalk v1.0.1 h1:FVzMWA5RllMAKIdUSC8mdWo3XtwoecrH79BY70sEEpE=
-github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
-github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8=
github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c=
-github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 h1:rzf0wL0CHVc8CEsgyygG0Mn9CNCCPZqOPaz8RiiHYQk=
github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
@@ -574,10 +346,6 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ
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/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 v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
-github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
@@ -590,16 +358,12 @@ github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzE
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/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM=
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/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/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/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
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=
@@ -611,17 +375,6 @@ github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa
github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME=
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
-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/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
-github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
-github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
-github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI=
-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.1.1 h1:GlxAyO6x8rfZYN9Tt0Kti5a/cP41iuiO2yYT0IJGY8Y=
-github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
-github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
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=
@@ -635,10 +388,7 @@ github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FI
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
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/freeport v0.0.0-20180830031419-95f893ade6f2 h1:JhzVVoYvbOACxoUmOs6V/G4D5nPVUW73rKvXxP4XUJc=
-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/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
@@ -650,33 +400,26 @@ 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/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA=
-github.com/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs=
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.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.10.0 h1:/o0BDeWzLWXNZ+4q5gXltUvaMpJqckTa+jTNoB+z4cg=
github.com/prometheus/client_golang v1.10.0/go.mod h1:WJM3cc3yu7XKBKa/I8WeZm+V3eltZnBwfENSU7mdogU=
-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-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
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.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA=
github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
-github.com/prometheus/common v0.18.0 h1:WCVKW7aL6LEe1uryfI9dnEc2ZqNB1Fn0ok930v0iL1Y=
github.com/prometheus/common v0.18.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s=
-github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/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-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
@@ -684,40 +427,21 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT
github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=
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/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
-github.com/rogpeppe/go-internal v1.1.0/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.4.0 h1:LUa41nrWTQNGhzdsZ5lTnkwbNjj6rXTdazA1cSdjkOY=
-github.com/rogpeppe/go-internal v1.4.0/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
-github.com/rubenv/sql-migrate v0.0.0-20200616145509-8d140a17f351 h1:HXr/qUllAWv9riaI4zh2eXWKmCSDqVS/XH1MRHLKRwk=
-github.com/rubenv/sql-migrate v0.0.0-20200616145509-8d140a17f351/go.mod h1:DCgfY80j8GYL7MLEfvcpSFvjD0L5yZq/aZUJmhZklyg=
-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=
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E=
-github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
-github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
-github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
-github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
-github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ=
-github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
github.com/sirupsen/logrus v1.2.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.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
-github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
-github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
-github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY=
@@ -725,94 +449,59 @@ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasO
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
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.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
-github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU=
-github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE=
github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI=
github.com/spf13/cobra v1.1.3 h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M=
github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo=
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
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.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
-github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s=
-github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE=
github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg=
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 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48=
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
-github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
-github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
-github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc=
-github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
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/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw=
-github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c=
-github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
-github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0=
-github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
-github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74=
-github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
-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/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 h1:+lm10QQTNSBd8DVTNGHx7o/IKu9HYDvLMffDhbyLccI=
-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 h1:hlE8//ciYMztlGpl/VA+Zm1AcTPHYkHJPbHqE6WJUXE=
-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 h1:ERexzlUfuTvpE74urLSbIQW0Z/6hF9t8U4NsJLaioAY=
-github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg=
-github.com/ziutek/mymysql v1.5.4 h1:GB0qdRGsTwQSBVYuVShFBKaXSnSnYYC2d9knnE1LHFs=
-github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0=
+github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
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/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg=
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.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM=
-go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM=
go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
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.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 v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.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/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4=
+go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
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.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
@@ -820,26 +509,18 @@ go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9i
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
-go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U=
-go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
+go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI=
+go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
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-20181203042331-505ab145d0a9/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-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-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-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-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/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/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
@@ -872,10 +553,10 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-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-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -884,20 +565,16 @@ golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73r
golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-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-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-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=
golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/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-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
@@ -914,8 +591,9 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20210224082022-3d97a244fca7 h1:OgUuv8lsRpBibGNbSizVwKWlysjaNzmC9gYMhPVfqFM=
golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -932,8 +610,8 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20201207232520-09787c993a3a h1:DcqTD9SDLc+1P/r1EmRBwnVsrOwW+kk2vWf9n+1sGhs=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -942,34 +620,25 @@ golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5h
golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
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-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-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190515120540-06a5c4944438/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/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-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-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-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/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=
-golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -987,13 +656,14 @@ golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-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-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210426230700-d19ff857e887 h1:dXfMednGJh/SUUFjTLsWJz3P+TQt9qnR11GgeI3vWKs=
+golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE=
@@ -1014,9 +684,7 @@ golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxb
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
@@ -1027,13 +695,11 @@ golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBn
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-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-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-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191004055002-72853e10c5a3/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=
@@ -1068,12 +734,12 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
+golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0=
google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk=
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
@@ -1099,7 +765,6 @@ google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww
google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc=
google.golang.org/appengine v1.6.6/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-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
@@ -1130,9 +795,7 @@ google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7Fc
google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a h1:pOwg4OoaRYScjmR4LlLgdtnyoHYTSAVhhqe5uPdpII8=
google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM=
@@ -1149,7 +812,6 @@ google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8
google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
-google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI=
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
@@ -1164,7 +826,6 @@ google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
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=
@@ -1174,8 +835,6 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o=
-gopkg.in/gorp.v1 v1.7.2 h1:j3DWlAyGVv8whO7AcIWznQ2Yj7yJkn34B8s63GViAAw=
-gopkg.in/gorp.v1 v1.7.2/go.mod h1:Wo3h+DBQZIxATwftsglhdD/62zRFPhGhTiu5jUJmCaw=
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
@@ -1190,7 +849,6 @@ gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
@@ -1198,13 +856,8 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
-gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo=
-gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
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=
-helm.sh/helm/v3 v3.6.0 h1:/9IMxJ2lXJHbvTMHcW1AO71lXQHqDC+3bcpGp7yCsb8=
-helm.sh/helm/v3 v3.6.0/go.mod h1:mIIus8EOqj+obtycw3sidsR4ORr2aFDmXMSI3k+oeVY=
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
@@ -1213,60 +866,32 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh
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=
-k8s.io/api v0.21.0/go.mod h1:+YbrhBBGgsxbF6o6Kj4KJPJnBmAKuXDeS3E18bgHNVU=
+k8s.io/api v0.21.1 h1:94bbZ5NTjdINJEdzOkpS4vdPhkb1VFpTYC9zh43f75c=
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.21.0/go.mod h1:gsQGNtGkc/YoDG9loKI0V+oLZM4ljRPjc/sql5tmvzc=
k8s.io/apiextensions-apiserver v0.21.1 h1:AA+cnsb6w7SZ1vD32Z+zdgfXdXY8X9uGX5bN6EoPEIo=
k8s.io/apiextensions-apiserver v0.21.1/go.mod h1:KESQFCGjqVcVsZ9g0xX5bacMjyX5emuWcS2arzdEouA=
-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.21.0/go.mod h1:w2YSn4/WIwYuxG5zJmcqtRdtqgW/J2JRgFAqps3bBpg=
-k8s.io/apiserver v0.21.1 h1:wTRcid53IhxhbFt4KTrFSw8tAncfr01EP91lzfcygVg=
k8s.io/apiserver v0.21.1/go.mod h1:nLLYZvMWn35glJ4/FZRhzLG/3MPxAaZTgV4FJZdr+tY=
-k8s.io/cli-runtime v0.21.0/go.mod h1:XoaHP93mGPF37MkLbjGVYqg3S1MnsFdKtiA/RZzzxOo=
-k8s.io/cli-runtime v0.21.1 h1:Oj/iZxa7LLXrhzShaLNF4rFJEIEBTDHj0dJw4ra2vX4=
-k8s.io/cli-runtime v0.21.1/go.mod h1:TI9Bvl8lQWZB2KqE91QLCp9AZE4l29zNFnj/x4IX4Fw=
-k8s.io/client-go v0.21.0/go.mod h1:nNBytTF9qPFDEhoqgEPaarobC8QPae13bElIVHzIglA=
k8s.io/client-go v0.21.1 h1:bhblWYLZKUu+pm50plvQF8WpY6TXdRRtcS/K9WauOj4=
k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs=
-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/component-base v0.21.0/go.mod h1:qvtjz6X0USWXbgmbfXR+Agik4RZ3jv2Bgr5QnZzdPYw=
-k8s.io/component-base v0.21.1 h1:iLpj2btXbR326s/xNQWmPNGu0gaYSjzn7IN/5i28nQw=
k8s.io/component-base v0.21.1/go.mod h1:NgzFZ2qu4m1juby4TnrmpR8adRk6ka62YdH5DkIIyKA=
-k8s.io/component-helpers v0.21.0/go.mod h1:tezqefP7lxfvJyR+0a+6QtVrkZ/wIkyMLK4WcQ3Cj8U=
k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E=
k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=
k8s.io/klog/v2 v2.8.0 h1:Q3gmuM9hKEjefWFFYF0Mat+YyFJvsUyYuwyNNJ5C9Ts=
k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec=
-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/kubectl v0.21.0 h1:WZXlnG/yjcE4LWO2g6ULjFxtzK6H1TKzsfaBFuVIhNg=
-k8s.io/kubectl v0.21.0/go.mod h1:EU37NukZRXn1TpAkMUoy8Z/B2u6wjHDS4aInsDzVvks=
-k8s.io/metrics v0.21.0/go.mod h1:L3Ji9EGPP1YBbfm9sPfEXSpnj8i24bfQbAFAsW0NueQ=
k8s.io/utils v0.0.0-20201110183641-67b214c5f920/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=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
-rsc.io/letsencrypt v0.0.3 h1:H7xDfhkaFFSYEJlKeq38RwX2jYcnTeHuDQyT+mMNMwM=
-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.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg=
-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.9.7/go.mod h1:MvXCpHs77cfyxRmCNUQjIqCmZyYsbn5PyQpWiq44nW0=
-sigs.k8s.io/kustomize/kustomize/v4 v4.0.5/go.mod h1:C7rYla7sI8EnxHE/xEhRBSHMNfcL91fx0uKmUlUhrBk=
-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/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=
diff --git a/k8s-tester/config.go b/k8s-tester/config.go
index 1f71401ff..e61140bbe 100644
--- a/k8s-tester/config.go
+++ b/k8s-tester/config.go
@@ -16,6 +16,8 @@ import (
"time"
"github.com/aws/aws-k8s-tester/client"
+ "github.com/aws/aws-k8s-tester/k8s-tester/aqua"
+ "github.com/aws/aws-k8s-tester/k8s-tester/armory"
cloudwatch_agent "github.com/aws/aws-k8s-tester/k8s-tester/cloudwatch-agent"
"github.com/aws/aws-k8s-tester/k8s-tester/clusterloader"
cni "github.com/aws/aws-k8s-tester/k8s-tester/cni"
@@ -23,18 +25,23 @@ import (
"github.com/aws/aws-k8s-tester/k8s-tester/conformance"
csi_ebs "github.com/aws/aws-k8s-tester/k8s-tester/csi-ebs"
"github.com/aws/aws-k8s-tester/k8s-tester/csrs"
+ "github.com/aws/aws-k8s-tester/k8s-tester/epsagon"
falco "github.com/aws/aws-k8s-tester/k8s-tester/falco"
fluent_bit "github.com/aws/aws-k8s-tester/k8s-tester/fluent-bit"
jobs_echo "github.com/aws/aws-k8s-tester/k8s-tester/jobs-echo"
jobs_pi "github.com/aws/aws-k8s-tester/k8s-tester/jobs-pi"
+ "github.com/aws/aws-k8s-tester/k8s-tester/kubecost"
kubernetes_dashboard "github.com/aws/aws-k8s-tester/k8s-tester/kubernetes-dashboard"
metrics_server "github.com/aws/aws-k8s-tester/k8s-tester/metrics-server"
nlb_guestbook "github.com/aws/aws-k8s-tester/k8s-tester/nlb-guestbook"
nlb_hello_world "github.com/aws/aws-k8s-tester/k8s-tester/nlb-hello-world"
php_apache "github.com/aws/aws-k8s-tester/k8s-tester/php-apache"
"github.com/aws/aws-k8s-tester/k8s-tester/secrets"
+ "github.com/aws/aws-k8s-tester/k8s-tester/splunk"
"github.com/aws/aws-k8s-tester/k8s-tester/stress"
stress_in_cluster "github.com/aws/aws-k8s-tester/k8s-tester/stress/in-cluster"
+ "github.com/aws/aws-k8s-tester/k8s-tester/sysdig"
+ "github.com/aws/aws-k8s-tester/k8s-tester/vault"
"github.com/aws/aws-k8s-tester/k8s-tester/wordpress"
aws_v1_ecr "github.com/aws/aws-k8s-tester/utils/aws/v1/ecr"
"github.com/aws/aws-k8s-tester/utils/file"
@@ -130,6 +137,7 @@ type Config struct {
AddOnCloudwatchAgent *cloudwatch_agent.Config `json:"add_on_cloudwatch_agent"`
AddOnFluentBit *fluent_bit.Config `json:"add_on_fluent_bit"`
AddOnMetricsServer *metrics_server.Config `json:"add_on_metrics_server"`
+ AddOnKubecost *kubecost.Config `json:"add_on_kubecost"`
AddOnConformance *conformance.Config `json:"add_on_conformance"`
AddOnCNI *cni.Config `json:"add_on_cni"`
AddOnCSIEBS *csi_ebs.Config `json:"add_on_csi_ebs"`
@@ -139,6 +147,7 @@ type Config struct {
AddOnNLBGuestbook *nlb_guestbook.Config `json:"add_on_nlb_guestbook"`
AddOnNLBHelloWorld *nlb_hello_world.Config `json:"add_on_nlb_hello_world"`
AddOnWordpress *wordpress.Config `json:"add_on_wordpress"`
+ AddOnVault *vault.Config `json:"add_on_vault"`
AddOnJobsPi *jobs_pi.Config `json:"add_on_jobs_pi"`
AddOnJobsEcho *jobs_echo.Config `json:"add_on_jobs_echo"`
AddOnCronJobsEcho *jobs_echo.Config `json:"add_on_cron_jobs_echo"`
@@ -148,6 +157,11 @@ type Config struct {
AddOnClusterloader *clusterloader.Config `json:"add_on_clusterloader"`
AddOnStress *stress.Config `json:"add_on_stress"`
AddOnStressInCluster *stress_in_cluster.Config `json:"add_on_stress_in_cluster"`
+ AddOnAqua *aqua.Config `json:"add_on_aqua"`
+ AddOnArmory *armory.Config `json:"add_on_armory"`
+ AddOnEpsagon *epsagon.Config `json:"add_on_epsagon"`
+ AddOnSysdig *sysdig.Config `json:"add_on_sysdig"`
+ AddOnSplunk *splunk.Config `json:"add_on_splunk"`
}
const (
@@ -205,6 +219,7 @@ func NewDefault() *Config {
AddOnCloudwatchAgent: cloudwatch_agent.NewDefault(),
AddOnFluentBit: fluent_bit.NewDefault(),
AddOnMetricsServer: metrics_server.NewDefault(),
+ AddOnKubecost: kubecost.NewDefault(),
AddOnCNI: cni.NewDefault(),
AddOnConformance: conformance.NewDefault(),
AddOnCSIEBS: csi_ebs.NewDefault(),
@@ -214,6 +229,7 @@ func NewDefault() *Config {
AddOnNLBGuestbook: nlb_guestbook.NewDefault(),
AddOnNLBHelloWorld: nlb_hello_world.NewDefault(),
AddOnWordpress: wordpress.NewDefault(),
+ AddOnVault: vault.NewDefault(),
AddOnJobsPi: jobs_pi.NewDefault(),
AddOnJobsEcho: jobs_echo.NewDefault("Job"),
AddOnCronJobsEcho: jobs_echo.NewDefault("CronJob"),
@@ -223,6 +239,11 @@ func NewDefault() *Config {
AddOnClusterloader: clusterloader.NewDefault(),
AddOnStress: stress.NewDefault(),
AddOnStressInCluster: stress_in_cluster.NewDefault(),
+ AddOnAqua: aqua.NewDefault(),
+ AddOnArmory: armory.NewDefault(),
+ AddOnEpsagon: epsagon.NewDefault(),
+ AddOnSysdig: sysdig.NewDefault(),
+ AddOnSplunk: splunk.NewDefault(),
}
}
@@ -261,6 +282,11 @@ func (cfg *Config) ValidateAndSetDefaults() error {
return err
}
}
+ if cfg.AddOnKubecost != nil && cfg.AddOnKubecost.Enable {
+ if err := cfg.AddOnKubecost.ValidateAndSetDefaults(); err != nil {
+ return err
+ }
+ }
if cfg.AddOnCNI != nil && cfg.AddOnCNI.Enable {
if err := cfg.AddOnCNI.ValidateAndSetDefaults(); err != nil {
return err
@@ -306,6 +332,11 @@ func (cfg *Config) ValidateAndSetDefaults() error {
return err
}
}
+ if cfg.AddOnVault != nil && cfg.AddOnVault.Enable {
+ if err := cfg.AddOnVault.ValidateAndSetDefaults(); err != nil {
+ return err
+ }
+ }
if cfg.AddOnJobsPi != nil && cfg.AddOnJobsPi.Enable {
if err := cfg.AddOnJobsPi.ValidateAndSetDefaults(); err != nil {
return err
@@ -351,6 +382,31 @@ func (cfg *Config) ValidateAndSetDefaults() error {
return err
}
}
+ if cfg.AddOnAqua != nil && cfg.AddOnAqua.Enable {
+ if err := cfg.AddOnAqua.ValidateAndSetDefaults(); err != nil {
+ return err
+ }
+ }
+ if cfg.AddOnArmory != nil && cfg.AddOnArmory.Enable {
+ if err := cfg.AddOnArmory.ValidateAndSetDefaults(); err != nil {
+ return err
+ }
+ }
+ if cfg.AddOnEpsagon != nil && cfg.AddOnEpsagon.Enable {
+ if err := cfg.AddOnEpsagon.ValidateAndSetDefaults(); err != nil {
+ return err
+ }
+ }
+ if cfg.AddOnSysdig != nil && cfg.AddOnSysdig.Enable {
+ if err := cfg.AddOnSysdig.ValidateAndSetDefaults(); err != nil {
+ return err
+ }
+ }
+ if cfg.AddOnSplunk != nil && cfg.AddOnSplunk.Enable {
+ if err := cfg.AddOnSplunk.ValidateAndSetDefaults(); err != nil {
+ return err
+ }
+ }
return nil
}
@@ -536,6 +592,16 @@ func (cfg *Config) UpdateFromEnvs() (err error) {
return fmt.Errorf("expected *metrics_server.Config, got %T", vv)
}
+ vv, err = parseEnvs(ENV_PREFIX+kubecost.Env()+"_", cfg.AddOnKubecost)
+ if err != nil {
+ return err
+ }
+ if av, ok := vv.(*kubecost.Config); ok {
+ cfg.AddOnKubecost = av
+ } else {
+ return fmt.Errorf("expected *kubecost.Config, got %T", vv)
+ }
+
vv, err = parseEnvs(ENV_PREFIX+cni.Env()+"_", cfg.AddOnCNI)
if err != nil {
return err
@@ -576,6 +642,16 @@ func (cfg *Config) UpdateFromEnvs() (err error) {
return fmt.Errorf("expected *kubernetes_dashboard.Config, got %T", vv)
}
+ vv, err = parseEnvs(ENV_PREFIX+falco.Env()+"_", cfg.AddOnFalco)
+ if err != nil {
+ return err
+ }
+ if av, ok := vv.(*falco.Config); ok {
+ cfg.AddOnFalco = av
+ } else {
+ return fmt.Errorf("expected *falco.Config, got %T", vv)
+ }
+
vv, err = parseEnvs(ENV_PREFIX+php_apache.Env()+"_", cfg.AddOnPHPApache)
if err != nil {
return err
@@ -627,6 +703,16 @@ func (cfg *Config) UpdateFromEnvs() (err error) {
return fmt.Errorf("expected *wordpress.Config, got %T", vv)
}
+ vv, err = parseEnvs(ENV_PREFIX+vault.Env()+"_", cfg.AddOnVault)
+ if err != nil {
+ return err
+ }
+ if av, ok := vv.(*vault.Config); ok {
+ cfg.AddOnVault = av
+ } else {
+ return fmt.Errorf("expected *vault.Config, got %T", vv)
+ }
+
vv, err = parseEnvs(ENV_PREFIX+jobs_pi.Env()+"_", cfg.AddOnJobsPi)
if err != nil {
return err
@@ -792,14 +878,54 @@ func (cfg *Config) UpdateFromEnvs() (err error) {
}
}
- vv, err = parseEnvs(ENV_PREFIX+falco.Env()+"_", cfg.AddOnFalco)
+ vv, err = parseEnvs(ENV_PREFIX+aqua.Env()+"_", cfg.AddOnAqua)
if err != nil {
return err
}
- if av, ok := vv.(*falco.Config); ok {
- cfg.AddOnFalco = av
+ if av, ok := vv.(*aqua.Config); ok {
+ cfg.AddOnAqua = av
} else {
- return fmt.Errorf("expected *falco.Config, got %T", vv)
+ return fmt.Errorf("expected *aqua.Config, got %T", vv)
+ }
+
+ vv, err = parseEnvs(ENV_PREFIX+armory.Env()+"_", cfg.AddOnArmory)
+ if err != nil {
+ return err
+ }
+ if av, ok := vv.(*armory.Config); ok {
+ cfg.AddOnArmory = av
+ } else {
+ return fmt.Errorf("expected *armory.Config, got %T", vv)
+ }
+
+ vv, err = parseEnvs(ENV_PREFIX+epsagon.Env()+"_", cfg.AddOnEpsagon)
+ if err != nil {
+ return err
+ }
+ if av, ok := vv.(*epsagon.Config); ok {
+ cfg.AddOnEpsagon = av
+ } else {
+ return fmt.Errorf("expected *epsagon.Config, got %T", vv)
+ }
+
+ vv, err = parseEnvs(ENV_PREFIX+sysdig.Env()+"_", cfg.AddOnSysdig)
+ if err != nil {
+ return err
+ }
+ if av, ok := vv.(*sysdig.Config); ok {
+ cfg.AddOnSysdig = av
+ } else {
+ return fmt.Errorf("expected *sysdig.Config, got %T", vv)
+ }
+
+ vv, err = parseEnvs(ENV_PREFIX+splunk.Env()+"_", cfg.AddOnSplunk)
+ if err != nil {
+ return err
+ }
+ if av, ok := vv.(*splunk.Config); ok {
+ cfg.AddOnSplunk = av
+ } else {
+ return fmt.Errorf("expected *splunk.Config, got %T", vv)
}
return err
diff --git a/k8s-tester/configmaps/go.mod b/k8s-tester/configmaps/go.mod
index 5bb6ba4d6..ae1220be2 100644
--- a/k8s-tester/configmaps/go.mod
+++ b/k8s-tester/configmaps/go.mod
@@ -1,6 +1,6 @@
module github.com/aws/aws-k8s-tester/k8s-tester/configmaps
-go 1.16
+go 1.17
require (
github.com/aws/aws-k8s-tester/client v0.0.0-00010101000000-000000000000
@@ -9,14 +9,70 @@ require (
github.com/manifoldco/promptui v0.8.0
github.com/prometheus/client_golang v1.10.0
github.com/spf13/cobra v1.1.3
- go.uber.org/zap v1.17.0
+ go.uber.org/zap v1.19.1
k8s.io/api v0.21.1
k8s.io/apimachinery v0.21.1
)
+require (
+ github.com/aws/aws-sdk-go v1.38.50 // indirect
+ github.com/beorn7/perks v1.0.1 // indirect
+ github.com/briandowns/spinner v1.13.0 // indirect
+ github.com/cespare/xxhash/v2 v2.1.1 // indirect
+ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect
+ github.com/davecgh/go-spew v1.1.1 // indirect
+ github.com/dustin/go-humanize v1.0.0 // indirect
+ github.com/fatih/color v1.7.0 // indirect
+ github.com/go-logr/logr v0.4.0 // indirect
+ github.com/gogo/protobuf v1.3.2 // indirect
+ github.com/golang/protobuf v1.4.3 // indirect
+ github.com/google/go-cmp v0.5.4 // indirect
+ github.com/google/gofuzz v1.1.0 // indirect
+ github.com/googleapis/gnostic v0.4.1 // indirect
+ github.com/hpcloud/tail v1.0.0 // indirect
+ github.com/imdario/mergo v0.3.5 // indirect
+ github.com/inconshreveable/mousetrap v1.0.0 // indirect
+ github.com/jmespath/go-jmespath v0.4.0 // indirect
+ github.com/json-iterator/go v1.1.10 // indirect
+ github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a // indirect
+ github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a // indirect
+ github.com/mattn/go-colorable v0.1.2 // indirect
+ github.com/mattn/go-isatty v0.0.8 // indirect
+ github.com/mattn/go-runewidth v0.0.9 // indirect
+ github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
+ github.com/mitchellh/ioprogress v0.0.0-20180201004757-6a23b12fa88e // indirect
+ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
+ github.com/modern-go/reflect2 v1.0.1 // indirect
+ github.com/olekukonko/tablewriter v0.0.5 // indirect
+ github.com/onsi/ginkgo v1.11.0 // indirect
+ github.com/prometheus/client_model v0.2.0 // indirect
+ github.com/prometheus/common v0.18.0 // indirect
+ github.com/prometheus/procfs v0.6.0 // indirect
+ github.com/spf13/pflag v1.0.5 // indirect
+ go.uber.org/atomic v1.7.0 // indirect
+ go.uber.org/multierr v1.6.0 // indirect
+ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 // indirect
+ golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c // indirect
+ golang.org/x/sys v0.0.0-20210510120138-977fb7262007 // indirect
+ golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect
+ golang.org/x/text v0.3.4 // indirect
+ golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect
+ google.golang.org/appengine v1.6.6 // indirect
+ google.golang.org/protobuf v1.25.0 // indirect
+ gopkg.in/fsnotify.v1 v1.4.7 // indirect
+ gopkg.in/inf.v0 v0.9.1 // indirect
+ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
+ gopkg.in/yaml.v2 v2.4.0 // indirect
+ k8s.io/apiextensions-apiserver v0.21.1 // indirect
+ k8s.io/client-go v0.21.1 // indirect
+ k8s.io/klog/v2 v2.8.0 // indirect
+ k8s.io/utils v0.0.0-20210527160623-6fdb442a123b // indirect
+ sigs.k8s.io/structured-merge-diff/v4 v4.1.0 // indirect
+ sigs.k8s.io/yaml v1.2.0 // indirect
+)
+
replace (
github.com/aws/aws-k8s-tester/client => ../../client
- github.com/aws/aws-k8s-tester/k8s-tester/helm => ../helm
github.com/aws/aws-k8s-tester/k8s-tester/tester => ../tester
github.com/aws/aws-k8s-tester/utils => ../../utils
)
diff --git a/k8s-tester/configmaps/go.sum b/k8s-tester/configmaps/go.sum
index 04432946e..61808165e 100644
--- a/k8s-tester/configmaps/go.sum
+++ b/k8s-tester/configmaps/go.sum
@@ -69,6 +69,8 @@ github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN
github.com/aws/aws-sdk-go v1.38.50 h1:9+dEpZbgjBMeoOes6QfZMC87uDMwM8Lw4E79L0/rPZI=
github.com/aws/aws-sdk-go v1.38.50/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
+github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
+github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
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=
@@ -137,6 +139,7 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv
github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
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/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
@@ -264,6 +267,7 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
+github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
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=
@@ -370,9 +374,11 @@ github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6
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=
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw=
github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
+github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME=
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis=
@@ -486,6 +492,7 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
go.etcd.io/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/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
@@ -503,6 +510,8 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.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/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4=
+go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
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.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
@@ -510,8 +519,8 @@ go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9i
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
-go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U=
-go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
+go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI=
+go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
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-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
@@ -554,6 +563,7 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -591,8 +601,9 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20210224082022-3d97a244fca7 h1:OgUuv8lsRpBibGNbSizVwKWlysjaNzmC9gYMhPVfqFM=
golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -610,6 +621,7 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -657,8 +669,10 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w
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-20210309074719-68d13333faf2 h1:46ULzRKLh1CwgRq2dC5SlBzEqqNCi8rreOZnNrbqcIY=
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE=
@@ -729,6 +743,7 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
+golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -826,6 +841,7 @@ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8X
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/cheggaaa/pb.v1 v1.0.25/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 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o=
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
@@ -834,6 +850,7 @@ gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
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=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
diff --git a/k8s-tester/conformance/go.mod b/k8s-tester/conformance/go.mod
index c0e0c8bed..cd4ba246f 100644
--- a/k8s-tester/conformance/go.mod
+++ b/k8s-tester/conformance/go.mod
@@ -1,6 +1,6 @@
module github.com/aws/aws-k8s-tester/k8s-tester/conformance
-go 1.16
+go 1.17
require (
github.com/aws/aws-k8s-tester/client v0.0.0-00010101000000-000000000000
@@ -9,7 +9,7 @@ require (
github.com/manifoldco/promptui v0.8.0
github.com/mholt/archiver/v3 v3.5.0
github.com/spf13/cobra v1.1.3
- go.uber.org/zap v1.17.0
+ go.uber.org/zap v1.19.1
k8s.io/api v0.21.1
k8s.io/apimachinery v0.21.1
k8s.io/utils v0.0.0-20210527160623-6fdb442a123b
@@ -17,7 +17,6 @@ require (
replace (
github.com/aws/aws-k8s-tester/client => ../../client
- github.com/aws/aws-k8s-tester/k8s-tester/helm => ../helm
github.com/aws/aws-k8s-tester/k8s-tester/tester => ../tester
github.com/aws/aws-k8s-tester/utils => ../../utils
)
diff --git a/k8s-tester/conformance/go.sum b/k8s-tester/conformance/go.sum
index a28bc8c73..8becc38b6 100644
--- a/k8s-tester/conformance/go.sum
+++ b/k8s-tester/conformance/go.sum
@@ -71,6 +71,8 @@ github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN
github.com/aws/aws-sdk-go v1.38.50 h1:9+dEpZbgjBMeoOes6QfZMC87uDMwM8Lw4E79L0/rPZI=
github.com/aws/aws-sdk-go v1.38.50/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
+github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
+github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
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/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
@@ -139,6 +141,7 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv
github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
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/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
@@ -386,6 +389,7 @@ github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw=
github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
+github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME=
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis=
@@ -503,6 +507,7 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
go.etcd.io/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/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
@@ -520,6 +525,8 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.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/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4=
+go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
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.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
@@ -527,8 +534,8 @@ go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9i
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
-go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U=
-go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
+go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI=
+go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
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-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
@@ -571,6 +578,7 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -608,8 +616,9 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20210224082022-3d97a244fca7 h1:OgUuv8lsRpBibGNbSizVwKWlysjaNzmC9gYMhPVfqFM=
golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -627,6 +636,7 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -674,8 +684,10 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w
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-20210309074719-68d13333faf2 h1:46ULzRKLh1CwgRq2dC5SlBzEqqNCi8rreOZnNrbqcIY=
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE=
@@ -746,6 +758,7 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
+golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
diff --git a/k8s-tester/csi-ebs/go.mod b/k8s-tester/csi-ebs/go.mod
index 304afa996..fb30e6644 100644
--- a/k8s-tester/csi-ebs/go.mod
+++ b/k8s-tester/csi-ebs/go.mod
@@ -1,6 +1,6 @@
module github.com/aws/aws-k8s-tester/k8s-tester/csi-ebs
-go 1.16
+go 1.17
require (
github.com/aws/aws-k8s-tester/client v0.0.0-00010101000000-000000000000
@@ -9,9 +9,9 @@ require (
github.com/aws/aws-k8s-tester/utils v0.0.0-00010101000000-000000000000
github.com/manifoldco/promptui v0.8.0
github.com/spf13/cobra v1.1.3
- go.uber.org/zap v1.17.0
- k8s.io/api v0.21.1 // indirect
- k8s.io/apimachinery v0.21.1 // indirect
+ go.uber.org/zap v1.19.1
+ k8s.io/api v0.21.1
+ k8s.io/apimachinery v0.21.1
k8s.io/utils v0.0.0-20210527160623-6fdb442a123b
)
diff --git a/k8s-tester/csi-ebs/go.sum b/k8s-tester/csi-ebs/go.sum
index 517ecaa24..e23f57bd3 100644
--- a/k8s-tester/csi-ebs/go.sum
+++ b/k8s-tester/csi-ebs/go.sum
@@ -104,6 +104,8 @@ github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN
github.com/aws/aws-sdk-go v1.38.50 h1:9+dEpZbgjBMeoOes6QfZMC87uDMwM8Lw4E79L0/rPZI=
github.com/aws/aws-sdk-go v1.38.50/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
+github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
+github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
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=
@@ -237,6 +239,7 @@ github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoD
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/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/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0=
github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7 h1:LofdAjjjqCSXMwLGgOgnE+rdPuvX9DxCqaHwKy7i/ko=
@@ -782,6 +785,7 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43 h1:+lm10QQTNSBd8DVTNGHx7o/IKu9HYDvLMffDhbyLccI=
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 h1:hlE8//ciYMztlGpl/VA+Zm1AcTPHYkHJPbHqE6WJUXE=
@@ -813,6 +817,8 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.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/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4=
+go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
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.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
@@ -820,8 +826,8 @@ go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9i
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
-go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U=
-go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
+go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI=
+go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
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-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
@@ -872,6 +878,7 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -914,8 +921,9 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20210224082022-3d97a244fca7 h1:OgUuv8lsRpBibGNbSizVwKWlysjaNzmC9gYMhPVfqFM=
golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -932,8 +940,9 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20201207232520-09787c993a3a h1:DcqTD9SDLc+1P/r1EmRBwnVsrOwW+kk2vWf9n+1sGhs=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -991,8 +1000,10 @@ golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7w
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-20210309074719-68d13333faf2 h1:46ULzRKLh1CwgRq2dC5SlBzEqqNCi8rreOZnNrbqcIY=
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE=
@@ -1067,6 +1078,7 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
+golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -1202,8 +1214,8 @@ gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81
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=
-helm.sh/helm/v3 v3.6.0 h1:/9IMxJ2lXJHbvTMHcW1AO71lXQHqDC+3bcpGp7yCsb8=
-helm.sh/helm/v3 v3.6.0/go.mod h1:mIIus8EOqj+obtycw3sidsR4ORr2aFDmXMSI3k+oeVY=
+helm.sh/helm/v3 v3.6.1 h1:TQ6q4pAatXr7qh2fbLcb0oNd0I3J7kv26oo5cExKTtc=
+helm.sh/helm/v3 v3.6.1/go.mod h1:mIIus8EOqj+obtycw3sidsR4ORr2aFDmXMSI3k+oeVY=
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
diff --git a/k8s-tester/csrs/go.mod b/k8s-tester/csrs/go.mod
index 9cf313959..590095bdc 100644
--- a/k8s-tester/csrs/go.mod
+++ b/k8s-tester/csrs/go.mod
@@ -1,6 +1,6 @@
module github.com/aws/aws-k8s-tester/k8s-tester/csrs
-go 1.16
+go 1.17
require (
github.com/aws/aws-k8s-tester/client v0.0.0-00010101000000-000000000000
@@ -9,14 +9,70 @@ require (
github.com/manifoldco/promptui v0.8.0
github.com/prometheus/client_golang v1.10.0
github.com/spf13/cobra v1.1.3
- go.uber.org/zap v1.17.0
+ go.uber.org/zap v1.19.1
k8s.io/api v0.21.1
k8s.io/apimachinery v0.21.1
)
+require (
+ github.com/aws/aws-sdk-go v1.38.50 // indirect
+ github.com/beorn7/perks v1.0.1 // indirect
+ github.com/briandowns/spinner v1.13.0 // indirect
+ github.com/cespare/xxhash/v2 v2.1.1 // indirect
+ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect
+ github.com/davecgh/go-spew v1.1.1 // indirect
+ github.com/dustin/go-humanize v1.0.0 // indirect
+ github.com/fatih/color v1.7.0 // indirect
+ github.com/go-logr/logr v0.4.0 // indirect
+ github.com/gogo/protobuf v1.3.2 // indirect
+ github.com/golang/protobuf v1.4.3 // indirect
+ github.com/google/go-cmp v0.5.4 // indirect
+ github.com/google/gofuzz v1.1.0 // indirect
+ github.com/googleapis/gnostic v0.4.1 // indirect
+ github.com/hpcloud/tail v1.0.0 // indirect
+ github.com/imdario/mergo v0.3.5 // indirect
+ github.com/inconshreveable/mousetrap v1.0.0 // indirect
+ github.com/jmespath/go-jmespath v0.4.0 // indirect
+ github.com/json-iterator/go v1.1.10 // indirect
+ github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a // indirect
+ github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a // indirect
+ github.com/mattn/go-colorable v0.1.2 // indirect
+ github.com/mattn/go-isatty v0.0.8 // indirect
+ github.com/mattn/go-runewidth v0.0.9 // indirect
+ github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
+ github.com/mitchellh/ioprogress v0.0.0-20180201004757-6a23b12fa88e // indirect
+ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
+ github.com/modern-go/reflect2 v1.0.1 // indirect
+ github.com/olekukonko/tablewriter v0.0.5 // indirect
+ github.com/onsi/ginkgo v1.11.0 // indirect
+ github.com/prometheus/client_model v0.2.0 // indirect
+ github.com/prometheus/common v0.18.0 // indirect
+ github.com/prometheus/procfs v0.6.0 // indirect
+ github.com/spf13/pflag v1.0.5 // indirect
+ go.uber.org/atomic v1.7.0 // indirect
+ go.uber.org/multierr v1.6.0 // indirect
+ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 // indirect
+ golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c // indirect
+ golang.org/x/sys v0.0.0-20210510120138-977fb7262007 // indirect
+ golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect
+ golang.org/x/text v0.3.4 // indirect
+ golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect
+ google.golang.org/appengine v1.6.6 // indirect
+ google.golang.org/protobuf v1.25.0 // indirect
+ gopkg.in/fsnotify.v1 v1.4.7 // indirect
+ gopkg.in/inf.v0 v0.9.1 // indirect
+ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
+ gopkg.in/yaml.v2 v2.4.0 // indirect
+ k8s.io/apiextensions-apiserver v0.21.1 // indirect
+ k8s.io/client-go v0.21.1 // indirect
+ k8s.io/klog/v2 v2.8.0 // indirect
+ k8s.io/utils v0.0.0-20210527160623-6fdb442a123b // indirect
+ sigs.k8s.io/structured-merge-diff/v4 v4.1.0 // indirect
+ sigs.k8s.io/yaml v1.2.0 // indirect
+)
+
replace (
github.com/aws/aws-k8s-tester/client => ../../client
- github.com/aws/aws-k8s-tester/k8s-tester/helm => ../helm
github.com/aws/aws-k8s-tester/k8s-tester/tester => ../tester
github.com/aws/aws-k8s-tester/utils => ../../utils
)
diff --git a/k8s-tester/csrs/go.sum b/k8s-tester/csrs/go.sum
index 04432946e..61808165e 100644
--- a/k8s-tester/csrs/go.sum
+++ b/k8s-tester/csrs/go.sum
@@ -69,6 +69,8 @@ github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN
github.com/aws/aws-sdk-go v1.38.50 h1:9+dEpZbgjBMeoOes6QfZMC87uDMwM8Lw4E79L0/rPZI=
github.com/aws/aws-sdk-go v1.38.50/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
+github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
+github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
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=
@@ -137,6 +139,7 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv
github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
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/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
@@ -264,6 +267,7 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
+github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
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=
@@ -370,9 +374,11 @@ github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6
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=
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw=
github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
+github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME=
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis=
@@ -486,6 +492,7 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
go.etcd.io/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/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
@@ -503,6 +510,8 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.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/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4=
+go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
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.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
@@ -510,8 +519,8 @@ go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9i
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
-go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U=
-go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
+go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI=
+go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
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-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
@@ -554,6 +563,7 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -591,8 +601,9 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20210224082022-3d97a244fca7 h1:OgUuv8lsRpBibGNbSizVwKWlysjaNzmC9gYMhPVfqFM=
golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -610,6 +621,7 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -657,8 +669,10 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w
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-20210309074719-68d13333faf2 h1:46ULzRKLh1CwgRq2dC5SlBzEqqNCi8rreOZnNrbqcIY=
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE=
@@ -729,6 +743,7 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
+golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -826,6 +841,7 @@ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8X
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/cheggaaa/pb.v1 v1.0.25/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 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o=
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
@@ -834,6 +850,7 @@ gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
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=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
diff --git a/k8s-tester/epsagon/go.mod b/k8s-tester/epsagon/go.mod
index 519ac4f71..3189d8a47 100644
--- a/k8s-tester/epsagon/go.mod
+++ b/k8s-tester/epsagon/go.mod
@@ -1,21 +1,21 @@
module github.com/aws/aws-k8s-tester/k8s-tester/epsagon
-go 1.16
-
-replace (
- github.com/aws/aws-k8s-tester/client => ../../client
- github.com/aws/aws-k8s-tester/k8s-tester/helm => ../helm
- github.com/aws/aws-k8s-tester/k8s-tester/tester => ../tester
- github.com/aws/aws-k8s-tester/utils => ../../utils
-)
+go 1.17
require (
github.com/aws/aws-k8s-tester/client v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/helm v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/tester v0.0.0-00010101000000-000000000000
- github.com/aws/aws-k8s-tester/utils v0.0.0-20210722211631-7411a257e5a3
+ github.com/aws/aws-k8s-tester/utils v0.0.0-00010101000000-000000000000
github.com/manifoldco/promptui v0.8.0
github.com/spf13/cobra v1.2.1
- go.uber.org/zap v1.18.1
+ go.uber.org/zap v1.19.1
k8s.io/utils v0.0.0-20210802155522-efc7438f0176
)
+
+replace (
+ github.com/aws/aws-k8s-tester/client => ../../client
+ github.com/aws/aws-k8s-tester/k8s-tester/helm => ../helm
+ github.com/aws/aws-k8s-tester/k8s-tester/tester => ../tester
+ github.com/aws/aws-k8s-tester/utils => ../../utils
+)
diff --git a/k8s-tester/epsagon/go.sum b/k8s-tester/epsagon/go.sum
index 7926c1728..29d603f0b 100644
--- a/k8s-tester/epsagon/go.sum
+++ b/k8s-tester/epsagon/go.sum
@@ -860,8 +860,8 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.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/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0=
-go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A=
+go.uber.org/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4=
+go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
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.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
@@ -870,8 +870,8 @@ go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9E
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
-go.uber.org/zap v1.18.1 h1:CSUJ2mjFszzEWt4CdKISEuChVIXGBn3lAPwkRGyVrc4=
-go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI=
+go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI=
+go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
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-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
@@ -915,7 +915,6 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu
golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
-golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug=
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
@@ -1117,7 +1116,6 @@ golang.org/x/tools v0.0.0-20191004055002-72853e10c5a3/go.mod h1:b+2E5dAYhXwXZwtn
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-20191108193012-7d206e10da11/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=
@@ -1154,8 +1152,8 @@ golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4f
golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
-golang.org/x/tools v0.1.2 h1:kRBLX7v7Af8W7Gdbbc908OJcdgtK8bOz9Uaj8/F1ACA=
golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
+golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
diff --git a/k8s-tester/epsagon/tester.go b/k8s-tester/epsagon/tester.go
index 8f41e2897..0fbd395ba 100644
--- a/k8s-tester/epsagon/tester.go
+++ b/k8s-tester/epsagon/tester.go
@@ -1,6 +1,5 @@
-// package armory installs armory operator.
-// ref https://docs.armory.io/docs/installation/armory-operator/op-quickstart/
-package armory
+// package epsagon installs epsagon operator.
+package epsagon
import (
"context"
diff --git a/k8s-tester/falco/go.mod b/k8s-tester/falco/go.mod
index d7f83bee6..ac59b2505 100644
--- a/k8s-tester/falco/go.mod
+++ b/k8s-tester/falco/go.mod
@@ -1,15 +1,15 @@
module github.com/aws/aws-k8s-tester/k8s-tester/falco
-go 1.16
+go 1.17
require (
- github.com/aws/aws-k8s-tester/client v0.0.0-20210610170531-2e5d31e5196c
- github.com/aws/aws-k8s-tester/k8s-tester/helm v0.0.0-20210610170531-2e5d31e5196c
- github.com/aws/aws-k8s-tester/k8s-tester/tester v0.0.0-20210610170531-2e5d31e5196c
- github.com/aws/aws-k8s-tester/utils v0.0.0-20210610170531-2e5d31e5196c
+ github.com/aws/aws-k8s-tester/client v0.0.0-00010101000000-000000000000
+ github.com/aws/aws-k8s-tester/k8s-tester/helm v0.0.0-00010101000000-000000000000
+ github.com/aws/aws-k8s-tester/k8s-tester/tester v0.0.0-00010101000000-00000000
+ github.com/aws/aws-k8s-tester/utils v0.0.0-00010101000000-00000000
github.com/manifoldco/promptui v0.8.0
github.com/spf13/cobra v1.1.3
- go.uber.org/zap v1.17.0
+ go.uber.org/zap v1.19.1
k8s.io/utils v0.0.0-20210527160623-6fdb442a123b
)
diff --git a/k8s-tester/falco/go.sum b/k8s-tester/falco/go.sum
index 517ecaa24..e23f57bd3 100644
--- a/k8s-tester/falco/go.sum
+++ b/k8s-tester/falco/go.sum
@@ -104,6 +104,8 @@ github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN
github.com/aws/aws-sdk-go v1.38.50 h1:9+dEpZbgjBMeoOes6QfZMC87uDMwM8Lw4E79L0/rPZI=
github.com/aws/aws-sdk-go v1.38.50/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
+github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
+github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
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=
@@ -237,6 +239,7 @@ github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoD
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/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/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0=
github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7 h1:LofdAjjjqCSXMwLGgOgnE+rdPuvX9DxCqaHwKy7i/ko=
@@ -782,6 +785,7 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43 h1:+lm10QQTNSBd8DVTNGHx7o/IKu9HYDvLMffDhbyLccI=
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 h1:hlE8//ciYMztlGpl/VA+Zm1AcTPHYkHJPbHqE6WJUXE=
@@ -813,6 +817,8 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.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/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4=
+go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
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.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
@@ -820,8 +826,8 @@ go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9i
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
-go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U=
-go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
+go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI=
+go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
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-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
@@ -872,6 +878,7 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -914,8 +921,9 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20210224082022-3d97a244fca7 h1:OgUuv8lsRpBibGNbSizVwKWlysjaNzmC9gYMhPVfqFM=
golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -932,8 +940,9 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20201207232520-09787c993a3a h1:DcqTD9SDLc+1P/r1EmRBwnVsrOwW+kk2vWf9n+1sGhs=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -991,8 +1000,10 @@ golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7w
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-20210309074719-68d13333faf2 h1:46ULzRKLh1CwgRq2dC5SlBzEqqNCi8rreOZnNrbqcIY=
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE=
@@ -1067,6 +1078,7 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
+golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -1202,8 +1214,8 @@ gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81
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=
-helm.sh/helm/v3 v3.6.0 h1:/9IMxJ2lXJHbvTMHcW1AO71lXQHqDC+3bcpGp7yCsb8=
-helm.sh/helm/v3 v3.6.0/go.mod h1:mIIus8EOqj+obtycw3sidsR4ORr2aFDmXMSI3k+oeVY=
+helm.sh/helm/v3 v3.6.1 h1:TQ6q4pAatXr7qh2fbLcb0oNd0I3J7kv26oo5cExKTtc=
+helm.sh/helm/v3 v3.6.1/go.mod h1:mIIus8EOqj+obtycw3sidsR4ORr2aFDmXMSI3k+oeVY=
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
diff --git a/k8s-tester/fluent-bit/go.mod b/k8s-tester/fluent-bit/go.mod
index 2746ae552..5abd55b14 100644
--- a/k8s-tester/fluent-bit/go.mod
+++ b/k8s-tester/fluent-bit/go.mod
@@ -1,6 +1,6 @@
module github.com/aws/aws-k8s-tester/k8s-tester/fluent-bit
-go 1.16
+go 1.17
require (
github.com/aws/aws-k8s-tester/client v0.0.0-00010101000000-000000000000
@@ -10,15 +10,60 @@ require (
github.com/manifoldco/promptui v0.8.0
github.com/onsi/ginkgo v1.16.2
github.com/spf13/cobra v1.1.3
- go.uber.org/zap v1.17.0
+ go.uber.org/zap v1.19.1
k8s.io/api v0.21.1
k8s.io/apimachinery v0.21.1
k8s.io/utils v0.0.0-20210527160623-6fdb442a123b
)
+require (
+ github.com/briandowns/spinner v1.13.0 // indirect
+ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect
+ github.com/davecgh/go-spew v1.1.1 // indirect
+ github.com/dustin/go-humanize v1.0.0 // indirect
+ github.com/fatih/color v1.7.0 // indirect
+ github.com/fsnotify/fsnotify v1.4.9 // indirect
+ github.com/go-logr/logr v0.4.0 // indirect
+ github.com/gogo/protobuf v1.3.2 // indirect
+ github.com/golang/protobuf v1.4.3 // indirect
+ github.com/google/go-cmp v0.5.4 // indirect
+ github.com/google/gofuzz v1.1.0 // indirect
+ github.com/googleapis/gnostic v0.4.1 // indirect
+ github.com/imdario/mergo v0.3.5 // indirect
+ github.com/inconshreveable/mousetrap v1.0.0 // indirect
+ github.com/jmespath/go-jmespath v0.4.0 // indirect
+ github.com/json-iterator/go v1.1.10 // indirect
+ github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a // indirect
+ github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a // indirect
+ github.com/mattn/go-colorable v0.1.2 // indirect
+ github.com/mattn/go-isatty v0.0.8 // indirect
+ github.com/mitchellh/ioprogress v0.0.0-20180201004757-6a23b12fa88e // indirect
+ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
+ github.com/modern-go/reflect2 v1.0.1 // indirect
+ github.com/nxadm/tail v1.4.8 // indirect
+ github.com/spf13/pflag v1.0.5 // indirect
+ go.uber.org/atomic v1.7.0 // indirect
+ go.uber.org/multierr v1.6.0 // indirect
+ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 // indirect
+ golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c // indirect
+ golang.org/x/sys v0.0.0-20210510120138-977fb7262007 // indirect
+ golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect
+ golang.org/x/text v0.3.4 // indirect
+ golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect
+ google.golang.org/appengine v1.6.6 // indirect
+ google.golang.org/protobuf v1.25.0 // indirect
+ gopkg.in/inf.v0 v0.9.1 // indirect
+ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
+ gopkg.in/yaml.v2 v2.4.0 // indirect
+ k8s.io/apiextensions-apiserver v0.21.1 // indirect
+ k8s.io/client-go v0.21.1 // indirect
+ k8s.io/klog/v2 v2.8.0 // indirect
+ sigs.k8s.io/structured-merge-diff/v4 v4.1.0 // indirect
+ sigs.k8s.io/yaml v1.2.0 // indirect
+)
+
replace (
github.com/aws/aws-k8s-tester/client => ../../client
- github.com/aws/aws-k8s-tester/k8s-tester/helm => ../helm
github.com/aws/aws-k8s-tester/k8s-tester/tester => ../tester
github.com/aws/aws-k8s-tester/utils => ../../utils
)
diff --git a/k8s-tester/fluent-bit/go.sum b/k8s-tester/fluent-bit/go.sum
index c3a52be49..18597a6e6 100644
--- a/k8s-tester/fluent-bit/go.sum
+++ b/k8s-tester/fluent-bit/go.sum
@@ -69,6 +69,8 @@ github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN
github.com/aws/aws-sdk-go v1.38.50 h1:9+dEpZbgjBMeoOes6QfZMC87uDMwM8Lw4E79L0/rPZI=
github.com/aws/aws-sdk-go v1.38.50/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
+github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
+github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
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/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
@@ -489,6 +491,7 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
go.etcd.io/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/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
@@ -506,6 +509,8 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.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/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4=
+go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
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.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
@@ -513,8 +518,8 @@ go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9i
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
-go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U=
-go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
+go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI=
+go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
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-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
@@ -557,6 +562,7 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -595,8 +601,9 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20210224082022-3d97a244fca7 h1:OgUuv8lsRpBibGNbSizVwKWlysjaNzmC9gYMhPVfqFM=
golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -614,6 +621,7 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -665,8 +673,10 @@ golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7w
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-20210309074719-68d13333faf2 h1:46ULzRKLh1CwgRq2dC5SlBzEqqNCi8rreOZnNrbqcIY=
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE=
@@ -738,6 +748,7 @@ golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc
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.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
+golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
diff --git a/k8s-tester/fmt.sh b/k8s-tester/fmt.sh
index 9237dd7a3..5d1179331 100755
--- a/k8s-tester/fmt.sh
+++ b/k8s-tester/fmt.sh
@@ -6,6 +6,12 @@ set -e
goimports -w .
gofmt -s -w .
+goimports -w ./aqua
+gofmt -s -w ./aqua
+
+goimports -w ./armory
+gofmt -s -w ./armory
+
goimports -w ./cloudwatch-agent
gofmt -s -w ./cloudwatch-agent
@@ -66,14 +72,23 @@ gofmt -s -w ./php-apache
goimports -w ./secrets
gofmt -s -w ./secrets
+goimports -w ./splunk
+gofmt -s -w ./splunk
+
goimports -w ./stress
gofmt -s -w ./stress
+goimports -w ./sysdig
+gofmt -s -w ./sysdig
+
goimports -w ./tester
gofmt -s -w ./tester
-goimports -w ./version
-gofmt -s -w ./version
+goimports -w ./vault
+gofmt -s -w ./vault
+
+goimports -w ./tester
+gofmt -s -w ./tester
goimports -w ./wordpress
gofmt -s -w ./wordpress
diff --git a/k8s-tester/go.mod b/k8s-tester/go.mod
index 64d68b490..66fdc3c2e 100644
--- a/k8s-tester/go.mod
+++ b/k8s-tester/go.mod
@@ -1,9 +1,11 @@
module github.com/aws/aws-k8s-tester/k8s-tester
-go 1.16
+go 1.17
require (
- github.com/aws/aws-k8s-tester/client v0.0.0-20210610170531-2e5d31e5196c
+ github.com/aws/aws-k8s-tester/client v0.0.0-00010101000000-000000000000
+ github.com/aws/aws-k8s-tester/k8s-tester/aqua v0.0.0-00010101000000-000000000000
+ github.com/aws/aws-k8s-tester/k8s-tester/armory v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/cloudwatch-agent v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/clusterloader v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/cni v0.0.0-00010101000000-000000000000
@@ -11,32 +13,193 @@ require (
github.com/aws/aws-k8s-tester/k8s-tester/conformance v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/csi-ebs v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/csrs v0.0.0-00010101000000-000000000000
+ github.com/aws/aws-k8s-tester/k8s-tester/epsagon v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/falco v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/fluent-bit v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/jobs-echo v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/jobs-pi v0.0.0-00010101000000-000000000000
+ github.com/aws/aws-k8s-tester/k8s-tester/kubecost v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/kubernetes-dashboard v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/metrics-server v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/nlb-guestbook v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/nlb-hello-world v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/php-apache v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/secrets v0.0.0-00010101000000-000000000000
+ github.com/aws/aws-k8s-tester/k8s-tester/splunk v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/stress v0.0.0-00010101000000-000000000000
- github.com/aws/aws-k8s-tester/k8s-tester/tester v0.0.0-20210610170531-2e5d31e5196c
+ github.com/aws/aws-k8s-tester/k8s-tester/sysdig v0.0.0-00010101000000-000000000000
+ github.com/aws/aws-k8s-tester/k8s-tester/tester v0.0.0-00010101000000-000000000000
+ github.com/aws/aws-k8s-tester/k8s-tester/vault v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/wordpress v0.0.0-00010101000000-000000000000
- github.com/aws/aws-k8s-tester/utils v0.0.0-20210610170531-2e5d31e5196c
+ github.com/aws/aws-k8s-tester/utils v0.0.0-00010101000000-000000000000
github.com/dustin/go-humanize v1.0.0
github.com/manifoldco/promptui v0.8.0
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db
- go.uber.org/zap v1.17.0
+ go.uber.org/zap v1.19.1
+ sigs.k8s.io/yaml v1.2.0
+)
+
+require (
+ github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect
+ github.com/BurntSushi/toml v0.3.1 // indirect
+ github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd // indirect
+ github.com/Masterminds/goutils v1.1.1 // indirect
+ github.com/Masterminds/semver/v3 v3.1.1 // indirect
+ github.com/Masterminds/sprig/v3 v3.2.2 // indirect
+ github.com/Masterminds/squirrel v1.5.0 // indirect
+ github.com/Microsoft/go-winio v0.4.16 // indirect
+ github.com/Microsoft/hcsshim v0.8.14 // indirect
+ github.com/PuerkitoBio/purell v1.1.1 // indirect
+ github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
+ github.com/andybalholm/brotli v1.0.0 // indirect
+ github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 // indirect
+ github.com/aws/aws-k8s-tester/k8s-tester/helm v0.0.0-00010101000000-000000000000 // indirect
+ github.com/aws/aws-sdk-go v1.38.50 // indirect
+ github.com/beorn7/perks v1.0.1 // indirect
+ github.com/briandowns/spinner v1.13.0 // indirect
+ github.com/cespare/xxhash/v2 v2.1.1 // indirect
+ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect
+ github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59 // indirect
+ github.com/containerd/containerd v1.4.4 // indirect
+ github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7 // indirect
+ github.com/cyphar/filepath-securejoin v0.2.2 // indirect
+ github.com/davecgh/go-spew v1.1.1 // indirect
+ github.com/deislabs/oras v0.11.1 // indirect
+ github.com/docker/cli v20.10.5+incompatible // indirect
+ github.com/docker/distribution v2.7.1+incompatible // indirect
+ github.com/docker/docker v17.12.0-ce-rc1.0.20200618181300-9dc6525e6118+incompatible // indirect
+ github.com/docker/docker-credential-helpers v0.6.3 // indirect
+ github.com/docker/go-connections v0.4.0 // indirect
+ github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916 // indirect
+ github.com/docker/go-units v0.4.0 // indirect
+ github.com/dsnet/compress v0.0.1 // indirect
+ github.com/evanphx/json-patch v4.9.0+incompatible // indirect
+ github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect
+ github.com/fatih/color v1.7.0 // indirect
+ github.com/fsnotify/fsnotify v1.4.9 // indirect
+ github.com/go-errors/errors v1.0.1 // indirect
+ github.com/go-logr/logr v0.4.0 // indirect
+ github.com/go-openapi/jsonpointer v0.19.3 // indirect
+ github.com/go-openapi/jsonreference v0.19.3 // indirect
+ github.com/go-openapi/spec v0.19.5 // indirect
+ github.com/go-openapi/swag v0.19.5 // indirect
+ github.com/gobwas/glob v0.2.3 // indirect
+ github.com/gofrs/flock v0.8.0 // indirect
+ github.com/gogo/protobuf v1.3.2 // indirect
+ github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
+ github.com/golang/protobuf v1.5.2 // indirect
+ github.com/golang/snappy v0.0.1 // indirect
+ github.com/google/btree v1.0.0 // indirect
+ github.com/google/go-cmp v0.5.5 // indirect
+ github.com/google/gofuzz v1.1.0 // indirect
+ github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
+ github.com/google/uuid v1.1.2 // indirect
+ github.com/googleapis/gnostic v0.4.1 // indirect
+ github.com/gorilla/mux v1.7.3 // indirect
+ github.com/gosuri/uitable v0.0.4 // indirect
+ github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 // indirect
+ github.com/hashicorp/golang-lru v0.5.1 // indirect
+ github.com/huandu/xstrings v1.3.1 // indirect
+ github.com/imdario/mergo v0.3.11 // indirect
+ github.com/inconshreveable/mousetrap v1.0.0 // indirect
+ github.com/jmespath/go-jmespath v0.4.0 // indirect
+ github.com/jmoiron/sqlx v1.3.1 // indirect
+ github.com/json-iterator/go v1.1.11 // indirect
+ github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a // indirect
+ github.com/klauspost/compress v1.10.10 // indirect
+ github.com/klauspost/pgzip v1.2.4 // indirect
+ github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
+ github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
+ github.com/lib/pq v1.10.0 // indirect
+ github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
+ github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a // indirect
+ github.com/mailru/easyjson v0.7.0 // indirect
+ github.com/mattn/go-colorable v0.1.2 // indirect
+ github.com/mattn/go-isatty v0.0.8 // indirect
+ github.com/mattn/go-runewidth v0.0.9 // indirect
+ github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
+ github.com/mholt/archiver/v3 v3.5.0 // indirect
+ github.com/mitchellh/copystructure v1.1.1 // indirect
+ github.com/mitchellh/go-wordwrap v1.0.0 // indirect
+ github.com/mitchellh/ioprogress v0.0.0-20180201004757-6a23b12fa88e // indirect
+ github.com/mitchellh/reflectwalk v1.0.1 // indirect
+ github.com/moby/spdystream v0.2.0 // indirect
+ github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 // indirect
+ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
+ github.com/modern-go/reflect2 v1.0.1 // indirect
+ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
+ github.com/morikuni/aec v1.0.0 // indirect
+ github.com/nwaples/rardecode v1.1.0 // indirect
+ github.com/nxadm/tail v1.4.8 // indirect
+ github.com/olekukonko/tablewriter v0.0.5 // indirect
+ github.com/onsi/ginkgo v1.16.2 // indirect
+ github.com/opencontainers/go-digest v1.0.0 // indirect
+ github.com/opencontainers/image-spec v1.0.1 // indirect
+ github.com/opencontainers/runc v0.1.1 // indirect
+ github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
+ github.com/pierrec/lz4/v4 v4.0.3 // indirect
+ github.com/pkg/errors v0.9.1 // indirect
+ github.com/pmezard/go-difflib v1.0.0 // indirect
+ github.com/prometheus/client_golang v1.10.0 // indirect
+ github.com/prometheus/client_model v0.2.0 // indirect
+ github.com/prometheus/common v0.18.0 // indirect
+ github.com/prometheus/procfs v0.6.0 // indirect
+ github.com/rubenv/sql-migrate v0.0.0-20200616145509-8d140a17f351 // indirect
+ github.com/russross/blackfriday v1.5.2 // indirect
+ github.com/shopspring/decimal v1.2.0 // indirect
+ github.com/sirupsen/logrus v1.8.1 // indirect
+ github.com/spf13/cast v1.3.1 // indirect
+ github.com/spf13/cobra v1.2.1 // indirect
+ github.com/spf13/pflag v1.0.5 // indirect
+ github.com/stretchr/testify v1.7.0 // indirect
+ github.com/ulikunitz/xz v0.5.7 // indirect
+ github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
+ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
+ github.com/xeipuuv/gojsonschema v1.2.0 // indirect
+ github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
+ github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca // indirect
+ go.opencensus.io v0.23.0 // indirect
+ go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect
+ go.uber.org/atomic v1.7.0 // indirect
+ go.uber.org/multierr v1.6.0 // indirect
+ golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 // indirect
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 // indirect
+ golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
golang.org/x/sys v0.0.0-20210510120138-977fb7262007 // indirect
- sigs.k8s.io/yaml v1.2.0
+ golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect
+ golang.org/x/text v0.3.5 // indirect
+ golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect
+ google.golang.org/appengine v1.6.7 // indirect
+ google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c // indirect
+ google.golang.org/grpc v1.38.0 // indirect
+ google.golang.org/protobuf v1.26.0 // indirect
+ gopkg.in/gorp.v1 v1.7.2 // indirect
+ gopkg.in/inf.v0 v0.9.1 // indirect
+ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
+ gopkg.in/yaml.v2 v2.4.0 // indirect
+ gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
+ helm.sh/helm/v3 v3.6.3 // indirect
+ k8s.io/api v0.21.1 // indirect
+ k8s.io/apiextensions-apiserver v0.21.1 // indirect
+ k8s.io/apimachinery v0.21.2 // indirect
+ k8s.io/apiserver v0.21.1 // indirect
+ k8s.io/cli-runtime v0.21.1 // indirect
+ k8s.io/client-go v0.21.1 // indirect
+ k8s.io/component-base v0.21.1 // indirect
+ k8s.io/klog/v2 v2.8.0 // indirect
+ k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 // indirect
+ k8s.io/kubectl v0.21.0 // indirect
+ k8s.io/utils v0.0.0-20210802155522-efc7438f0176 // indirect
+ sigs.k8s.io/kustomize/api v0.8.8 // indirect
+ sigs.k8s.io/kustomize/kyaml v0.10.17 // indirect
+ sigs.k8s.io/structured-merge-diff/v4 v4.1.0 // indirect
)
replace (
github.com/aws/aws-k8s-tester/client => ../client
+ github.com/aws/aws-k8s-tester/k8s-tester/aqua => ./aqua
+ github.com/aws/aws-k8s-tester/k8s-tester/armory => ./armory
github.com/aws/aws-k8s-tester/k8s-tester/cloudwatch-agent => ./cloudwatch-agent
github.com/aws/aws-k8s-tester/k8s-tester/clusterloader => ./clusterloader
github.com/aws/aws-k8s-tester/k8s-tester/cni => ./cni
@@ -44,19 +207,24 @@ replace (
github.com/aws/aws-k8s-tester/k8s-tester/conformance => ./conformance
github.com/aws/aws-k8s-tester/k8s-tester/csi-ebs => ./csi-ebs
github.com/aws/aws-k8s-tester/k8s-tester/csrs => ./csrs
+ github.com/aws/aws-k8s-tester/k8s-tester/epsagon => ./epsagon
github.com/aws/aws-k8s-tester/k8s-tester/falco => ./falco
github.com/aws/aws-k8s-tester/k8s-tester/fluent-bit => ./fluent-bit
github.com/aws/aws-k8s-tester/k8s-tester/helm => ./helm
github.com/aws/aws-k8s-tester/k8s-tester/jobs-echo => ./jobs-echo
github.com/aws/aws-k8s-tester/k8s-tester/jobs-pi => ./jobs-pi
+ github.com/aws/aws-k8s-tester/k8s-tester/kubecost => ./kubecost
github.com/aws/aws-k8s-tester/k8s-tester/kubernetes-dashboard => ./kubernetes-dashboard
github.com/aws/aws-k8s-tester/k8s-tester/metrics-server => ./metrics-server
github.com/aws/aws-k8s-tester/k8s-tester/nlb-guestbook => ./nlb-guestbook
github.com/aws/aws-k8s-tester/k8s-tester/nlb-hello-world => ./nlb-hello-world
github.com/aws/aws-k8s-tester/k8s-tester/php-apache => ./php-apache
github.com/aws/aws-k8s-tester/k8s-tester/secrets => ./secrets
+ github.com/aws/aws-k8s-tester/k8s-tester/splunk => ./splunk
github.com/aws/aws-k8s-tester/k8s-tester/stress => ./stress
+ github.com/aws/aws-k8s-tester/k8s-tester/sysdig => ./sysdig
github.com/aws/aws-k8s-tester/k8s-tester/tester => ./tester
+ github.com/aws/aws-k8s-tester/k8s-tester/vault => ./vault
github.com/aws/aws-k8s-tester/k8s-tester/version => ./version
github.com/aws/aws-k8s-tester/k8s-tester/wordpress => ./wordpress
github.com/aws/aws-k8s-tester/utils => ../utils
diff --git a/k8s-tester/go.sum b/k8s-tester/go.sum
index e31e232f6..4c3d6d93f 100644
--- a/k8s-tester/go.sum
+++ b/k8s-tester/go.sum
@@ -14,6 +14,11 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV
cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs=
cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc=
cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY=
+cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI=
+cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk=
+cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg=
+cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8=
+cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0=
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
@@ -89,6 +94,7 @@ github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk5
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8=
github.com/andybalholm/brotli v1.0.0 h1:7UCwP93aiSfvWpapti8g88vVVGp2qqtGyePsSuDafo4=
github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y=
+github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
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/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
@@ -106,6 +112,8 @@ github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN
github.com/aws/aws-sdk-go v1.38.50 h1:9+dEpZbgjBMeoOes6QfZMC87uDMwM8Lw4E79L0/rPZI=
github.com/aws/aws-sdk-go v1.38.50/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
+github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
+github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
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=
@@ -114,6 +122,7 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
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/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM=
github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4=
github.com/briandowns/spinner v1.13.0 h1:q/Y9LtpwtvL0CRzXrAMj0keVXqNhBYUFg6tBOUiY8ek=
@@ -144,6 +153,8 @@ github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3/go.mod h1:MA5e5Lr8slmE
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/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
+github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
+github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=
github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59 h1:qWj4qVYZ95vLWwqyNJCQg7rDsG5wPdze0UaPolH7DUk=
@@ -169,6 +180,7 @@ github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee
github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk=
+github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
@@ -229,6 +241,9 @@ github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4s
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
+github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po=
+github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
+github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/evanphx/json-patch v4.9.0+incompatible h1:kLcOMZeuLAJvL2BPWLMIj5oaZQobrkAqrL+WFZwQses=
@@ -330,6 +345,7 @@ github.com/gobuffalo/packr/v2 v2.7.1/go.mod h1:qYEvAazPaVxy7Y7KR0W8qYEE+RymX74kE
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/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
+github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/godror/godror v0.13.3/go.mod h1:2ouUT4kdhUBk7TAkHWD4SN0CdI0pgEQbo8FVHhbSKWg=
github.com/gofrs/flock v0.8.0 h1:MSdYClljsF3PbENUUEx85nkWfJSGfzYI9yEBZOJz6CY=
github.com/gofrs/flock v0.8.0/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU=
@@ -355,6 +371,7 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt
github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
+github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
@@ -368,8 +385,11 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
-github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM=
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
+github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
+github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM=
+github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
+github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4=
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
@@ -385,13 +405,16 @@ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M=
+github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
+github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g=
github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
+github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
@@ -399,6 +422,10 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf
github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
+github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
+github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
+github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
+github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4=
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ=
@@ -430,6 +457,7 @@ github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
+github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q=
github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE=
github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
@@ -459,6 +487,7 @@ github.com/huandu/xstrings v1.3.1 h1:4jgBlKK6tLKFvO8u5pmYjG91cqytmDCDvGh7ECVFfFs
github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
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/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
github.com/imdario/mergo v0.3.11 h1:3tnifQM4i+fbajXKBHXWEH+KvNHqojZ778UH75j3bGA=
github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
@@ -481,8 +510,9 @@ github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
-github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68=
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
+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/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
@@ -503,6 +533,7 @@ github.com/klauspost/pgzip v1.2.4/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQ
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
+github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
@@ -528,6 +559,7 @@ github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a/go.mod h1:pHhQN
github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ=
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
+github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
@@ -578,6 +610,7 @@ github.com/mitchellh/ioprogress v0.0.0-20180201004757-6a23b12fa88e h1:Qa6dnn8Dla
github.com/mitchellh/ioprogress v0.0.0-20180201004757-6a23b12fa88e/go.mod h1:waEya8ee1Ro/lgxpVhkJI4BVASzkm3UZqkx/cFJiYHM=
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
+github.com/mitchellh/mapstructure v1.4.1/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/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
github.com/mitchellh/reflectwalk v1.0.1 h1:FVzMWA5RllMAKIdUSC8mdWo3XtwoecrH79BY70sEEpE=
@@ -662,6 +695,7 @@ github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIw
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
+github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
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=
@@ -677,6 +711,7 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
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/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
@@ -720,6 +755,7 @@ github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
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.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.3.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
@@ -755,6 +791,7 @@ github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJ
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
+github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I=
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=
@@ -763,9 +800,11 @@ github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3
github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU=
github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE=
github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI=
-github.com/spf13/cobra v1.1.3 h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M=
github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo=
+github.com/spf13/cobra v1.2.1 h1:+KmjbUw1hriSNMF55oPrkZcb27aECyrj8V2ytv7kWDw=
+github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk=
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
+github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
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=
@@ -775,6 +814,7 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An
github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s=
github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE=
github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg=
+github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns=
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=
@@ -818,6 +858,7 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43 h1:+lm10QQTNSBd8DVTNGHx7o/IKu9HYDvLMffDhbyLccI=
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 h1:hlE8//ciYMztlGpl/VA+Zm1AcTPHYkHJPbHqE6WJUXE=
@@ -831,6 +872,9 @@ go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg=
go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg=
+go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs=
+go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=
+go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ=
go.mongodb.org/mongo-driver v1.0.3/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=
@@ -840,8 +884,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/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
+go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M=
+go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
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 v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
@@ -849,6 +895,8 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.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/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4=
+go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
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.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
@@ -856,8 +904,9 @@ go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9i
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
-go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U=
go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
+go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI=
+go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
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-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
@@ -870,6 +919,7 @@ golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8U
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-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
@@ -899,6 +949,8 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl
golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
+golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
+golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
@@ -908,6 +960,9 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -950,8 +1005,13 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-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-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
@@ -959,6 +1019,13 @@ golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4Iltr
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
+golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c h1:pkQiBZBvdos9qq4wBAHqlzuZHEXo07pqV06ef90u1WI=
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -1026,15 +1093,22 @@ golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-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-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
@@ -1047,8 +1121,9 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc=
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ=
+golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@@ -1110,9 +1185,16 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY
golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
+golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE=
+golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
+golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
+golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -1136,14 +1218,21 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M
google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM=
google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc=
+google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg=
+google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE=
+google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8=
+google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU=
+google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94=
+google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.2.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.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 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc=
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-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
@@ -1169,14 +1258,26 @@ google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfG
google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
+google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a h1:pOwg4OoaRYScjmR4LlLgdtnyoHYTSAVhhqe5uPdpII8=
+google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A=
+google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c h1:wtujag7C+4D6KMoulW9YauvK2lgdvCMS260jsqqBXr0=
+google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
@@ -1194,8 +1295,16 @@ google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8
google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
-google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI=
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
+google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
+google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
+google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
+google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8=
+google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
+google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
+google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
+google.golang.org/grpc v1.38.0 h1:/9BgsAsa5nWe26HqOlvlgJnqBuktYOLCgjCPqsa56W0=
+google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
@@ -1205,8 +1314,10 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
-google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c=
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
+google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
+google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk=
+google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
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=
@@ -1223,6 +1334,7 @@ gopkg.in/gorp.v1 v1.7.2/go.mod h1:Wo3h+DBQZIxATwftsglhdD/62zRFPhGhTiu5jUJmCaw=
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
+gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
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=
@@ -1232,6 +1344,7 @@ gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRN
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
@@ -1247,8 +1360,8 @@ gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81
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=
-helm.sh/helm/v3 v3.6.0 h1:/9IMxJ2lXJHbvTMHcW1AO71lXQHqDC+3bcpGp7yCsb8=
-helm.sh/helm/v3 v3.6.0/go.mod h1:mIIus8EOqj+obtycw3sidsR4ORr2aFDmXMSI3k+oeVY=
+helm.sh/helm/v3 v3.6.3 h1:0nKDyXJr23nI3JrcP7HH7NcR+CYRvro/52Dvr1KhGO0=
+helm.sh/helm/v3 v3.6.3/go.mod h1:mIIus8EOqj+obtycw3sidsR4ORr2aFDmXMSI3k+oeVY=
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
@@ -1258,9 +1371,8 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt
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=
k8s.io/api v0.21.0/go.mod h1:+YbrhBBGgsxbF6o6Kj4KJPJnBmAKuXDeS3E18bgHNVU=
+k8s.io/api v0.21.1 h1:94bbZ5NTjdINJEdzOkpS4vdPhkb1VFpTYC9zh43f75c=
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.21.0/go.mod h1:gsQGNtGkc/YoDG9loKI0V+oLZM4ljRPjc/sql5tmvzc=
k8s.io/apiextensions-apiserver v0.21.1 h1:AA+cnsb6w7SZ1vD32Z+zdgfXdXY8X9uGX5bN6EoPEIo=
k8s.io/apiextensions-apiserver v0.21.1/go.mod h1:KESQFCGjqVcVsZ9g0xX5bacMjyX5emuWcS2arzdEouA=
@@ -1295,8 +1407,10 @@ k8s.io/kubectl v0.21.0 h1:WZXlnG/yjcE4LWO2g6ULjFxtzK6H1TKzsfaBFuVIhNg=
k8s.io/kubectl v0.21.0/go.mod h1:EU37NukZRXn1TpAkMUoy8Z/B2u6wjHDS4aInsDzVvks=
k8s.io/metrics v0.21.0/go.mod h1:L3Ji9EGPP1YBbfm9sPfEXSpnj8i24bfQbAFAsW0NueQ=
k8s.io/utils v0.0.0-20201110183641-67b214c5f920/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=
+k8s.io/utils v0.0.0-20210722164352-7f3ee0f31471/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
+k8s.io/utils v0.0.0-20210802155522-efc7438f0176 h1:Mx0aa+SUAcNRQbs5jUzV8lkDlGFU8laZsY9jrcVX5SY=
+k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/letsencrypt v0.0.3 h1:H7xDfhkaFFSYEJlKeq38RwX2jYcnTeHuDQyT+mMNMwM=
rsc.io/letsencrypt v0.0.3/go.mod h1:buyQKZ6IXrRnB7TdkHP0RyEybLx18HHyOSoTyoOLqNY=
diff --git a/k8s-tester/helm/go.mod b/k8s-tester/helm/go.mod
index fc8d80aee..e8f0b0c21 100644
--- a/k8s-tester/helm/go.mod
+++ b/k8s-tester/helm/go.mod
@@ -1,13 +1,17 @@
module github.com/aws/aws-k8s-tester/k8s-tester/helm
-go 1.16
+go 1.17
require (
- github.com/aws/aws-k8s-tester/utils v0.0.0-20210722211631-7411a257e5a3
+ github.com/aws/aws-k8s-tester/utils v0.0.0-00010101000000-000000000000
github.com/gofrs/flock v0.8.0
- go.uber.org/zap v1.17.0
+ go.uber.org/zap v1.19.1
gopkg.in/yaml.v2 v2.4.0
- helm.sh/helm/v3 v3.6.1
+ helm.sh/helm/v3 v3.6.3
k8s.io/cli-runtime v0.21.1
rsc.io/letsencrypt v0.0.3 // indirect
)
+
+replace (
+ github.com/aws/aws-k8s-tester/utils => ../../utils
+)
diff --git a/k8s-tester/helm/go.sum b/k8s-tester/helm/go.sum
index 90b1e2111..79ee534f3 100644
--- a/k8s-tester/helm/go.sum
+++ b/k8s-tester/helm/go.sum
@@ -95,6 +95,8 @@ github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZo
github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/aws/aws-sdk-go v1.38.50/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
+github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
+github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
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=
@@ -748,6 +750,7 @@ github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca/go.mod h1:ce1O1j6Ut
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43 h1:+lm10QQTNSBd8DVTNGHx7o/IKu9HYDvLMffDhbyLccI=
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 h1:hlE8//ciYMztlGpl/VA+Zm1AcTPHYkHJPbHqE6WJUXE=
@@ -778,6 +781,8 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.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/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4=
+go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
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.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
@@ -785,8 +790,9 @@ go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9i
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
-go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U=
go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
+go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI=
+go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
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-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
@@ -837,6 +843,7 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -872,8 +879,9 @@ golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20210224082022-3d97a244fca7 h1:OgUuv8lsRpBibGNbSizVwKWlysjaNzmC9gYMhPVfqFM=
golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -887,8 +895,9 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ
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-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20201207232520-09787c993a3a h1:DcqTD9SDLc+1P/r1EmRBwnVsrOwW+kk2vWf9n+1sGhs=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -940,8 +949,10 @@ golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7w
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-20210309074719-68d13333faf2 h1:46ULzRKLh1CwgRq2dC5SlBzEqqNCi8rreOZnNrbqcIY=
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE=
@@ -1006,6 +1017,7 @@ golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roY
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
+golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -1119,8 +1131,8 @@ gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81
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=
-helm.sh/helm/v3 v3.6.1 h1:TQ6q4pAatXr7qh2fbLcb0oNd0I3J7kv26oo5cExKTtc=
-helm.sh/helm/v3 v3.6.1/go.mod h1:mIIus8EOqj+obtycw3sidsR4ORr2aFDmXMSI3k+oeVY=
+helm.sh/helm/v3 v3.6.3 h1:0nKDyXJr23nI3JrcP7HH7NcR+CYRvro/52Dvr1KhGO0=
+helm.sh/helm/v3 v3.6.3/go.mod h1:mIIus8EOqj+obtycw3sidsR4ORr2aFDmXMSI3k+oeVY=
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
diff --git a/k8s-tester/jobs-echo/go.mod b/k8s-tester/jobs-echo/go.mod
index 528ded65e..abc6b4f71 100644
--- a/k8s-tester/jobs-echo/go.mod
+++ b/k8s-tester/jobs-echo/go.mod
@@ -1,6 +1,6 @@
module github.com/aws/aws-k8s-tester/k8s-tester/jobs-echo
-go 1.16
+go 1.17
require (
github.com/aws/aws-k8s-tester/client v0.0.0-00010101000000-000000000000
@@ -10,7 +10,7 @@ require (
github.com/dustin/go-humanize v1.0.0
github.com/manifoldco/promptui v0.8.0
github.com/spf13/cobra v1.1.3
- go.uber.org/zap v1.17.0
+ go.uber.org/zap v1.19.1
k8s.io/api v0.21.1
k8s.io/apimachinery v0.21.1
sigs.k8s.io/yaml v1.2.0
@@ -18,7 +18,6 @@ require (
replace (
github.com/aws/aws-k8s-tester/client => ../../client
- github.com/aws/aws-k8s-tester/k8s-tester/helm => ../helm
github.com/aws/aws-k8s-tester/k8s-tester/tester => ../tester
github.com/aws/aws-k8s-tester/utils => ../../utils
)
diff --git a/k8s-tester/jobs-echo/go.sum b/k8s-tester/jobs-echo/go.sum
index c9a6c607e..21a63d461 100644
--- a/k8s-tester/jobs-echo/go.sum
+++ b/k8s-tester/jobs-echo/go.sum
@@ -69,6 +69,8 @@ github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN
github.com/aws/aws-sdk-go v1.38.50 h1:9+dEpZbgjBMeoOes6QfZMC87uDMwM8Lw4E79L0/rPZI=
github.com/aws/aws-sdk-go v1.38.50/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
+github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
+github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
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/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
@@ -134,6 +136,7 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv
github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
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/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
@@ -261,6 +264,7 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
+github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
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=
@@ -364,9 +368,11 @@ github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6
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=
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw=
github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
+github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME=
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis=
@@ -476,6 +482,7 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
go.etcd.io/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/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
@@ -493,6 +500,8 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.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/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4=
+go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
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.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
@@ -500,8 +509,8 @@ go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9i
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
-go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U=
-go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
+go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI=
+go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
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-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
@@ -544,6 +553,7 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -581,8 +591,9 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20210224082022-3d97a244fca7 h1:OgUuv8lsRpBibGNbSizVwKWlysjaNzmC9gYMhPVfqFM=
golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -600,6 +611,7 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -647,8 +659,10 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w
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-20210309074719-68d13333faf2 h1:46ULzRKLh1CwgRq2dC5SlBzEqqNCi8rreOZnNrbqcIY=
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE=
@@ -719,6 +733,7 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
+golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -816,6 +831,7 @@ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8X
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/cheggaaa/pb.v1 v1.0.25/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 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o=
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
@@ -824,6 +840,7 @@ gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
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=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
diff --git a/k8s-tester/jobs-pi/go.mod b/k8s-tester/jobs-pi/go.mod
index 3eb1e2bd7..b442c9298 100644
--- a/k8s-tester/jobs-pi/go.mod
+++ b/k8s-tester/jobs-pi/go.mod
@@ -1,6 +1,6 @@
module github.com/aws/aws-k8s-tester/k8s-tester/jobs-pi
-go 1.16
+go 1.17
require (
github.com/aws/aws-k8s-tester/client v0.0.0-00010101000000-000000000000
@@ -9,7 +9,7 @@ require (
github.com/dustin/go-humanize v1.0.0
github.com/manifoldco/promptui v0.8.0
github.com/spf13/cobra v1.1.3
- go.uber.org/zap v1.17.0
+ go.uber.org/zap v1.19.1
k8s.io/api v0.21.1
k8s.io/apimachinery v0.21.1
sigs.k8s.io/yaml v1.2.0
@@ -17,7 +17,6 @@ require (
replace (
github.com/aws/aws-k8s-tester/client => ../../client
- github.com/aws/aws-k8s-tester/k8s-tester/helm => ../helm
github.com/aws/aws-k8s-tester/k8s-tester/tester => ../tester
github.com/aws/aws-k8s-tester/utils => ../../utils
)
diff --git a/k8s-tester/jobs-pi/go.sum b/k8s-tester/jobs-pi/go.sum
index c9a6c607e..21a63d461 100644
--- a/k8s-tester/jobs-pi/go.sum
+++ b/k8s-tester/jobs-pi/go.sum
@@ -69,6 +69,8 @@ github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN
github.com/aws/aws-sdk-go v1.38.50 h1:9+dEpZbgjBMeoOes6QfZMC87uDMwM8Lw4E79L0/rPZI=
github.com/aws/aws-sdk-go v1.38.50/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
+github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
+github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
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/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
@@ -134,6 +136,7 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv
github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
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/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
@@ -261,6 +264,7 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
+github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
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=
@@ -364,9 +368,11 @@ github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6
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=
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw=
github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
+github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME=
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis=
@@ -476,6 +482,7 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
go.etcd.io/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/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
@@ -493,6 +500,8 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.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/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4=
+go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
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.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
@@ -500,8 +509,8 @@ go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9i
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
-go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U=
-go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
+go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI=
+go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
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-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
@@ -544,6 +553,7 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -581,8 +591,9 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20210224082022-3d97a244fca7 h1:OgUuv8lsRpBibGNbSizVwKWlysjaNzmC9gYMhPVfqFM=
golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -600,6 +611,7 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -647,8 +659,10 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w
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-20210309074719-68d13333faf2 h1:46ULzRKLh1CwgRq2dC5SlBzEqqNCi8rreOZnNrbqcIY=
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE=
@@ -719,6 +733,7 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
+golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -816,6 +831,7 @@ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8X
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/cheggaaa/pb.v1 v1.0.25/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 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o=
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
@@ -824,6 +840,7 @@ gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
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=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
diff --git a/k8s-tester/kubecost/go.mod b/k8s-tester/kubecost/go.mod
index 0b352d74f..cb0289d81 100644
--- a/k8s-tester/kubecost/go.mod
+++ b/k8s-tester/kubecost/go.mod
@@ -1,15 +1,15 @@
module github.com/aws/aws-k8s-tester/k8s-tester/kubecost
-go 1.16
+go 1.17
require (
github.com/aws/aws-k8s-tester/client v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/helm v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/tester v0.0.0-00010101000000-000000000000
- github.com/aws/aws-k8s-tester/utils v0.0.0-20210722211631-7411a257e5a3
+ github.com/aws/aws-k8s-tester/utils v0.0.0-00010101000000-000000000000
github.com/manifoldco/promptui v0.8.0
github.com/spf13/cobra v1.2.1
- go.uber.org/zap v1.18.1
+ go.uber.org/zap v1.19.1
k8s.io/utils v0.0.0-20210722164352-7f3ee0f31471
)
@@ -18,4 +18,4 @@ replace (
github.com/aws/aws-k8s-tester/k8s-tester/helm => ../helm
github.com/aws/aws-k8s-tester/k8s-tester/tester => ../tester
github.com/aws/aws-k8s-tester/utils => ../../utils
-)
\ No newline at end of file
+)
diff --git a/k8s-tester/kubecost/go.sum b/k8s-tester/kubecost/go.sum
index f86027f1f..88b61d786 100644
--- a/k8s-tester/kubecost/go.sum
+++ b/k8s-tester/kubecost/go.sum
@@ -860,8 +860,8 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.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/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0=
-go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A=
+go.uber.org/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4=
+go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
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.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
@@ -870,8 +870,8 @@ go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9E
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
-go.uber.org/zap v1.18.1 h1:CSUJ2mjFszzEWt4CdKISEuChVIXGBn3lAPwkRGyVrc4=
-go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI=
+go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI=
+go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
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-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
@@ -915,7 +915,6 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu
golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
-golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug=
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
@@ -1117,7 +1116,6 @@ golang.org/x/tools v0.0.0-20191004055002-72853e10c5a3/go.mod h1:b+2E5dAYhXwXZwtn
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-20191108193012-7d206e10da11/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=
@@ -1154,8 +1152,8 @@ golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4f
golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
-golang.org/x/tools v0.1.2 h1:kRBLX7v7Af8W7Gdbbc908OJcdgtK8bOz9Uaj8/F1ACA=
golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
+golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
diff --git a/k8s-tester/kubernetes-dashboard/go.mod b/k8s-tester/kubernetes-dashboard/go.mod
index a0f995cd5..dab471de7 100644
--- a/k8s-tester/kubernetes-dashboard/go.mod
+++ b/k8s-tester/kubernetes-dashboard/go.mod
@@ -1,6 +1,6 @@
module github.com/aws/aws-k8s-tester/k8s-tester/kubernetes-dashboard
-go 1.16
+go 1.17
require (
github.com/aws/aws-k8s-tester/client v0.0.0-00010101000000-000000000000
@@ -8,13 +8,12 @@ require (
github.com/aws/aws-k8s-tester/utils v0.0.0-00010101000000-000000000000
github.com/manifoldco/promptui v0.8.0
github.com/spf13/cobra v1.1.3
- go.uber.org/zap v1.17.0
+ go.uber.org/zap v1.19.1
k8s.io/utils v0.0.0-20210527160623-6fdb442a123b
)
replace (
github.com/aws/aws-k8s-tester/client => ../../client
- github.com/aws/aws-k8s-tester/k8s-tester/helm => ../helm
github.com/aws/aws-k8s-tester/k8s-tester/tester => ../tester
github.com/aws/aws-k8s-tester/utils => ../../utils
)
diff --git a/k8s-tester/kubernetes-dashboard/go.sum b/k8s-tester/kubernetes-dashboard/go.sum
index c9a6c607e..21a63d461 100644
--- a/k8s-tester/kubernetes-dashboard/go.sum
+++ b/k8s-tester/kubernetes-dashboard/go.sum
@@ -69,6 +69,8 @@ github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN
github.com/aws/aws-sdk-go v1.38.50 h1:9+dEpZbgjBMeoOes6QfZMC87uDMwM8Lw4E79L0/rPZI=
github.com/aws/aws-sdk-go v1.38.50/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
+github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
+github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
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/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
@@ -134,6 +136,7 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv
github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
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/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
@@ -261,6 +264,7 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
+github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
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=
@@ -364,9 +368,11 @@ github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6
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=
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw=
github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
+github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME=
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis=
@@ -476,6 +482,7 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
go.etcd.io/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/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
@@ -493,6 +500,8 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.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/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4=
+go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
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.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
@@ -500,8 +509,8 @@ go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9i
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
-go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U=
-go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
+go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI=
+go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
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-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
@@ -544,6 +553,7 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -581,8 +591,9 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20210224082022-3d97a244fca7 h1:OgUuv8lsRpBibGNbSizVwKWlysjaNzmC9gYMhPVfqFM=
golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -600,6 +611,7 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -647,8 +659,10 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w
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-20210309074719-68d13333faf2 h1:46ULzRKLh1CwgRq2dC5SlBzEqqNCi8rreOZnNrbqcIY=
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE=
@@ -719,6 +733,7 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
+golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -816,6 +831,7 @@ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8X
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/cheggaaa/pb.v1 v1.0.25/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 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o=
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
@@ -824,6 +840,7 @@ gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
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=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
diff --git a/k8s-tester/metrics-server/go.mod b/k8s-tester/metrics-server/go.mod
index 7b567c75b..fe2a0795e 100644
--- a/k8s-tester/metrics-server/go.mod
+++ b/k8s-tester/metrics-server/go.mod
@@ -1,6 +1,6 @@
module github.com/aws/aws-k8s-tester/k8s-tester/metrics-server
-go 1.16
+go 1.17
require (
github.com/aws/aws-k8s-tester/client v0.0.0-00010101000000-000000000000
@@ -8,14 +8,13 @@ require (
github.com/aws/aws-k8s-tester/utils v0.0.0-00010101000000-000000000000
github.com/manifoldco/promptui v0.8.0
github.com/spf13/cobra v1.1.3
- go.uber.org/zap v1.17.0
+ go.uber.org/zap v1.19.1
k8s.io/apimachinery v0.21.1
k8s.io/utils v0.0.0-20210527160623-6fdb442a123b
)
replace (
github.com/aws/aws-k8s-tester/client => ../../client
- github.com/aws/aws-k8s-tester/k8s-tester/helm => ../helm
github.com/aws/aws-k8s-tester/k8s-tester/tester => ../tester
github.com/aws/aws-k8s-tester/utils => ../../utils
)
diff --git a/k8s-tester/metrics-server/go.sum b/k8s-tester/metrics-server/go.sum
index c9a6c607e..21a63d461 100644
--- a/k8s-tester/metrics-server/go.sum
+++ b/k8s-tester/metrics-server/go.sum
@@ -69,6 +69,8 @@ github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN
github.com/aws/aws-sdk-go v1.38.50 h1:9+dEpZbgjBMeoOes6QfZMC87uDMwM8Lw4E79L0/rPZI=
github.com/aws/aws-sdk-go v1.38.50/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
+github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
+github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
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/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
@@ -134,6 +136,7 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv
github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
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/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
@@ -261,6 +264,7 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
+github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
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=
@@ -364,9 +368,11 @@ github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6
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=
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw=
github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
+github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME=
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis=
@@ -476,6 +482,7 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
go.etcd.io/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/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
@@ -493,6 +500,8 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.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/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4=
+go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
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.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
@@ -500,8 +509,8 @@ go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9i
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
-go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U=
-go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
+go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI=
+go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
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-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
@@ -544,6 +553,7 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -581,8 +591,9 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20210224082022-3d97a244fca7 h1:OgUuv8lsRpBibGNbSizVwKWlysjaNzmC9gYMhPVfqFM=
golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -600,6 +611,7 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -647,8 +659,10 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w
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-20210309074719-68d13333faf2 h1:46ULzRKLh1CwgRq2dC5SlBzEqqNCi8rreOZnNrbqcIY=
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE=
@@ -719,6 +733,7 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
+golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -816,6 +831,7 @@ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8X
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/cheggaaa/pb.v1 v1.0.25/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 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o=
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
@@ -824,6 +840,7 @@ gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
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=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
diff --git a/k8s-tester/nlb-guestbook/go.mod b/k8s-tester/nlb-guestbook/go.mod
index ad783ae10..9d74d709d 100644
--- a/k8s-tester/nlb-guestbook/go.mod
+++ b/k8s-tester/nlb-guestbook/go.mod
@@ -1,6 +1,6 @@
module github.com/aws/aws-k8s-tester/k8s-tester/nlb-guestbook
-go 1.16
+go 1.17
require (
github.com/aws/aws-k8s-tester/client v0.0.0-00010101000000-000000000000
@@ -9,7 +9,7 @@ require (
github.com/aws/aws-sdk-go v1.38.50
github.com/manifoldco/promptui v0.8.0
github.com/spf13/cobra v1.1.3
- go.uber.org/zap v1.17.0
+ go.uber.org/zap v1.19.1
k8s.io/api v0.21.1
k8s.io/apimachinery v0.21.1
k8s.io/utils v0.0.0-20210527160623-6fdb442a123b
@@ -17,7 +17,6 @@ require (
replace (
github.com/aws/aws-k8s-tester/client => ../../client
- github.com/aws/aws-k8s-tester/k8s-tester/helm => ../helm
github.com/aws/aws-k8s-tester/k8s-tester/tester => ../tester
github.com/aws/aws-k8s-tester/utils => ../../utils
)
diff --git a/k8s-tester/nlb-guestbook/go.sum b/k8s-tester/nlb-guestbook/go.sum
index c9a6c607e..21a63d461 100644
--- a/k8s-tester/nlb-guestbook/go.sum
+++ b/k8s-tester/nlb-guestbook/go.sum
@@ -69,6 +69,8 @@ github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN
github.com/aws/aws-sdk-go v1.38.50 h1:9+dEpZbgjBMeoOes6QfZMC87uDMwM8Lw4E79L0/rPZI=
github.com/aws/aws-sdk-go v1.38.50/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
+github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
+github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
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/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
@@ -134,6 +136,7 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv
github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
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/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
@@ -261,6 +264,7 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
+github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
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=
@@ -364,9 +368,11 @@ github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6
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=
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw=
github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
+github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME=
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis=
@@ -476,6 +482,7 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
go.etcd.io/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/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
@@ -493,6 +500,8 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.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/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4=
+go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
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.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
@@ -500,8 +509,8 @@ go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9i
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
-go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U=
-go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
+go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI=
+go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
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-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
@@ -544,6 +553,7 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -581,8 +591,9 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20210224082022-3d97a244fca7 h1:OgUuv8lsRpBibGNbSizVwKWlysjaNzmC9gYMhPVfqFM=
golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -600,6 +611,7 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -647,8 +659,10 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w
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-20210309074719-68d13333faf2 h1:46ULzRKLh1CwgRq2dC5SlBzEqqNCi8rreOZnNrbqcIY=
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE=
@@ -719,6 +733,7 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
+golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -816,6 +831,7 @@ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8X
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/cheggaaa/pb.v1 v1.0.25/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 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o=
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
@@ -824,6 +840,7 @@ gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
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=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
diff --git a/k8s-tester/nlb-hello-world/go.mod b/k8s-tester/nlb-hello-world/go.mod
index de597c4ef..7cdf01327 100644
--- a/k8s-tester/nlb-hello-world/go.mod
+++ b/k8s-tester/nlb-hello-world/go.mod
@@ -1,6 +1,6 @@
module github.com/aws/aws-k8s-tester/k8s-tester/nlb-hello-world
-go 1.16
+go 1.17
require (
github.com/aws/aws-k8s-tester/client v0.0.0-00010101000000-000000000000
@@ -9,7 +9,7 @@ require (
github.com/aws/aws-sdk-go v1.38.50
github.com/manifoldco/promptui v0.8.0
github.com/spf13/cobra v1.1.3
- go.uber.org/zap v1.17.0
+ go.uber.org/zap v1.19.1
k8s.io/api v0.21.1
k8s.io/apimachinery v0.21.1
k8s.io/utils v0.0.0-20210527160623-6fdb442a123b
@@ -17,7 +17,6 @@ require (
replace (
github.com/aws/aws-k8s-tester/client => ../../client
- github.com/aws/aws-k8s-tester/k8s-tester/helm => ../helm
github.com/aws/aws-k8s-tester/k8s-tester/tester => ../tester
github.com/aws/aws-k8s-tester/utils => ../../utils
)
diff --git a/k8s-tester/nlb-hello-world/go.sum b/k8s-tester/nlb-hello-world/go.sum
index c9a6c607e..21a63d461 100644
--- a/k8s-tester/nlb-hello-world/go.sum
+++ b/k8s-tester/nlb-hello-world/go.sum
@@ -69,6 +69,8 @@ github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN
github.com/aws/aws-sdk-go v1.38.50 h1:9+dEpZbgjBMeoOes6QfZMC87uDMwM8Lw4E79L0/rPZI=
github.com/aws/aws-sdk-go v1.38.50/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
+github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
+github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
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/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
@@ -134,6 +136,7 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv
github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
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/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
@@ -261,6 +264,7 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
+github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
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=
@@ -364,9 +368,11 @@ github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6
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=
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw=
github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
+github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME=
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis=
@@ -476,6 +482,7 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
go.etcd.io/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/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
@@ -493,6 +500,8 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.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/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4=
+go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
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.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
@@ -500,8 +509,8 @@ go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9i
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
-go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U=
-go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
+go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI=
+go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
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-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
@@ -544,6 +553,7 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -581,8 +591,9 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20210224082022-3d97a244fca7 h1:OgUuv8lsRpBibGNbSizVwKWlysjaNzmC9gYMhPVfqFM=
golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -600,6 +611,7 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -647,8 +659,10 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w
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-20210309074719-68d13333faf2 h1:46ULzRKLh1CwgRq2dC5SlBzEqqNCi8rreOZnNrbqcIY=
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE=
@@ -719,6 +733,7 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
+golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -816,6 +831,7 @@ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8X
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/cheggaaa/pb.v1 v1.0.25/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 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o=
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
@@ -824,6 +840,7 @@ gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
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=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
diff --git a/k8s-tester/php-apache/go.mod b/k8s-tester/php-apache/go.mod
index cd5301f11..fa4a789a3 100644
--- a/k8s-tester/php-apache/go.mod
+++ b/k8s-tester/php-apache/go.mod
@@ -1,6 +1,6 @@
module github.com/aws/aws-k8s-tester/k8s-tester/php-apache
-go 1.16
+go 1.17
require (
github.com/aws/aws-k8s-tester/client v0.0.0-00010101000000-000000000000
@@ -9,7 +9,7 @@ require (
github.com/aws/aws-sdk-go v1.38.50
github.com/manifoldco/promptui v0.8.0
github.com/spf13/cobra v1.1.3
- go.uber.org/zap v1.17.0
+ go.uber.org/zap v1.19.1
k8s.io/api v0.21.1
k8s.io/apimachinery v0.21.1
k8s.io/utils v0.0.0-20210527160623-6fdb442a123b
@@ -17,7 +17,6 @@ require (
replace (
github.com/aws/aws-k8s-tester/client => ../../client
- github.com/aws/aws-k8s-tester/k8s-tester/helm => ../helm
github.com/aws/aws-k8s-tester/k8s-tester/tester => ../tester
github.com/aws/aws-k8s-tester/utils => ../../utils
)
diff --git a/k8s-tester/php-apache/go.sum b/k8s-tester/php-apache/go.sum
index c9a6c607e..21a63d461 100644
--- a/k8s-tester/php-apache/go.sum
+++ b/k8s-tester/php-apache/go.sum
@@ -69,6 +69,8 @@ github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN
github.com/aws/aws-sdk-go v1.38.50 h1:9+dEpZbgjBMeoOes6QfZMC87uDMwM8Lw4E79L0/rPZI=
github.com/aws/aws-sdk-go v1.38.50/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
+github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
+github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
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/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
@@ -134,6 +136,7 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv
github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
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/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
@@ -261,6 +264,7 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
+github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
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=
@@ -364,9 +368,11 @@ github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6
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=
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw=
github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
+github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME=
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis=
@@ -476,6 +482,7 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
go.etcd.io/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/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
@@ -493,6 +500,8 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.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/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4=
+go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
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.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
@@ -500,8 +509,8 @@ go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9i
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
-go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U=
-go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
+go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI=
+go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
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-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
@@ -544,6 +553,7 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -581,8 +591,9 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20210224082022-3d97a244fca7 h1:OgUuv8lsRpBibGNbSizVwKWlysjaNzmC9gYMhPVfqFM=
golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -600,6 +611,7 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -647,8 +659,10 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w
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-20210309074719-68d13333faf2 h1:46ULzRKLh1CwgRq2dC5SlBzEqqNCi8rreOZnNrbqcIY=
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE=
@@ -719,6 +733,7 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
+golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -816,6 +831,7 @@ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8X
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/cheggaaa/pb.v1 v1.0.25/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 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o=
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
@@ -824,6 +840,7 @@ gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
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=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
diff --git a/k8s-tester/secrets/go.mod b/k8s-tester/secrets/go.mod
index 4b78c9b22..1f9aeb104 100644
--- a/k8s-tester/secrets/go.mod
+++ b/k8s-tester/secrets/go.mod
@@ -1,6 +1,6 @@
module github.com/aws/aws-k8s-tester/k8s-tester/secrets
-go 1.16
+go 1.17
require (
github.com/aws/aws-k8s-tester/client v0.0.0-00010101000000-000000000000
@@ -9,14 +9,70 @@ require (
github.com/manifoldco/promptui v0.8.0
github.com/prometheus/client_golang v1.10.0
github.com/spf13/cobra v1.1.3
- go.uber.org/zap v1.17.0
+ go.uber.org/zap v1.19.1
k8s.io/api v0.21.1
k8s.io/apimachinery v0.21.1
)
+require (
+ github.com/aws/aws-sdk-go v1.38.50 // indirect
+ github.com/beorn7/perks v1.0.1 // indirect
+ github.com/briandowns/spinner v1.13.0 // indirect
+ github.com/cespare/xxhash/v2 v2.1.1 // indirect
+ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect
+ github.com/davecgh/go-spew v1.1.1 // indirect
+ github.com/dustin/go-humanize v1.0.0 // indirect
+ github.com/fatih/color v1.7.0 // indirect
+ github.com/go-logr/logr v0.4.0 // indirect
+ github.com/gogo/protobuf v1.3.2 // indirect
+ github.com/golang/protobuf v1.4.3 // indirect
+ github.com/google/go-cmp v0.5.4 // indirect
+ github.com/google/gofuzz v1.1.0 // indirect
+ github.com/googleapis/gnostic v0.4.1 // indirect
+ github.com/hpcloud/tail v1.0.0 // indirect
+ github.com/imdario/mergo v0.3.5 // indirect
+ github.com/inconshreveable/mousetrap v1.0.0 // indirect
+ github.com/jmespath/go-jmespath v0.4.0 // indirect
+ github.com/json-iterator/go v1.1.10 // indirect
+ github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a // indirect
+ github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a // indirect
+ github.com/mattn/go-colorable v0.1.2 // indirect
+ github.com/mattn/go-isatty v0.0.8 // indirect
+ github.com/mattn/go-runewidth v0.0.9 // indirect
+ github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
+ github.com/mitchellh/ioprogress v0.0.0-20180201004757-6a23b12fa88e // indirect
+ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
+ github.com/modern-go/reflect2 v1.0.1 // indirect
+ github.com/olekukonko/tablewriter v0.0.5 // indirect
+ github.com/onsi/ginkgo v1.11.0 // indirect
+ github.com/prometheus/client_model v0.2.0 // indirect
+ github.com/prometheus/common v0.18.0 // indirect
+ github.com/prometheus/procfs v0.6.0 // indirect
+ github.com/spf13/pflag v1.0.5 // indirect
+ go.uber.org/atomic v1.7.0 // indirect
+ go.uber.org/multierr v1.6.0 // indirect
+ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 // indirect
+ golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c // indirect
+ golang.org/x/sys v0.0.0-20210510120138-977fb7262007 // indirect
+ golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect
+ golang.org/x/text v0.3.4 // indirect
+ golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect
+ google.golang.org/appengine v1.6.6 // indirect
+ google.golang.org/protobuf v1.25.0 // indirect
+ gopkg.in/fsnotify.v1 v1.4.7 // indirect
+ gopkg.in/inf.v0 v0.9.1 // indirect
+ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
+ gopkg.in/yaml.v2 v2.4.0 // indirect
+ k8s.io/apiextensions-apiserver v0.21.1 // indirect
+ k8s.io/client-go v0.21.1 // indirect
+ k8s.io/klog/v2 v2.8.0 // indirect
+ k8s.io/utils v0.0.0-20210527160623-6fdb442a123b // indirect
+ sigs.k8s.io/structured-merge-diff/v4 v4.1.0 // indirect
+ sigs.k8s.io/yaml v1.2.0 // indirect
+)
+
replace (
github.com/aws/aws-k8s-tester/client => ../../client
- github.com/aws/aws-k8s-tester/k8s-tester/helm => ../helm
github.com/aws/aws-k8s-tester/k8s-tester/tester => ../tester
github.com/aws/aws-k8s-tester/utils => ../../utils
)
diff --git a/k8s-tester/secrets/go.sum b/k8s-tester/secrets/go.sum
index 04432946e..61808165e 100644
--- a/k8s-tester/secrets/go.sum
+++ b/k8s-tester/secrets/go.sum
@@ -69,6 +69,8 @@ github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN
github.com/aws/aws-sdk-go v1.38.50 h1:9+dEpZbgjBMeoOes6QfZMC87uDMwM8Lw4E79L0/rPZI=
github.com/aws/aws-sdk-go v1.38.50/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
+github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
+github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
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=
@@ -137,6 +139,7 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv
github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
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/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
@@ -264,6 +267,7 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
+github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
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=
@@ -370,9 +374,11 @@ github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6
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=
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw=
github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
+github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME=
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis=
@@ -486,6 +492,7 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
go.etcd.io/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/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
@@ -503,6 +510,8 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.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/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4=
+go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
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.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
@@ -510,8 +519,8 @@ go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9i
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
-go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U=
-go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
+go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI=
+go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
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-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
@@ -554,6 +563,7 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -591,8 +601,9 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20210224082022-3d97a244fca7 h1:OgUuv8lsRpBibGNbSizVwKWlysjaNzmC9gYMhPVfqFM=
golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -610,6 +621,7 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -657,8 +669,10 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w
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-20210309074719-68d13333faf2 h1:46ULzRKLh1CwgRq2dC5SlBzEqqNCi8rreOZnNrbqcIY=
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE=
@@ -729,6 +743,7 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
+golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -826,6 +841,7 @@ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8X
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/cheggaaa/pb.v1 v1.0.25/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 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o=
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
@@ -834,6 +850,7 @@ gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
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=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
diff --git a/k8s-tester/splunk/go.mod b/k8s-tester/splunk/go.mod
index 26f125dbd..ee884397c 100644
--- a/k8s-tester/splunk/go.mod
+++ b/k8s-tester/splunk/go.mod
@@ -1,15 +1,15 @@
module github.com/aws/aws-k8s-tester/k8s-tester/splunk
-go 1.16
+go 1.17
require (
- github.com/aws/aws-k8s-tester/client v0.0.0-20210610170531-2e5d31e5196c
- github.com/aws/aws-k8s-tester/k8s-tester/helm v0.0.0-20210610170531-2e5d31e5196c
- github.com/aws/aws-k8s-tester/k8s-tester/tester v0.0.0-20210610170531-2e5d31e5196c
- github.com/aws/aws-k8s-tester/utils v0.0.0-20210722211631-7411a257e5a3
+ github.com/aws/aws-k8s-tester/client v0.0.0-00010101000000-000000000000
+ github.com/aws/aws-k8s-tester/k8s-tester/helm v0.0.0-00010101000000-000000000000
+ github.com/aws/aws-k8s-tester/k8s-tester/tester v0.0.0-00010101000000-000000000000
+ github.com/aws/aws-k8s-tester/utils v0.0.0-00010101000000-000000000000
github.com/manifoldco/promptui v0.8.0
github.com/spf13/cobra v1.1.3
- go.uber.org/zap v1.17.0
+ go.uber.org/zap v1.19.1
k8s.io/utils v0.0.0-20210527160623-6fdb442a123b
)
diff --git a/k8s-tester/splunk/go.sum b/k8s-tester/splunk/go.sum
index d5b532bdb..e23f57bd3 100644
--- a/k8s-tester/splunk/go.sum
+++ b/k8s-tester/splunk/go.sum
@@ -104,6 +104,8 @@ github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN
github.com/aws/aws-sdk-go v1.38.50 h1:9+dEpZbgjBMeoOes6QfZMC87uDMwM8Lw4E79L0/rPZI=
github.com/aws/aws-sdk-go v1.38.50/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
+github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
+github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
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=
@@ -237,6 +239,7 @@ github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoD
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/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/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0=
github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7 h1:LofdAjjjqCSXMwLGgOgnE+rdPuvX9DxCqaHwKy7i/ko=
@@ -782,6 +785,7 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43 h1:+lm10QQTNSBd8DVTNGHx7o/IKu9HYDvLMffDhbyLccI=
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 h1:hlE8//ciYMztlGpl/VA+Zm1AcTPHYkHJPbHqE6WJUXE=
@@ -813,6 +817,8 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.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/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4=
+go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
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.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
@@ -820,8 +826,8 @@ go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9i
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
-go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U=
-go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
+go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI=
+go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
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-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
@@ -872,6 +878,7 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -914,8 +921,9 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20210224082022-3d97a244fca7 h1:OgUuv8lsRpBibGNbSizVwKWlysjaNzmC9gYMhPVfqFM=
golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -932,8 +940,9 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20201207232520-09787c993a3a h1:DcqTD9SDLc+1P/r1EmRBwnVsrOwW+kk2vWf9n+1sGhs=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -991,8 +1000,10 @@ golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7w
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-20210309074719-68d13333faf2 h1:46ULzRKLh1CwgRq2dC5SlBzEqqNCi8rreOZnNrbqcIY=
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE=
@@ -1067,6 +1078,7 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
+golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -1202,8 +1214,6 @@ gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81
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=
-helm.sh/helm/v3 v3.6.0 h1:/9IMxJ2lXJHbvTMHcW1AO71lXQHqDC+3bcpGp7yCsb8=
-helm.sh/helm/v3 v3.6.0/go.mod h1:mIIus8EOqj+obtycw3sidsR4ORr2aFDmXMSI3k+oeVY=
helm.sh/helm/v3 v3.6.1 h1:TQ6q4pAatXr7qh2fbLcb0oNd0I3J7kv26oo5cExKTtc=
helm.sh/helm/v3 v3.6.1/go.mod h1:mIIus8EOqj+obtycw3sidsR4ORr2aFDmXMSI3k+oeVY=
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
diff --git a/k8s-tester/stress/go.mod b/k8s-tester/stress/go.mod
index c0346132e..888eac94c 100644
--- a/k8s-tester/stress/go.mod
+++ b/k8s-tester/stress/go.mod
@@ -1,6 +1,6 @@
module github.com/aws/aws-k8s-tester/k8s-tester/stress
-go 1.16
+go 1.17
require (
github.com/aws/aws-k8s-tester/client v0.0.0-00010101000000-000000000000
@@ -11,7 +11,7 @@ require (
github.com/manifoldco/promptui v0.8.0
github.com/prometheus/client_golang v1.10.0
github.com/spf13/cobra v1.1.3
- go.uber.org/zap v1.17.0
+ go.uber.org/zap v1.19.1
k8s.io/api v0.21.1
k8s.io/apimachinery v0.21.1
k8s.io/client-go v0.21.1
@@ -19,9 +19,60 @@ require (
sigs.k8s.io/yaml v1.2.0
)
+require (
+ github.com/beorn7/perks v1.0.1 // indirect
+ github.com/briandowns/spinner v1.13.0 // indirect
+ github.com/cespare/xxhash/v2 v2.1.1 // indirect
+ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect
+ github.com/davecgh/go-spew v1.1.1 // indirect
+ github.com/fatih/color v1.7.0 // indirect
+ github.com/go-logr/logr v0.4.0 // indirect
+ github.com/gogo/protobuf v1.3.2 // indirect
+ github.com/golang/protobuf v1.4.3 // indirect
+ github.com/google/go-cmp v0.5.4 // indirect
+ github.com/google/gofuzz v1.1.0 // indirect
+ github.com/googleapis/gnostic v0.4.1 // indirect
+ github.com/hpcloud/tail v1.0.0 // indirect
+ github.com/imdario/mergo v0.3.5 // indirect
+ github.com/inconshreveable/mousetrap v1.0.0 // indirect
+ github.com/jmespath/go-jmespath v0.4.0 // indirect
+ github.com/json-iterator/go v1.1.10 // indirect
+ github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a // indirect
+ github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a // indirect
+ github.com/mattn/go-colorable v0.1.2 // indirect
+ github.com/mattn/go-isatty v0.0.8 // indirect
+ github.com/mattn/go-runewidth v0.0.9 // indirect
+ github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
+ github.com/mitchellh/ioprogress v0.0.0-20180201004757-6a23b12fa88e // indirect
+ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
+ github.com/modern-go/reflect2 v1.0.1 // indirect
+ github.com/olekukonko/tablewriter v0.0.5 // indirect
+ github.com/onsi/ginkgo v1.11.0 // indirect
+ github.com/prometheus/client_model v0.2.0 // indirect
+ github.com/prometheus/common v0.18.0 // indirect
+ github.com/prometheus/procfs v0.6.0 // indirect
+ github.com/spf13/pflag v1.0.5 // indirect
+ go.uber.org/atomic v1.7.0 // indirect
+ go.uber.org/multierr v1.6.0 // indirect
+ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 // indirect
+ golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c // indirect
+ golang.org/x/sys v0.0.0-20210510120138-977fb7262007 // indirect
+ golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect
+ golang.org/x/text v0.3.4 // indirect
+ golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect
+ google.golang.org/appengine v1.6.6 // indirect
+ google.golang.org/protobuf v1.25.0 // indirect
+ gopkg.in/fsnotify.v1 v1.4.7 // indirect
+ gopkg.in/inf.v0 v0.9.1 // indirect
+ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
+ gopkg.in/yaml.v2 v2.4.0 // indirect
+ k8s.io/apiextensions-apiserver v0.21.1 // indirect
+ k8s.io/klog/v2 v2.8.0 // indirect
+ sigs.k8s.io/structured-merge-diff/v4 v4.1.0 // indirect
+)
+
replace (
github.com/aws/aws-k8s-tester/client => ../../client
- github.com/aws/aws-k8s-tester/k8s-tester/helm => ../helm
github.com/aws/aws-k8s-tester/k8s-tester/tester => ../tester
github.com/aws/aws-k8s-tester/utils => ../../utils
)
diff --git a/k8s-tester/stress/go.sum b/k8s-tester/stress/go.sum
index 04432946e..61808165e 100644
--- a/k8s-tester/stress/go.sum
+++ b/k8s-tester/stress/go.sum
@@ -69,6 +69,8 @@ github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN
github.com/aws/aws-sdk-go v1.38.50 h1:9+dEpZbgjBMeoOes6QfZMC87uDMwM8Lw4E79L0/rPZI=
github.com/aws/aws-sdk-go v1.38.50/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
+github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
+github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
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=
@@ -137,6 +139,7 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv
github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
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/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
@@ -264,6 +267,7 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
+github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
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=
@@ -370,9 +374,11 @@ github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6
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=
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw=
github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
+github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME=
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis=
@@ -486,6 +492,7 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
go.etcd.io/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/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
@@ -503,6 +510,8 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.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/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4=
+go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
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.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
@@ -510,8 +519,8 @@ go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9i
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
-go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U=
-go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
+go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI=
+go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
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-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
@@ -554,6 +563,7 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -591,8 +601,9 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20210224082022-3d97a244fca7 h1:OgUuv8lsRpBibGNbSizVwKWlysjaNzmC9gYMhPVfqFM=
golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -610,6 +621,7 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -657,8 +669,10 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w
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-20210309074719-68d13333faf2 h1:46ULzRKLh1CwgRq2dC5SlBzEqqNCi8rreOZnNrbqcIY=
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE=
@@ -729,6 +743,7 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
+golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -826,6 +841,7 @@ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8X
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/cheggaaa/pb.v1 v1.0.25/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 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o=
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
@@ -834,6 +850,7 @@ gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
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=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
diff --git a/k8s-tester/sysdig/go.mod b/k8s-tester/sysdig/go.mod
index fba56abec..9660ef8ac 100644
--- a/k8s-tester/sysdig/go.mod
+++ b/k8s-tester/sysdig/go.mod
@@ -1,15 +1,15 @@
module github.com/aws/aws-k8s-tester/k8s-tester/sysdig
-go 1.16
+go 1.17
require (
- github.com/aws/aws-k8s-tester/client v0.0.0-20210610170531-2e5d31e5196c
- github.com/aws/aws-k8s-tester/k8s-tester/helm v0.0.0-20210610170531-2e5d31e5196c
- github.com/aws/aws-k8s-tester/k8s-tester/tester v0.0.0-20210610170531-2e5d31e5196c
- github.com/aws/aws-k8s-tester/utils v0.0.0-20210610170531-2e5d31e5196c
+ github.com/aws/aws-k8s-tester/client v0.0.0-00010101000000-000000000000
+ github.com/aws/aws-k8s-tester/k8s-tester/helm v0.0.0-00010101000000-000000000000
+ github.com/aws/aws-k8s-tester/k8s-tester/tester v0.0.0-00010101000000-000000000000
+ github.com/aws/aws-k8s-tester/utils v0.0.0-00010101000000-000000000000
github.com/manifoldco/promptui v0.8.0
github.com/spf13/cobra v1.1.3
- go.uber.org/zap v1.17.0
+ go.uber.org/zap v1.19.1
k8s.io/utils v0.0.0-20210527160623-6fdb442a123b
)
diff --git a/k8s-tester/sysdig/go.sum b/k8s-tester/sysdig/go.sum
index 517ecaa24..e23f57bd3 100644
--- a/k8s-tester/sysdig/go.sum
+++ b/k8s-tester/sysdig/go.sum
@@ -104,6 +104,8 @@ github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN
github.com/aws/aws-sdk-go v1.38.50 h1:9+dEpZbgjBMeoOes6QfZMC87uDMwM8Lw4E79L0/rPZI=
github.com/aws/aws-sdk-go v1.38.50/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
+github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
+github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
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=
@@ -237,6 +239,7 @@ github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoD
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/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/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0=
github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7 h1:LofdAjjjqCSXMwLGgOgnE+rdPuvX9DxCqaHwKy7i/ko=
@@ -782,6 +785,7 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43 h1:+lm10QQTNSBd8DVTNGHx7o/IKu9HYDvLMffDhbyLccI=
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 h1:hlE8//ciYMztlGpl/VA+Zm1AcTPHYkHJPbHqE6WJUXE=
@@ -813,6 +817,8 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.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/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4=
+go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
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.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
@@ -820,8 +826,8 @@ go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9i
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
-go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U=
-go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
+go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI=
+go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
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-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
@@ -872,6 +878,7 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -914,8 +921,9 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20210224082022-3d97a244fca7 h1:OgUuv8lsRpBibGNbSizVwKWlysjaNzmC9gYMhPVfqFM=
golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -932,8 +940,9 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20201207232520-09787c993a3a h1:DcqTD9SDLc+1P/r1EmRBwnVsrOwW+kk2vWf9n+1sGhs=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -991,8 +1000,10 @@ golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7w
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-20210309074719-68d13333faf2 h1:46ULzRKLh1CwgRq2dC5SlBzEqqNCi8rreOZnNrbqcIY=
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE=
@@ -1067,6 +1078,7 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
+golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -1202,8 +1214,8 @@ gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81
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=
-helm.sh/helm/v3 v3.6.0 h1:/9IMxJ2lXJHbvTMHcW1AO71lXQHqDC+3bcpGp7yCsb8=
-helm.sh/helm/v3 v3.6.0/go.mod h1:mIIus8EOqj+obtycw3sidsR4ORr2aFDmXMSI3k+oeVY=
+helm.sh/helm/v3 v3.6.1 h1:TQ6q4pAatXr7qh2fbLcb0oNd0I3J7kv26oo5cExKTtc=
+helm.sh/helm/v3 v3.6.1/go.mod h1:mIIus8EOqj+obtycw3sidsR4ORr2aFDmXMSI3k+oeVY=
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
diff --git a/k8s-tester/tester/go.mod b/k8s-tester/tester/go.mod
index 11fe6dd9f..bb0356de3 100644
--- a/k8s-tester/tester/go.mod
+++ b/k8s-tester/tester/go.mod
@@ -1,3 +1,3 @@
module github.com/aws/aws-k8s-tester/k8s-tester/tester
-go 1.16
+go 1.17
diff --git a/k8s-tester/vault/go.mod b/k8s-tester/vault/go.mod
index 6fc574e21..2164cc520 100644
--- a/k8s-tester/vault/go.mod
+++ b/k8s-tester/vault/go.mod
@@ -1,21 +1,21 @@
module github.com/aws/aws-k8s-tester/k8s-tester/vault
-go 1.16
-
-replace (
- github.com/aws/aws-k8s-tester/client => ../../client
- github.com/aws/aws-k8s-tester/k8s-tester/helm => ../helm
- github.com/aws/aws-k8s-tester/k8s-tester/tester => ../tester
- github.com/aws/aws-k8s-tester/utils => ../../utils
-)
+go 1.17
require (
github.com/aws/aws-k8s-tester/client v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/helm v0.0.0-00010101000000-000000000000
github.com/aws/aws-k8s-tester/k8s-tester/tester v0.0.0-00010101000000-000000000000
- github.com/aws/aws-k8s-tester/utils v0.0.0-20210722211631-7411a257e5a3
+ github.com/aws/aws-k8s-tester/utils v0.0.0-00010101000000-000000000000
github.com/manifoldco/promptui v0.8.0
github.com/spf13/cobra v1.2.1
- go.uber.org/zap v1.18.1
+ go.uber.org/zap v1.19.1
k8s.io/utils v0.0.0-20210802155522-efc7438f0176
)
+
+replace (
+ github.com/aws/aws-k8s-tester/client => ../../client
+ github.com/aws/aws-k8s-tester/k8s-tester/helm => ../helm
+ github.com/aws/aws-k8s-tester/k8s-tester/tester => ../tester
+ github.com/aws/aws-k8s-tester/utils => ../../utils
+)
diff --git a/k8s-tester/vault/go.sum b/k8s-tester/vault/go.sum
index 7926c1728..29d603f0b 100644
--- a/k8s-tester/vault/go.sum
+++ b/k8s-tester/vault/go.sum
@@ -860,8 +860,8 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.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/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0=
-go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A=
+go.uber.org/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4=
+go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
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.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
@@ -870,8 +870,8 @@ go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9E
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
-go.uber.org/zap v1.18.1 h1:CSUJ2mjFszzEWt4CdKISEuChVIXGBn3lAPwkRGyVrc4=
-go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI=
+go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI=
+go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
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-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
@@ -915,7 +915,6 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu
golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
-golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug=
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
@@ -1117,7 +1116,6 @@ golang.org/x/tools v0.0.0-20191004055002-72853e10c5a3/go.mod h1:b+2E5dAYhXwXZwtn
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-20191108193012-7d206e10da11/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=
@@ -1154,8 +1152,8 @@ golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4f
golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
-golang.org/x/tools v0.1.2 h1:kRBLX7v7Af8W7Gdbbc908OJcdgtK8bOz9Uaj8/F1ACA=
golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
+golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
diff --git a/k8s-tester/wordpress/go.mod b/k8s-tester/wordpress/go.mod
index fc3f96ce4..6225ccb7d 100644
--- a/k8s-tester/wordpress/go.mod
+++ b/k8s-tester/wordpress/go.mod
@@ -1,6 +1,6 @@
module github.com/aws/aws-k8s-tester/k8s-tester/wordpress
-go 1.16
+go 1.17
require (
github.com/aws/aws-k8s-tester/client v0.0.0-00010101000000-000000000000
@@ -10,7 +10,7 @@ require (
github.com/aws/aws-sdk-go v1.38.50
github.com/manifoldco/promptui v0.8.0
github.com/spf13/cobra v1.1.3
- go.uber.org/zap v1.17.0
+ go.uber.org/zap v1.19.1
k8s.io/utils v0.0.0-20210527160623-6fdb442a123b
)
diff --git a/k8s-tester/wordpress/go.sum b/k8s-tester/wordpress/go.sum
index 517ecaa24..e23f57bd3 100644
--- a/k8s-tester/wordpress/go.sum
+++ b/k8s-tester/wordpress/go.sum
@@ -104,6 +104,8 @@ github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN
github.com/aws/aws-sdk-go v1.38.50 h1:9+dEpZbgjBMeoOes6QfZMC87uDMwM8Lw4E79L0/rPZI=
github.com/aws/aws-sdk-go v1.38.50/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
+github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
+github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
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=
@@ -237,6 +239,7 @@ github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoD
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/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/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0=
github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7 h1:LofdAjjjqCSXMwLGgOgnE+rdPuvX9DxCqaHwKy7i/ko=
@@ -782,6 +785,7 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43 h1:+lm10QQTNSBd8DVTNGHx7o/IKu9HYDvLMffDhbyLccI=
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 h1:hlE8//ciYMztlGpl/VA+Zm1AcTPHYkHJPbHqE6WJUXE=
@@ -813,6 +817,8 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.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/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4=
+go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
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.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
@@ -820,8 +826,8 @@ go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9i
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
-go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U=
-go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
+go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI=
+go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
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-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
@@ -872,6 +878,7 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -914,8 +921,9 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20210224082022-3d97a244fca7 h1:OgUuv8lsRpBibGNbSizVwKWlysjaNzmC9gYMhPVfqFM=
golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -932,8 +940,9 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20201207232520-09787c993a3a h1:DcqTD9SDLc+1P/r1EmRBwnVsrOwW+kk2vWf9n+1sGhs=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -991,8 +1000,10 @@ golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7w
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-20210309074719-68d13333faf2 h1:46ULzRKLh1CwgRq2dC5SlBzEqqNCi8rreOZnNrbqcIY=
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE=
@@ -1067,6 +1078,7 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
+golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -1202,8 +1214,8 @@ gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81
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=
-helm.sh/helm/v3 v3.6.0 h1:/9IMxJ2lXJHbvTMHcW1AO71lXQHqDC+3bcpGp7yCsb8=
-helm.sh/helm/v3 v3.6.0/go.mod h1:mIIus8EOqj+obtycw3sidsR4ORr2aFDmXMSI3k+oeVY=
+helm.sh/helm/v3 v3.6.1 h1:TQ6q4pAatXr7qh2fbLcb0oNd0I3J7kv26oo5cExKTtc=
+helm.sh/helm/v3 v3.6.1/go.mod h1:mIIus8EOqj+obtycw3sidsR4ORr2aFDmXMSI3k+oeVY=
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
diff --git a/utils/go.mod b/utils/go.mod
index fa89f95ec..d4956a1c0 100644
--- a/utils/go.mod
+++ b/utils/go.mod
@@ -1,6 +1,6 @@
module github.com/aws/aws-k8s-tester/utils
-go 1.16
+go 1.17
require (
github.com/aws/aws-sdk-go v1.38.50
@@ -10,7 +10,7 @@ require (
github.com/olekukonko/tablewriter v0.0.5
github.com/prometheus/client_golang v1.10.0
github.com/prometheus/client_model v0.2.0
- go.uber.org/zap v1.17.0
+ go.uber.org/zap v1.19.1
k8s.io/client-go v0.21.1
k8s.io/utils v0.0.0-20210527160623-6fdb442a123b
)
diff --git a/utils/go.sum b/utils/go.sum
index b07eb309b..a0cd1d98d 100644
--- a/utils/go.sum
+++ b/utils/go.sum
@@ -55,6 +55,8 @@ github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN
github.com/aws/aws-sdk-go v1.38.50 h1:9+dEpZbgjBMeoOes6QfZMC87uDMwM8Lw4E79L0/rPZI=
github.com/aws/aws-sdk-go v1.38.50/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
+github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
+github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
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=
@@ -389,6 +391,7 @@ github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtX
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg=
go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
@@ -401,6 +404,8 @@ go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.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/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4=
+go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
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.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
@@ -408,8 +413,8 @@ go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9i
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
-go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U=
-go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
+go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI=
+go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
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-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
@@ -451,6 +456,7 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB
golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -482,6 +488,7 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R
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-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -495,6 +502,7 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -534,8 +542,10 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/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-20210309074719-68d13333faf2 h1:46ULzRKLh1CwgRq2dC5SlBzEqqNCi8rreOZnNrbqcIY=
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
@@ -589,6 +599,7 @@ golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapK
golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
diff --git a/vendor/cloud.google.com/go/compute/metadata/metadata.go b/vendor/cloud.google.com/go/compute/metadata/metadata.go
index 125b7033c..1a7a4c7e5 100644
--- a/vendor/cloud.google.com/go/compute/metadata/metadata.go
+++ b/vendor/cloud.google.com/go/compute/metadata/metadata.go
@@ -61,25 +61,14 @@ var (
instID = &cachedValue{k: "instance/id", trim: true}
)
-var (
- defaultClient = &Client{hc: &http.Client{
- Transport: &http.Transport{
- Dial: (&net.Dialer{
- Timeout: 2 * time.Second,
- KeepAlive: 30 * time.Second,
- }).Dial,
- ResponseHeaderTimeout: 2 * time.Second,
- },
- }}
- subscribeClient = &Client{hc: &http.Client{
- Transport: &http.Transport{
- Dial: (&net.Dialer{
- Timeout: 2 * time.Second,
- KeepAlive: 30 * time.Second,
- }).Dial,
- },
- }}
-)
+var defaultClient = &Client{hc: &http.Client{
+ Transport: &http.Transport{
+ Dial: (&net.Dialer{
+ Timeout: 2 * time.Second,
+ KeepAlive: 30 * time.Second,
+ }).Dial,
+ },
+}}
// NotDefinedError is returned when requested metadata is not defined.
//
@@ -206,10 +195,9 @@ func systemInfoSuggestsGCE() bool {
return name == "Google" || name == "Google Compute Engine"
}
-// Subscribe calls Client.Subscribe on a client designed for subscribing (one with no
-// ResponseHeaderTimeout).
+// Subscribe calls Client.Subscribe on the default client.
func Subscribe(suffix string, fn func(v string, ok bool) error) error {
- return subscribeClient.Subscribe(suffix, fn)
+ return defaultClient.Subscribe(suffix, fn)
}
// Get calls Client.Get on the default client.
@@ -227,6 +215,9 @@ func InternalIP() (string, error) { return defaultClient.InternalIP() }
// ExternalIP returns the instance's primary external (public) IP address.
func ExternalIP() (string, error) { return defaultClient.ExternalIP() }
+// Email calls Client.Email on the default client.
+func Email(serviceAccount string) (string, error) { return defaultClient.Email(serviceAccount) }
+
// Hostname returns the instance's hostname. This will be of the form
// ".c..internal".
func Hostname() (string, error) { return defaultClient.Hostname() }
@@ -277,9 +268,14 @@ type Client struct {
hc *http.Client
}
-// NewClient returns a Client that can be used to fetch metadata. All HTTP requests
-// will use the given http.Client instead of the default client.
+// NewClient returns a Client that can be used to fetch metadata.
+// Returns the client that uses the specified http.Client for HTTP requests.
+// If nil is specified, returns the default client.
func NewClient(c *http.Client) *Client {
+ if c == nil {
+ return defaultClient
+ }
+
return &Client{hc: c}
}
@@ -301,7 +297,10 @@ func (c *Client) getETag(suffix string) (value, etag string, err error) {
host = metadataIP
}
u := "http://" + host + "/computeMetadata/v1/" + suffix
- req, _ := http.NewRequest("GET", u, nil)
+ req, err := http.NewRequest("GET", u, nil)
+ if err != nil {
+ return "", "", err
+ }
req.Header.Set("Metadata-Flavor", "Google")
req.Header.Set("User-Agent", userAgent)
res, err := c.hc.Do(req)
@@ -367,6 +366,16 @@ func (c *Client) InternalIP() (string, error) {
return c.getTrimmed("instance/network-interfaces/0/ip")
}
+// Email returns the email address associated with the service account.
+// The account may be empty or the string "default" to use the instance's
+// main account.
+func (c *Client) Email(serviceAccount string) (string, error) {
+ if serviceAccount == "" {
+ serviceAccount = "default"
+ }
+ return c.getTrimmed("instance/service-accounts/" + serviceAccount + "/email")
+}
+
// ExternalIP returns the instance's primary external (public) IP address.
func (c *Client) ExternalIP() (string, error) {
return c.getTrimmed("instance/network-interfaces/0/access-configs/0/external-ip")
@@ -394,11 +403,7 @@ func (c *Client) InstanceTags() ([]string, error) {
// InstanceName returns the current VM's instance ID string.
func (c *Client) InstanceName() (string, error) {
- host, err := c.Hostname()
- if err != nil {
- return "", err
- }
- return strings.Split(host, ".")[0], nil
+ return c.getTrimmed("instance/name")
}
// Zone returns the current VM's zone, such as "us-central1-b".
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/LICENSE b/vendor/github.com/Azure/azure-sdk-for-go/LICENSE
index af39a91e7..047555ec7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/LICENSE
+++ b/vendor/github.com/Azure/azure-sdk-for-go/LICENSE
@@ -187,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.
- Copyright 2016 Microsoft Corporation
+ 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.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/availabilitysets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/availabilitysets.go
index 929455173..e48404446 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/availabilitysets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/availabilitysets.go
@@ -35,7 +35,9 @@ func NewAvailabilitySetsClient(subscriptionID string) AvailabilitySetsClient {
return NewAvailabilitySetsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewAvailabilitySetsClientWithBaseURI creates an instance of the AvailabilitySetsClient client.
+// 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)}
}
@@ -103,8 +105,7 @@ func (client AvailabilitySetsClient) CreateOrUpdatePreparer(ctx context.Context,
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
@@ -180,8 +181,7 @@ func (client AvailabilitySetsClient) DeletePreparer(ctx context.Context, resourc
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// DeleteResponder handles the response to the Delete request. The method always
@@ -256,8 +256,7 @@ func (client AvailabilitySetsClient) GetPreparer(ctx context.Context, resourceGr
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -332,8 +331,7 @@ func (client AvailabilitySetsClient) ListPreparer(ctx context.Context, resourceG
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -447,8 +445,7 @@ func (client AvailabilitySetsClient) ListAvailableSizesPreparer(ctx context.Cont
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListAvailableSizesResponder handles the response to the ListAvailableSizes request. The method always
@@ -525,8 +522,7 @@ func (client AvailabilitySetsClient) ListBySubscriptionPreparer(ctx context.Cont
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always
@@ -642,8 +638,7 @@ func (client AvailabilitySetsClient) UpdatePreparer(ctx context.Context, resourc
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client AvailabilitySetsClient) UpdateSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// UpdateResponder handles the response to the Update request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/client.go
index b23c9ca74..d9d043019 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/client.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/client.go
@@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient {
return NewWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewWithBaseURI creates an instance of the BaseClient client.
+// 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()),
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/containerservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/containerservices.go
index d3192f0de..0d0f705da 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/containerservices.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/containerservices.go
@@ -36,7 +36,9 @@ func NewContainerServicesClient(subscriptionID string) ContainerServicesClient {
return NewContainerServicesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client.
+// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient 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 NewContainerServicesClientWithBaseURI(baseURI string, subscriptionID string) ContainerServicesClient {
return ContainerServicesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -130,9 +132,8 @@ func (client ContainerServicesClient) CreateOrUpdatePreparer(ctx context.Context
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ContainerServicesClient) CreateOrUpdateSender(req *http.Request) (future ContainerServicesCreateOrUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -210,9 +211,8 @@ func (client ContainerServicesClient) DeletePreparer(ctx context.Context, resour
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ContainerServicesClient) DeleteSender(req *http.Request) (future ContainerServicesDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -294,8 +294,7 @@ func (client ContainerServicesClient) GetPreparer(ctx context.Context, resourceG
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client ContainerServicesClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -368,8 +367,7 @@ func (client ContainerServicesClient) ListPreparer(ctx context.Context) (*http.R
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client ContainerServicesClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -483,8 +481,7 @@ func (client ContainerServicesClient) ListByResourceGroupPreparer(ctx context.Co
// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
// http.Response Body if it receives an error.
func (client ContainerServicesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/dedicatedhostgroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/dedicatedhostgroups.go
index c786ffefc..e51c1a787 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/dedicatedhostgroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/dedicatedhostgroups.go
@@ -36,7 +36,9 @@ func NewDedicatedHostGroupsClient(subscriptionID string) DedicatedHostGroupsClie
return NewDedicatedHostGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewDedicatedHostGroupsClientWithBaseURI creates an instance of the DedicatedHostGroupsClient client.
+// NewDedicatedHostGroupsClientWithBaseURI creates an instance of the DedicatedHostGroupsClient client using a custom
+// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure
+// stack).
func NewDedicatedHostGroupsClientWithBaseURI(baseURI string, subscriptionID string) DedicatedHostGroupsClient {
return DedicatedHostGroupsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -63,7 +65,7 @@ func (client DedicatedHostGroupsClient) CreateOrUpdate(ctx context.Context, reso
Constraints: []validation.Constraint{{Target: "parameters.DedicatedHostGroupProperties", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "parameters.DedicatedHostGroupProperties.PlatformFaultDomainCount", Name: validation.Null, Rule: true,
Chain: []validation.Constraint{{Target: "parameters.DedicatedHostGroupProperties.PlatformFaultDomainCount", Name: validation.InclusiveMaximum, Rule: int64(3), Chain: nil},
- {Target: "parameters.DedicatedHostGroupProperties.PlatformFaultDomainCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil},
+ {Target: "parameters.DedicatedHostGroupProperties.PlatformFaultDomainCount", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil},
}},
}}}}}); err != nil {
return result, validation.NewError("compute.DedicatedHostGroupsClient", "CreateOrUpdate", err.Error())
@@ -116,8 +118,7 @@ func (client DedicatedHostGroupsClient) CreateOrUpdatePreparer(ctx context.Conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client DedicatedHostGroupsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
@@ -193,8 +194,7 @@ func (client DedicatedHostGroupsClient) DeletePreparer(ctx context.Context, reso
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client DedicatedHostGroupsClient) DeleteSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// DeleteResponder handles the response to the Delete request. The method always
@@ -269,8 +269,7 @@ func (client DedicatedHostGroupsClient) GetPreparer(ctx context.Context, resourc
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client DedicatedHostGroupsClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -346,8 +345,7 @@ func (client DedicatedHostGroupsClient) ListByResourceGroupPreparer(ctx context.
// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
// http.Response Body if it receives an error.
func (client DedicatedHostGroupsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
@@ -457,8 +455,7 @@ func (client DedicatedHostGroupsClient) ListBySubscriptionPreparer(ctx context.C
// ListBySubscriptionSender sends the ListBySubscription request. The method will close the
// http.Response Body if it receives an error.
func (client DedicatedHostGroupsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always
@@ -574,8 +571,7 @@ func (client DedicatedHostGroupsClient) UpdatePreparer(ctx context.Context, reso
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client DedicatedHostGroupsClient) UpdateSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// UpdateResponder handles the response to the Update request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/dedicatedhosts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/dedicatedhosts.go
index fb6ff5952..5632e7393 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/dedicatedhosts.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/dedicatedhosts.go
@@ -36,7 +36,8 @@ func NewDedicatedHostsClient(subscriptionID string) DedicatedHostsClient {
return NewDedicatedHostsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewDedicatedHostsClientWithBaseURI creates an instance of the DedicatedHostsClient client.
+// NewDedicatedHostsClientWithBaseURI creates an instance of the DedicatedHostsClient client using a custom endpoint.
+// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
func NewDedicatedHostsClientWithBaseURI(baseURI string, subscriptionID string) DedicatedHostsClient {
return DedicatedHostsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -63,7 +64,7 @@ func (client DedicatedHostsClient) CreateOrUpdate(ctx context.Context, resourceG
Constraints: []validation.Constraint{{Target: "parameters.DedicatedHostProperties", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "parameters.DedicatedHostProperties.PlatformFaultDomain", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "parameters.DedicatedHostProperties.PlatformFaultDomain", Name: validation.InclusiveMaximum, Rule: int64(2), Chain: nil},
- {Target: "parameters.DedicatedHostProperties.PlatformFaultDomain", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil},
+ {Target: "parameters.DedicatedHostProperties.PlatformFaultDomain", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
}},
}},
{Target: "parameters.Sku", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -112,9 +113,8 @@ func (client DedicatedHostsClient) CreateOrUpdatePreparer(ctx context.Context, r
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client DedicatedHostsClient) CreateOrUpdateSender(req *http.Request) (future DedicatedHostsCreateOrUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -191,9 +191,8 @@ func (client DedicatedHostsClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client DedicatedHostsClient) DeleteSender(req *http.Request) (future DedicatedHostsDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -279,8 +278,7 @@ func (client DedicatedHostsClient) GetPreparer(ctx context.Context, resourceGrou
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client DedicatedHostsClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -358,8 +356,7 @@ func (client DedicatedHostsClient) ListByHostGroupPreparer(ctx context.Context,
// ListByHostGroupSender sends the ListByHostGroup request. The method will close the
// http.Response Body if it receives an error.
func (client DedicatedHostsClient) ListByHostGroupSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByHostGroupResponder handles the response to the ListByHostGroup request. The method always
@@ -471,9 +468,8 @@ func (client DedicatedHostsClient) UpdatePreparer(ctx context.Context, resourceG
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client DedicatedHostsClient) UpdateSender(req *http.Request) (future DedicatedHostsUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/diskencryptionsets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/diskencryptionsets.go
index cb93acdde..a6013cb97 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/diskencryptionsets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/diskencryptionsets.go
@@ -36,7 +36,9 @@ func NewDiskEncryptionSetsClient(subscriptionID string) DiskEncryptionSetsClient
return NewDiskEncryptionSetsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewDiskEncryptionSetsClientWithBaseURI creates an instance of the DiskEncryptionSetsClient client.
+// NewDiskEncryptionSetsClientWithBaseURI creates an instance of the DiskEncryptionSetsClient client using a custom
+// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure
+// stack).
func NewDiskEncryptionSetsClientWithBaseURI(baseURI string, subscriptionID string) DiskEncryptionSetsClient {
return DiskEncryptionSetsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -112,9 +114,8 @@ func (client DiskEncryptionSetsClient) CreateOrUpdatePreparer(ctx context.Contex
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client DiskEncryptionSetsClient) CreateOrUpdateSender(req *http.Request) (future DiskEncryptionSetsCreateOrUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -191,9 +192,8 @@ func (client DiskEncryptionSetsClient) DeletePreparer(ctx context.Context, resou
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client DiskEncryptionSetsClient) DeleteSender(req *http.Request) (future DiskEncryptionSetsDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -275,8 +275,7 @@ func (client DiskEncryptionSetsClient) GetPreparer(ctx context.Context, resource
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client DiskEncryptionSetsClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -348,8 +347,7 @@ func (client DiskEncryptionSetsClient) ListPreparer(ctx context.Context) (*http.
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client DiskEncryptionSetsClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -461,8 +459,7 @@ func (client DiskEncryptionSetsClient) ListByResourceGroupPreparer(ctx context.C
// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
// http.Response Body if it receives an error.
func (client DiskEncryptionSetsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
@@ -575,9 +572,8 @@ func (client DiskEncryptionSetsClient) UpdatePreparer(ctx context.Context, resou
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client DiskEncryptionSetsClient) UpdateSender(req *http.Request) (future DiskEncryptionSetsUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/disks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/disks.go
index 4bf336689..fc2d8e052 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/disks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/disks.go
@@ -36,7 +36,8 @@ func NewDisksClient(subscriptionID string) DisksClient {
return NewDisksClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewDisksClientWithBaseURI creates an instance of the DisksClient client.
+// 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)}
}
@@ -114,9 +115,8 @@ func (client DisksClient) CreateOrUpdatePreparer(ctx context.Context, resourceGr
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -193,9 +193,8 @@ func (client DisksClient) DeletePreparer(ctx context.Context, resourceGroupName
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -277,8 +276,7 @@ func (client DisksClient) GetPreparer(ctx context.Context, resourceGroupName str
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -359,9 +357,8 @@ func (client DisksClient) GrantAccessPreparer(ctx context.Context, resourceGroup
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -438,8 +435,7 @@ func (client DisksClient) ListPreparer(ctx context.Context) (*http.Request, erro
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -551,8 +547,7 @@ func (client DisksClient) ListByResourceGroupPreparer(ctx context.Context, resou
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
@@ -661,9 +656,8 @@ func (client DisksClient) RevokeAccessPreparer(ctx context.Context, resourceGrou
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -742,9 +736,8 @@ func (client DisksClient) UpdatePreparer(ctx context.Context, resourceGroupName
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleries.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleries.go
index 553defda1..f9e53940b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleries.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleries.go
@@ -35,7 +35,8 @@ func NewGalleriesClient(subscriptionID string) GalleriesClient {
return NewGalleriesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewGalleriesClientWithBaseURI creates an instance of the GalleriesClient client.
+// NewGalleriesClientWithBaseURI creates an instance of the GalleriesClient client using a custom endpoint. Use this
+// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
func NewGalleriesClientWithBaseURI(baseURI string, subscriptionID string) GalleriesClient {
return GalleriesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -98,9 +99,8 @@ func (client GalleriesClient) CreateOrUpdatePreparer(ctx context.Context, resour
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client GalleriesClient) CreateOrUpdateSender(req *http.Request) (future GalleriesCreateOrUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -175,9 +175,8 @@ func (client GalleriesClient) DeletePreparer(ctx context.Context, resourceGroupN
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client GalleriesClient) DeleteSender(req *http.Request) (future GalleriesDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -257,8 +256,7 @@ func (client GalleriesClient) GetPreparer(ctx context.Context, resourceGroupName
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client GalleriesClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -330,8 +328,7 @@ func (client GalleriesClient) ListPreparer(ctx context.Context) (*http.Request,
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client GalleriesClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -443,8 +440,7 @@ func (client GalleriesClient) ListByResourceGroupPreparer(ctx context.Context, r
// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
// http.Response Body if it receives an error.
func (client GalleriesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
@@ -496,3 +492,83 @@ func (client GalleriesClient) ListByResourceGroupComplete(ctx context.Context, r
result.page, err = client.ListByResourceGroup(ctx, resourceGroupName)
return
}
+
+// Update update a Shared Image Gallery.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Image Gallery. The allowed characters are alphabets and numbers with
+// dots and periods allowed in the middle. The maximum length is 80 characters.
+// gallery - parameters supplied to the update Shared Image Gallery operation.
+func (client GalleriesClient) Update(ctx context.Context, resourceGroupName string, galleryName string, gallery GalleryUpdate) (result GalleriesUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, galleryName, gallery)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client GalleriesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, gallery GalleryUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}", pathParameters),
+ autorest.WithJSON(gallery),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleriesClient) UpdateSender(req *http.Request) (future GalleriesUpdateFuture, err error) {
+ var resp *http.Response
+ 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 GalleriesClient) UpdateResponder(resp *http.Response) (result Gallery, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/2019-07-01/compute/galleryapplications.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryapplications.go
index c2c651209..5c17994e5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryapplications.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryapplications.go
@@ -35,7 +35,9 @@ func NewGalleryApplicationsClient(subscriptionID string) GalleryApplicationsClie
return NewGalleryApplicationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewGalleryApplicationsClientWithBaseURI creates an instance of the GalleryApplicationsClient client.
+// NewGalleryApplicationsClientWithBaseURI creates an instance of the GalleryApplicationsClient client using a custom
+// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure
+// stack).
func NewGalleryApplicationsClientWithBaseURI(baseURI string, subscriptionID string) GalleryApplicationsClient {
return GalleryApplicationsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -102,9 +104,8 @@ func (client GalleryApplicationsClient) CreateOrUpdatePreparer(ctx context.Conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client GalleryApplicationsClient) CreateOrUpdateSender(req *http.Request) (future GalleryApplicationsCreateOrUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -182,9 +183,8 @@ func (client GalleryApplicationsClient) DeletePreparer(ctx context.Context, reso
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client GalleryApplicationsClient) DeleteSender(req *http.Request) (future GalleryApplicationsDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -267,8 +267,7 @@ func (client GalleryApplicationsClient) GetPreparer(ctx context.Context, resourc
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client GalleryApplicationsClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -346,8 +345,7 @@ func (client GalleryApplicationsClient) ListByGalleryPreparer(ctx context.Contex
// ListByGallerySender sends the ListByGallery request. The method will close the
// http.Response Body if it receives an error.
func (client GalleryApplicationsClient) ListByGallerySender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByGalleryResponder handles the response to the ListByGallery request. The method always
@@ -399,3 +397,87 @@ func (client GalleryApplicationsClient) ListByGalleryComplete(ctx context.Contex
result.page, err = client.ListByGallery(ctx, resourceGroupName, galleryName)
return
}
+
+// Update update a gallery Application Definition.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Application Gallery in which the Application Definition is to be
+// updated.
+// galleryApplicationName - the name of the gallery Application Definition to be updated. The allowed
+// characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum
+// length is 80 characters.
+// galleryApplication - parameters supplied to the update gallery Application operation.
+func (client GalleryApplicationsClient) Update(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplication GalleryApplicationUpdate) (result GalleryApplicationsUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, galleryName, galleryApplicationName, galleryApplication)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client GalleryApplicationsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplication GalleryApplicationUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryApplicationName": autorest.Encode("path", galleryApplicationName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}", pathParameters),
+ autorest.WithJSON(galleryApplication),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryApplicationsClient) UpdateSender(req *http.Request) (future GalleryApplicationsUpdateFuture, err error) {
+ var resp *http.Response
+ 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 GalleryApplicationsClient) UpdateResponder(resp *http.Response) (result GalleryApplication, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/2019-07-01/compute/galleryapplicationversions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryapplicationversions.go
index 40b2dc830..d0f81b22c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryapplicationversions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryapplicationversions.go
@@ -36,7 +36,9 @@ func NewGalleryApplicationVersionsClient(subscriptionID string) GalleryApplicati
return NewGalleryApplicationVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewGalleryApplicationVersionsClientWithBaseURI creates an instance of the GalleryApplicationVersionsClient client.
+// NewGalleryApplicationVersionsClientWithBaseURI creates an instance of the GalleryApplicationVersionsClient client
+// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign
+// clouds, Azure stack).
func NewGalleryApplicationVersionsClientWithBaseURI(baseURI string, subscriptionID string) GalleryApplicationVersionsClient {
return GalleryApplicationVersionsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -119,9 +121,8 @@ func (client GalleryApplicationVersionsClient) CreateOrUpdatePreparer(ctx contex
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client GalleryApplicationVersionsClient) CreateOrUpdateSender(req *http.Request) (future GalleryApplicationVersionsCreateOrUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -201,9 +202,8 @@ func (client GalleryApplicationVersionsClient) DeletePreparer(ctx context.Contex
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client GalleryApplicationVersionsClient) DeleteSender(req *http.Request) (future GalleryApplicationVersionsDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -292,8 +292,7 @@ func (client GalleryApplicationVersionsClient) GetPreparer(ctx context.Context,
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client GalleryApplicationVersionsClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -373,8 +372,7 @@ func (client GalleryApplicationVersionsClient) ListByGalleryApplicationPreparer(
// ListByGalleryApplicationSender sends the ListByGalleryApplication request. The method will close the
// http.Response Body if it receives an error.
func (client GalleryApplicationVersionsClient) ListByGalleryApplicationSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByGalleryApplicationResponder handles the response to the ListByGalleryApplication request. The method always
@@ -426,3 +424,89 @@ func (client GalleryApplicationVersionsClient) ListByGalleryApplicationComplete(
result.page, err = client.ListByGalleryApplication(ctx, resourceGroupName, galleryName, galleryApplicationName)
return
}
+
+// Update update a gallery Application Version.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Application Gallery in which the Application Definition resides.
+// galleryApplicationName - the name of the gallery Application Definition in which the Application Version is
+// to be updated.
+// galleryApplicationVersionName - the name of the gallery Application Version to be updated. Needs to follow
+// semantic version name pattern: The allowed characters are digit and period. Digits must be within the range
+// of a 32-bit integer. Format: ..
+// galleryApplicationVersion - parameters supplied to the update gallery Application Version operation.
+func (client GalleryApplicationVersionsClient) Update(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, galleryApplicationVersion GalleryApplicationVersionUpdate) (result GalleryApplicationVersionsUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, galleryName, galleryApplicationName, galleryApplicationVersionName, galleryApplicationVersion)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client GalleryApplicationVersionsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, galleryApplicationVersion GalleryApplicationVersionUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryApplicationName": autorest.Encode("path", galleryApplicationName),
+ "galleryApplicationVersionName": autorest.Encode("path", galleryApplicationVersionName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}", pathParameters),
+ autorest.WithJSON(galleryApplicationVersion),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryApplicationVersionsClient) UpdateSender(req *http.Request) (future GalleryApplicationVersionsUpdateFuture, err error) {
+ var resp *http.Response
+ 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 GalleryApplicationVersionsClient) UpdateResponder(resp *http.Response) (result GalleryApplicationVersion, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/2019-07-01/compute/galleryimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryimages.go
index c4c78e570..549aab2e4 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryimages.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryimages.go
@@ -36,7 +36,8 @@ func NewGalleryImagesClient(subscriptionID string) GalleryImagesClient {
return NewGalleryImagesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewGalleryImagesClientWithBaseURI creates an instance of the GalleryImagesClient client.
+// NewGalleryImagesClientWithBaseURI creates an instance of the GalleryImagesClient client using a custom endpoint.
+// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
func NewGalleryImagesClientWithBaseURI(baseURI string, subscriptionID string) GalleryImagesClient {
return GalleryImagesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -114,9 +115,8 @@ func (client GalleryImagesClient) CreateOrUpdatePreparer(ctx context.Context, re
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client GalleryImagesClient) CreateOrUpdateSender(req *http.Request) (future GalleryImagesCreateOrUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -193,9 +193,8 @@ func (client GalleryImagesClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client GalleryImagesClient) DeleteSender(req *http.Request) (future GalleryImagesDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -277,8 +276,7 @@ func (client GalleryImagesClient) GetPreparer(ctx context.Context, resourceGroup
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client GalleryImagesClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -355,8 +353,7 @@ func (client GalleryImagesClient) ListByGalleryPreparer(ctx context.Context, res
// ListByGallerySender sends the ListByGallery request. The method will close the
// http.Response Body if it receives an error.
func (client GalleryImagesClient) ListByGallerySender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByGalleryResponder handles the response to the ListByGallery request. The method always
@@ -408,3 +405,86 @@ func (client GalleryImagesClient) ListByGalleryComplete(ctx context.Context, res
result.page, err = client.ListByGallery(ctx, resourceGroupName, galleryName)
return
}
+
+// Update update a gallery Image Definition.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Image Gallery in which the Image Definition is to be updated.
+// galleryImageName - the name of the gallery Image Definition to be updated. The allowed characters are
+// alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80
+// characters.
+// galleryImage - parameters supplied to the update gallery image operation.
+func (client GalleryImagesClient) Update(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImage GalleryImageUpdate) (result GalleryImagesUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImagesClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, galleryName, galleryImageName, galleryImage)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client GalleryImagesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImage GalleryImageUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryImageName": autorest.Encode("path", galleryImageName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}", pathParameters),
+ autorest.WithJSON(galleryImage),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryImagesClient) UpdateSender(req *http.Request) (future GalleryImagesUpdateFuture, err error) {
+ var resp *http.Response
+ 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 GalleryImagesClient) UpdateResponder(resp *http.Response) (result GalleryImage, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/2019-07-01/compute/galleryimageversions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryimageversions.go
index 658da5864..8bc01cbdf 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryimageversions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryimageversions.go
@@ -36,7 +36,9 @@ func NewGalleryImageVersionsClient(subscriptionID string) GalleryImageVersionsCl
return NewGalleryImageVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewGalleryImageVersionsClientWithBaseURI creates an instance of the GalleryImageVersionsClient client.
+// NewGalleryImageVersionsClientWithBaseURI creates an instance of the GalleryImageVersionsClient client using a custom
+// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure
+// stack).
func NewGalleryImageVersionsClientWithBaseURI(baseURI string, subscriptionID string) GalleryImageVersionsClient {
return GalleryImageVersionsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -64,11 +66,7 @@ func (client GalleryImageVersionsClient) CreateOrUpdate(ctx context.Context, res
if err := validation.Validate([]validation.Validation{
{TargetValue: galleryImageVersion,
Constraints: []validation.Constraint{{Target: "galleryImageVersion.GalleryImageVersionProperties", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "galleryImageVersion.GalleryImageVersionProperties.StorageProfile", Name: validation.Null, Rule: true,
- Chain: []validation.Constraint{{Target: "galleryImageVersion.GalleryImageVersionProperties.StorageProfile.Source", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "galleryImageVersion.GalleryImageVersionProperties.StorageProfile.Source.ID", Name: validation.Null, Rule: true, Chain: nil}}},
- }},
- }}}}}); err != nil {
+ Chain: []validation.Constraint{{Target: "galleryImageVersion.GalleryImageVersionProperties.StorageProfile", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
return result, validation.NewError("compute.GalleryImageVersionsClient", "CreateOrUpdate", err.Error())
}
@@ -115,9 +113,8 @@ func (client GalleryImageVersionsClient) CreateOrUpdatePreparer(ctx context.Cont
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client GalleryImageVersionsClient) CreateOrUpdateSender(req *http.Request) (future GalleryImageVersionsCreateOrUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -196,9 +193,8 @@ func (client GalleryImageVersionsClient) DeletePreparer(ctx context.Context, res
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client GalleryImageVersionsClient) DeleteSender(req *http.Request) (future GalleryImageVersionsDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -286,8 +282,7 @@ func (client GalleryImageVersionsClient) GetPreparer(ctx context.Context, resour
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client GalleryImageVersionsClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -367,8 +362,7 @@ func (client GalleryImageVersionsClient) ListByGalleryImagePreparer(ctx context.
// ListByGalleryImageSender sends the ListByGalleryImage request. The method will close the
// http.Response Body if it receives an error.
func (client GalleryImageVersionsClient) ListByGalleryImageSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByGalleryImageResponder handles the response to the ListByGalleryImage request. The method always
@@ -420,3 +414,88 @@ func (client GalleryImageVersionsClient) ListByGalleryImageComplete(ctx context.
result.page, err = client.ListByGalleryImage(ctx, resourceGroupName, galleryName, galleryImageName)
return
}
+
+// Update update a gallery Image Version.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Image Gallery in which the Image Definition resides.
+// galleryImageName - the name of the gallery Image Definition in which the Image Version is to be updated.
+// galleryImageVersionName - the name of the gallery Image Version to be updated. Needs to follow semantic
+// version name pattern: The allowed characters are digit and period. Digits must be within the range of a
+// 32-bit integer. Format: ..
+// galleryImageVersion - parameters supplied to the update gallery Image Version operation.
+func (client GalleryImageVersionsClient) Update(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, galleryImageVersion GalleryImageVersionUpdate) (result GalleryImageVersionsUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client GalleryImageVersionsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, galleryImageVersion GalleryImageVersionUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryImageName": autorest.Encode("path", galleryImageName),
+ "galleryImageVersionName": autorest.Encode("path", galleryImageVersionName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}", pathParameters),
+ autorest.WithJSON(galleryImageVersion),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryImageVersionsClient) UpdateSender(req *http.Request) (future GalleryImageVersionsUpdateFuture, err error) {
+ var resp *http.Response
+ 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 GalleryImageVersionsClient) UpdateResponder(resp *http.Response) (result GalleryImageVersion, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/2019-07-01/compute/images.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/images.go
index dfb92b46b..5355c93cf 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/images.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/images.go
@@ -35,7 +35,8 @@ func NewImagesClient(subscriptionID string) ImagesClient {
return NewImagesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewImagesClientWithBaseURI creates an instance of the ImagesClient client.
+// 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)}
}
@@ -97,9 +98,8 @@ func (client ImagesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -174,9 +174,8 @@ func (client ImagesClient) DeletePreparer(ctx context.Context, resourceGroupName
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -260,8 +259,7 @@ func (client ImagesClient) GetPreparer(ctx context.Context, resourceGroupName st
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -334,8 +332,7 @@ func (client ImagesClient) ListPreparer(ctx context.Context) (*http.Request, err
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -447,8 +444,7 @@ func (client ImagesClient) ListByResourceGroupPreparer(ctx context.Context, reso
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
@@ -558,9 +554,8 @@ func (client ImagesClient) UpdatePreparer(ctx context.Context, resourceGroupName
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client ImagesClient) UpdateSender(req *http.Request) (future ImagesUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/loganalytics.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/loganalytics.go
index 145d834d5..ae013a0fe 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/loganalytics.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/loganalytics.go
@@ -36,7 +36,8 @@ func NewLogAnalyticsClient(subscriptionID string) LogAnalyticsClient {
return NewLogAnalyticsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewLogAnalyticsClientWithBaseURI creates an instance of the LogAnalyticsClient client.
+// NewLogAnalyticsClientWithBaseURI creates an instance of the LogAnalyticsClient client using a custom endpoint. Use
+// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
func NewLogAnalyticsClientWithBaseURI(baseURI string, subscriptionID string) LogAnalyticsClient {
return LogAnalyticsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -103,9 +104,8 @@ func (client LogAnalyticsClient) ExportRequestRateByIntervalPreparer(ctx context
// ExportRequestRateByIntervalSender sends the ExportRequestRateByInterval request. The method will close the
// http.Response Body if it receives an error.
func (client LogAnalyticsClient) ExportRequestRateByIntervalSender(req *http.Request) (future LogAnalyticsExportRequestRateByIntervalFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -188,9 +188,8 @@ func (client LogAnalyticsClient) ExportThrottledRequestsPreparer(ctx context.Con
// ExportThrottledRequestsSender sends the ExportThrottledRequests request. The method will close the
// http.Response Body if it receives an error.
func (client LogAnalyticsClient) ExportThrottledRequestsSender(req *http.Request) (future LogAnalyticsExportThrottledRequestsFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/models.go
index 11e0c0a1b..8ea028bad 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/models.go
@@ -518,9 +518,9 @@ func PossibleMaintenanceOperationResultCodeTypesValues() []MaintenanceOperationR
type OperatingSystemStateTypes string
const (
- // Generalized ...
+ // Generalized Generalized image. Needs to be provisioned during deployment time.
Generalized OperatingSystemStateTypes = "Generalized"
- // Specialized ...
+ // Specialized Specialized image. Contains already provisioned OS Disk.
Specialized OperatingSystemStateTypes = "Specialized"
)
@@ -970,11 +970,13 @@ const (
Low VirtualMachinePriorityTypes = "Low"
// Regular ...
Regular VirtualMachinePriorityTypes = "Regular"
+ // Spot ...
+ Spot VirtualMachinePriorityTypes = "Spot"
)
// PossibleVirtualMachinePriorityTypesValues returns an array of possible values for the VirtualMachinePriorityTypes const type.
func PossibleVirtualMachinePriorityTypesValues() []VirtualMachinePriorityTypes {
- return []VirtualMachinePriorityTypes{Low, Regular}
+ return []VirtualMachinePriorityTypes{Low, Regular, Spot}
}
// VirtualMachineScaleSetScaleInRules enumerates the values for virtual machine scale set scale in rules.
@@ -1429,10 +1431,8 @@ type AutomaticOSUpgradeProperties struct {
type AutomaticRepairsPolicy struct {
// Enabled - Specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false.
Enabled *bool `json:"enabled,omitempty"`
- // GracePeriod - The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The default value is 5 minutes (PT5M).
+ // GracePeriod - The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 30 minutes (PT30M), which is also the default value. The maximum allowed grace period is 90 minutes (PT90M).
GracePeriod *string `json:"gracePeriod,omitempty"`
- // MaxInstanceRepairsPercent - The percentage (capacity of scaleset) of virtual machines that will be simultaneously repaired. The default value is 20%.
- MaxInstanceRepairsPercent *int32 `json:"maxInstanceRepairsPercent,omitempty"`
}
// AvailabilitySet specifies information about the availability set that the virtual machine should be
@@ -1726,6 +1726,12 @@ type AvailabilitySetUpdate struct {
Sku *Sku `json:"sku,omitempty"`
// Tags - Resource tags
Tags map[string]*string `json:"tags"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for AvailabilitySetUpdate.
@@ -1779,16 +1785,43 @@ func (asu *AvailabilitySetUpdate) UnmarshalJSON(body []byte) error {
}
asu.Tags = tags
}
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ asu.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ asu.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ asu.Type = &typeVar
+ }
}
}
return nil
}
-// BillingProfile specifies the billing related details of a low priority VM or VMSS.
Minimum
+// BillingProfile specifies the billing related details of a Azure Spot VM or VMSS.
Minimum
// api-version: 2019-03-01.
type BillingProfile struct {
- // MaxPrice - Specifies the maximum price you are willing to pay for a low priority VM/VMSS. This price is in US Dollars.
This price will be compared with the current low priority price for the VM size. Also, the prices are compared at the time of create/update of low priority VM/VMSS and the operation will only succeed if the maxPrice is greater than the current low priority price.
The maxPrice will also be used for evicting a low priority VM/VMSS if the current low priority price goes beyond the maxPrice after creation of VM/VMSS.
Possible values are:
- Any decimal value greater than zero. Example: $0.01538
-1 – indicates default price to be up-to on-demand.
You can set the maxPrice to -1 to indicate that the low priority VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you.
Minimum api-version: 2019-03-01.
+ // MaxPrice - Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars.
This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if the maxPrice is greater than the current Azure Spot price.
The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS.
Possible values are:
- Any decimal value greater than zero. Example: 0.01538
-1 – indicates default price to be up-to on-demand.
You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you.
Minimum api-version: 2019-03-01.
MaxPrice *float64 `json:"maxPrice,omitempty"`
}
@@ -2228,7 +2261,7 @@ type ContainerServiceWindowsProfile struct {
type CreationData struct {
// CreateOption - This enumerates the possible sources of a disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage', 'Import', 'Copy', 'Restore', 'Upload'
CreateOption 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 - Required if createOption is Import. The Azure Resource Manager identifier of the storage account containing the blob to import as a disk.
StorageAccountID *string `json:"storageAccountId,omitempty"`
// ImageReference - Disk source information.
ImageReference *ImageDiskReference `json:"imageReference,omitempty"`
@@ -2683,6 +2716,12 @@ type DedicatedHostGroupUpdate struct {
Zones *[]string `json:"zones,omitempty"`
// Tags - Resource tags
Tags map[string]*string `json:"tags"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for DedicatedHostGroupUpdate.
@@ -2736,6 +2775,33 @@ func (dhgu *DedicatedHostGroupUpdate) UnmarshalJSON(body []byte) error {
}
dhgu.Tags = tags
}
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ dhgu.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ dhgu.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ dhgu.Type = &typeVar
+ }
}
}
@@ -3005,6 +3071,12 @@ type DedicatedHostUpdate struct {
*DedicatedHostProperties `json:"properties,omitempty"`
// Tags - Resource tags
Tags map[string]*string `json:"tags"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for DedicatedHostUpdate.
@@ -3046,6 +3118,33 @@ func (dhu *DedicatedHostUpdate) UnmarshalJSON(body []byte) error {
}
dhu.Tags = tags
}
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ dhu.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ dhu.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ dhu.Type = &typeVar
+ }
}
}
@@ -4027,6 +4126,8 @@ type DiskUpdateProperties struct {
DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"`
// DiskMBpsReadWrite - The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.
DiskMBpsReadWrite *int32 `json:"diskMBpsReadWrite,omitempty"`
+ // Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
+ Encryption *Encryption `json:"encryption,omitempty"`
}
// Encryption encryption at rest settings for disk or snapshot
@@ -4128,6 +4229,35 @@ func (future *GalleriesDeleteFuture) Result(client GalleriesClient) (ar autorest
return
}
+// 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
+}
+
// Gallery specifies information about the Shared Image Gallery that you want to create or update.
type Gallery struct {
autorest.Response `json:"-"`
@@ -4543,6 +4673,121 @@ func (future *GalleryApplicationsDeleteFuture) Result(client GalleryApplications
return
}
+// 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
+}
+
+// GalleryApplicationUpdate specifies information about the gallery Application Definition that you want to
+// update.
+type GalleryApplicationUpdate struct {
+ *GalleryApplicationProperties `json:"properties,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for GalleryApplicationUpdate.
+func (gau GalleryApplicationUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if gau.GalleryApplicationProperties != nil {
+ objectMap["properties"] = gau.GalleryApplicationProperties
+ }
+ if gau.Tags != nil {
+ objectMap["tags"] = gau.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for GalleryApplicationUpdate struct.
+func (gau *GalleryApplicationUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var galleryApplicationProperties GalleryApplicationProperties
+ err = json.Unmarshal(*v, &galleryApplicationProperties)
+ if err != nil {
+ return err
+ }
+ gau.GalleryApplicationProperties = &galleryApplicationProperties
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ gau.Tags = tags
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ gau.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ gau.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ gau.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
// GalleryApplicationVersion specifies information about the gallery Application Version that you want to
// create or update.
type GalleryApplicationVersion struct {
@@ -4873,36 +5118,151 @@ func (future *GalleryApplicationVersionsDeleteFuture) Result(client GalleryAppli
return
}
-// GalleryArtifactPublishingProfileBase describes the basic gallery artifact publishing profile.
-type GalleryArtifactPublishingProfileBase struct {
- // TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updatable.
- TargetRegions *[]TargetRegion `json:"targetRegions,omitempty"`
- // ReplicaCount - The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable.
- ReplicaCount *int32 `json:"replicaCount,omitempty"`
- // ExcludeFromLatest - If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
- ExcludeFromLatest *bool `json:"excludeFromLatest,omitempty"`
- // PublishedDate - READ-ONLY; The timestamp for when the gallery Image Version is published.
- PublishedDate *date.Time `json:"publishedDate,omitempty"`
- // EndOfLifeDate - The end of life date of the gallery Image Version. This property can be used for decommissioning purposes. This property is updatable.
- EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
- // StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS'
- StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"`
+// GalleryApplicationVersionsUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type GalleryApplicationVersionsUpdateFuture struct {
+ azure.Future
}
-// GalleryArtifactSource the source image from which the Image Version is going to be created.
-type GalleryArtifactSource struct {
- ManagedImage *ManagedArtifact `json:"managedImage,omitempty"`
+// 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
}
-// GalleryArtifactVersionSource the gallery artifact version source.
-type GalleryArtifactVersionSource struct {
- // ID - The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, or user image.
+// GalleryApplicationVersionUpdate specifies information about the gallery Application Version that you
+// want to update.
+type GalleryApplicationVersionUpdate struct {
+ *GalleryApplicationVersionProperties `json:"properties,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+ // 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"`
}
-// GalleryDataDiskImage this is the data disk image.
-type GalleryDataDiskImage struct {
- // Lun - This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine.
+// MarshalJSON is the custom marshaler for GalleryApplicationVersionUpdate.
+func (gavu GalleryApplicationVersionUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if gavu.GalleryApplicationVersionProperties != nil {
+ objectMap["properties"] = gavu.GalleryApplicationVersionProperties
+ }
+ if gavu.Tags != nil {
+ objectMap["tags"] = gavu.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for GalleryApplicationVersionUpdate struct.
+func (gavu *GalleryApplicationVersionUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var galleryApplicationVersionProperties GalleryApplicationVersionProperties
+ err = json.Unmarshal(*v, &galleryApplicationVersionProperties)
+ if err != nil {
+ return err
+ }
+ gavu.GalleryApplicationVersionProperties = &galleryApplicationVersionProperties
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ gavu.Tags = tags
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ gavu.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ gavu.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ gavu.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// GalleryArtifactPublishingProfileBase describes the basic gallery artifact publishing profile.
+type GalleryArtifactPublishingProfileBase struct {
+ // TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updatable.
+ TargetRegions *[]TargetRegion `json:"targetRegions,omitempty"`
+ // ReplicaCount - The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable.
+ ReplicaCount *int32 `json:"replicaCount,omitempty"`
+ // ExcludeFromLatest - If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
+ ExcludeFromLatest *bool `json:"excludeFromLatest,omitempty"`
+ // PublishedDate - READ-ONLY; The timestamp for when the gallery Image Version is published.
+ PublishedDate *date.Time `json:"publishedDate,omitempty"`
+ // EndOfLifeDate - The end of life date of the gallery Image Version. This property can be used for decommissioning purposes. This property is updatable.
+ EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
+ // StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS'
+ StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"`
+}
+
+// GalleryArtifactSource the source image from which the Image Version is going to be created.
+type GalleryArtifactSource struct {
+ ManagedImage *ManagedArtifact `json:"managedImage,omitempty"`
+}
+
+// GalleryArtifactVersionSource the gallery artifact version source.
+type GalleryArtifactVersionSource struct {
+ // ID - The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, or user image.
+ ID *string `json:"id,omitempty"`
+}
+
+// GalleryDataDiskImage this is the data disk image.
+type GalleryDataDiskImage struct {
+ // Lun - This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine.
Lun *int32 `json:"lun,omitempty"`
// SizeInGB - READ-ONLY; This property indicates the size of the VHD to be created.
SizeInGB *int32 `json:"sizeInGB,omitempty"`
@@ -5260,6 +5620,120 @@ func (future *GalleryImagesDeleteFuture) Result(client GalleryImagesClient) (ar
return
}
+// 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
+}
+
+// GalleryImageUpdate specifies information about the gallery Image Definition that you want to update.
+type GalleryImageUpdate struct {
+ *GalleryImageProperties `json:"properties,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for GalleryImageUpdate.
+func (giu GalleryImageUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if giu.GalleryImageProperties != nil {
+ objectMap["properties"] = giu.GalleryImageProperties
+ }
+ if giu.Tags != nil {
+ objectMap["tags"] = giu.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for GalleryImageUpdate struct.
+func (giu *GalleryImageUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var galleryImageProperties GalleryImageProperties
+ err = json.Unmarshal(*v, &galleryImageProperties)
+ if err != nil {
+ return err
+ }
+ giu.GalleryImageProperties = &galleryImageProperties
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ giu.Tags = tags
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ giu.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ giu.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ giu.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
// GalleryImageVersion specifies information about the gallery Image Version that you want to create or
// update.
type GalleryImageVersion struct {
@@ -5593,6 +6067,120 @@ type GalleryImageVersionStorageProfile struct {
DataDiskImages *[]GalleryDataDiskImage `json:"dataDiskImages,omitempty"`
}
+// 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
+}
+
+// GalleryImageVersionUpdate specifies information about the gallery Image Version that you want to update.
+type GalleryImageVersionUpdate struct {
+ *GalleryImageVersionProperties `json:"properties,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for GalleryImageVersionUpdate.
+func (givu GalleryImageVersionUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if givu.GalleryImageVersionProperties != nil {
+ objectMap["properties"] = givu.GalleryImageVersionProperties
+ }
+ if givu.Tags != nil {
+ objectMap["tags"] = givu.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for GalleryImageVersionUpdate struct.
+func (givu *GalleryImageVersionUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var galleryImageVersionProperties GalleryImageVersionProperties
+ err = json.Unmarshal(*v, &galleryImageVersionProperties)
+ if err != nil {
+ return err
+ }
+ givu.GalleryImageVersionProperties = &galleryImageVersionProperties
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ givu.Tags = tags
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ givu.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ givu.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ givu.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
// GalleryList the List Galleries operation response.
type GalleryList struct {
autorest.Response `json:"-"`
@@ -5748,13 +6336,98 @@ type GalleryOSDiskImage struct {
Source *GalleryArtifactVersionSource `json:"source,omitempty"`
}
-// GalleryProperties describes the properties of a Shared Image Gallery.
-type GalleryProperties struct {
- // Description - The description of this Shared Image Gallery resource. This property is updatable.
- Description *string `json:"description,omitempty"`
- Identifier *GalleryIdentifier `json:"identifier,omitempty"`
- // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningStateCreating', 'ProvisioningStateUpdating', 'ProvisioningStateFailed', 'ProvisioningStateSucceeded', 'ProvisioningStateDeleting', 'ProvisioningStateMigrating'
- ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
+// GalleryProperties describes the properties of a Shared Image Gallery.
+type GalleryProperties struct {
+ // Description - The description of this Shared Image Gallery resource. This property is updatable.
+ Description *string `json:"description,omitempty"`
+ Identifier *GalleryIdentifier `json:"identifier,omitempty"`
+ // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningStateCreating', 'ProvisioningStateUpdating', 'ProvisioningStateFailed', 'ProvisioningStateSucceeded', 'ProvisioningStateDeleting', 'ProvisioningStateMigrating'
+ ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
+}
+
+// GalleryUpdate specifies information about the Shared Image Gallery that you want to update.
+type GalleryUpdate struct {
+ *GalleryProperties `json:"properties,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for GalleryUpdate.
+func (gu GalleryUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if gu.GalleryProperties != nil {
+ objectMap["properties"] = gu.GalleryProperties
+ }
+ if gu.Tags != nil {
+ objectMap["tags"] = gu.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for GalleryUpdate struct.
+func (gu *GalleryUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var galleryProperties GalleryProperties
+ err = json.Unmarshal(*v, &galleryProperties)
+ if err != nil {
+ return err
+ }
+ gu.GalleryProperties = &galleryProperties
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ gu.Tags = tags
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ gu.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ gu.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ gu.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
}
// GrantAccessData data used for requesting a SAS.
@@ -6113,7 +6786,7 @@ 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.
+// 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"`
@@ -6123,6 +6796,8 @@ type ImageReference struct {
Sku *string `json:"sku,omitempty"`
// Version - Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available.
Version *string `json:"version,omitempty"`
+ // ExactVersion - READ-ONLY; Specifies in decimal numbers, the version of platform image or marketplace image used to create the virtual machine. This readonly field differs from 'version', only if the value specified in 'version' field is 'latest'.
+ ExactVersion *string `json:"exactVersion,omitempty"`
// ID - Resource Id
ID *string `json:"id,omitempty"`
}
@@ -6221,6 +6896,12 @@ type ImageUpdate struct {
*ImageProperties `json:"properties,omitempty"`
// Tags - Resource tags
Tags map[string]*string `json:"tags"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for ImageUpdate.
@@ -6262,6 +6943,33 @@ func (iu *ImageUpdate) UnmarshalJSON(body []byte) error {
}
iu.Tags = tags
}
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ iu.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ iu.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ iu.Type = &typeVar
+ }
}
}
@@ -6793,15 +7501,16 @@ type OSDiskImage struct {
OperatingSystem OperatingSystemTypes `json:"operatingSystem,omitempty"`
}
-// OSProfile specifies the operating system settings for the virtual machine.
+// 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"`
- // AdminUsername - Specifies the name of the administrator account.
**Windows-only restriction:** Cannot end in "."
**Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".
**Minimum-length (Linux):** 1 character
**Max-length (Linux):** 64 characters
**Max-length (Windows):** 20 characters
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 - Specifies the name of the administrator account.
This property cannot be updated after the VM is created.
**Windows-only restriction:** Cannot end in "."
**Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".
**Minimum-length (Linux):** 1 character
**Max-length (Linux):** 64 characters
**Max-length (Windows):** 20 characters
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_])
**Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"
For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/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 - Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes.
**Note: Do not pass any secrets or passwords in customData property**
This property cannot be updated after the VM is created.
customData is passed to the VM to be saved as a file, for more information see [Custom Data on Azure VMs](https://docs.microsoft.com/azure/virtual-machines/custom-data)
For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/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"`
@@ -6811,7 +7520,7 @@ type OSProfile struct {
Secrets *[]VaultSecretGroup `json:"secrets,omitempty"`
// AllowExtensionOperations - Specifies whether extension operations should be allowed on the virtual machine.
This may only be set to False when no extensions are present on the virtual machine.
AllowExtensionOperations *bool `json:"allowExtensionOperations,omitempty"`
- // RequireGuestProvisionSignal - Specifies whether the guest provision signal is required from the virtual machine.
+ // RequireGuestProvisionSignal - Specifies whether the guest provision signal is required to infer provision success of the virtual machine.
RequireGuestProvisionSignal *bool `json:"requireGuestProvisionSignal,omitempty"`
}
@@ -7084,17 +7793,25 @@ type ProximityPlacementGroupProperties struct {
// ProximityPlacementGroupType - Specifies the type of the proximity placement group.
Possible values are:
**Standard** : Co-locate resources within an Azure region or Availability Zone.
**Ultra** : For future use. Possible values include: 'Standard', 'Ultra'
ProximityPlacementGroupType ProximityPlacementGroupType `json:"proximityPlacementGroupType,omitempty"`
// VirtualMachines - READ-ONLY; A list of references to all virtual machines in the proximity placement group.
- VirtualMachines *[]SubResource `json:"virtualMachines,omitempty"`
+ VirtualMachines *[]SubResourceWithColocationStatus `json:"virtualMachines,omitempty"`
// VirtualMachineScaleSets - READ-ONLY; A list of references to all virtual machine scale sets in the proximity placement group.
- VirtualMachineScaleSets *[]SubResource `json:"virtualMachineScaleSets,omitempty"`
+ VirtualMachineScaleSets *[]SubResourceWithColocationStatus `json:"virtualMachineScaleSets,omitempty"`
// AvailabilitySets - READ-ONLY; A list of references to all availability sets in the proximity placement group.
- AvailabilitySets *[]SubResource `json:"availabilitySets,omitempty"`
+ AvailabilitySets *[]SubResourceWithColocationStatus `json:"availabilitySets,omitempty"`
+ // ColocationStatus - Describes colocation status of the Proximity Placement Group.
+ ColocationStatus *InstanceViewStatus `json:"colocationStatus,omitempty"`
}
// ProximityPlacementGroupUpdate specifies information about the proximity placement group.
type ProximityPlacementGroupUpdate struct {
// Tags - Resource tags
Tags map[string]*string `json:"tags"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for ProximityPlacementGroupUpdate.
@@ -7835,7 +8552,9 @@ type ScheduledEventsProfile struct {
TerminateNotificationProfile *TerminateNotificationProfile `json:"terminateNotificationProfile,omitempty"`
}
-// Sku describes a virtual machine scale set sku.
+// 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"`
@@ -8355,6 +9074,8 @@ type SnapshotUpdateProperties struct {
DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
// EncryptionSettingsCollection - Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"`
+ // Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
+ Encryption *Encryption `json:"encryption,omitempty"`
}
// SourceVault the vault id is an Azure Resource Manager Resource id in the form
@@ -8401,6 +9122,14 @@ type SubResourceReadOnly struct {
ID *string `json:"id,omitempty"`
}
+// SubResourceWithColocationStatus ...
+type SubResourceWithColocationStatus struct {
+ // ColocationStatus - Describes colocation status of a resource in the Proximity Placement Group.
+ ColocationStatus *InstanceViewStatus `json:"colocationStatus,omitempty"`
+ // ID - Resource Id
+ ID *string `json:"id,omitempty"`
+}
+
// TargetRegion describes the target region information.
type TargetRegion struct {
// Name - The name of the region.
@@ -8439,6 +9168,12 @@ type ThrottledRequestsInput struct {
type UpdateResource struct {
// Tags - Resource tags
Tags map[string]*string `json:"tags"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for UpdateResource.
@@ -9089,6 +9824,12 @@ type VirtualMachineExtensionUpdate struct {
*VirtualMachineExtensionUpdateProperties `json:"properties,omitempty"`
// Tags - Resource tags
Tags map[string]*string `json:"tags"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for VirtualMachineExtensionUpdate.
@@ -9130,6 +9871,33 @@ func (vmeu *VirtualMachineExtensionUpdate) UnmarshalJSON(body []byte) error {
}
vmeu.Tags = tags
}
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vmeu.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vmeu.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ vmeu.Type = &typeVar
+ }
}
}
@@ -9512,23 +10280,23 @@ type VirtualMachineProperties struct {
StorageProfile *StorageProfile `json:"storageProfile,omitempty"`
// AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the virtual machine.
AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"`
- // OsProfile - Specifies the operating system settings for the virtual machine.
+ // OsProfile - Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned.
OsProfile *OSProfile `json:"osProfile,omitempty"`
// NetworkProfile - Specifies the network interfaces of the virtual machine.
NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"`
// 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.
This property cannot exist along with a non-null properties.virtualMachineScaleSet reference.
+ // 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. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set.
This property cannot exist along with a non-null properties.virtualMachineScaleSet reference.
AvailabilitySet *SubResource `json:"availabilitySet,omitempty"`
// VirtualMachineScaleSet - Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set.
This property cannot exist along with a non-null properties.availabilitySet reference.
Minimum api‐version: 2019‐03‐01
VirtualMachineScaleSet *SubResource `json:"virtualMachineScaleSet,omitempty"`
// ProximityPlacementGroup - Specifies information about the proximity placement group that the virtual machine should be assigned to.
Minimum api-version: 2018-04-01.
ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"`
- // Priority - Specifies the priority for the virtual machine.
Minimum api-version: 2019-03-01. Possible values include: 'Regular', 'Low'
+ // Priority - Specifies the priority for the virtual machine.
Minimum api-version: 2019-03-01. Possible values include: 'Regular', 'Low', 'Spot'
Priority VirtualMachinePriorityTypes `json:"priority,omitempty"`
- // EvictionPolicy - Specifies the eviction policy for the low priority virtual machine. Only supported value is 'Deallocate'.
Minimum api-version: 2019-03-01. Possible values include: 'Deallocate', 'Delete'
+ // EvictionPolicy - Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set.
For Azure Spot virtual machines, the only supported value is 'Deallocate' and the minimum api-version is 2019-03-01.
For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete'
EvictionPolicy VirtualMachineEvictionPolicyTypes `json:"evictionPolicy,omitempty"`
- // BillingProfile - Specifies the billing related details of a low priority virtual machine.
Minimum api-version: 2019-03-01.
+ // BillingProfile - Specifies the billing related details of a Azure Spot virtual machine.
Minimum api-version: 2019-03-01.
BillingProfile *BillingProfile `json:"billingProfile,omitempty"`
// Host - Specifies information about the dedicated host that the virtual machine resides in.
Minimum api-version: 2018-10-01.
Host *SubResource `json:"host,omitempty"`
@@ -9559,7 +10327,7 @@ type VirtualMachineScaleSet struct {
*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.
+ // 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"`
@@ -9731,7 +10499,9 @@ type VirtualMachineScaleSetDataDisk struct {
type VirtualMachineScaleSetExtension struct {
autorest.Response `json:"-"`
// Name - The name of the extension.
- Name *string `json:"name,omitempty"`
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
*VirtualMachineScaleSetExtensionProperties `json:"properties,omitempty"`
// ID - READ-ONLY; Resource Id
ID *string `json:"id,omitempty"`
@@ -9767,6 +10537,15 @@ func (vmsse *VirtualMachineScaleSetExtension) UnmarshalJSON(body []byte) error {
}
vmsse.Name = &name
}
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ vmsse.Type = &typeVar
+ }
case "properties":
if v != nil {
var virtualMachineScaleSetExtensionProperties VirtualMachineScaleSetExtensionProperties
@@ -10019,6 +10798,106 @@ func (future *VirtualMachineScaleSetExtensionsDeleteFuture) Result(client Virtua
return
}
+// 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
+}
+
+// VirtualMachineScaleSetExtensionUpdate describes a Virtual Machine Scale Set Extension.
+type VirtualMachineScaleSetExtensionUpdate struct {
+ // Name - READ-ONLY; The name of the extension.
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ *VirtualMachineScaleSetExtensionProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineScaleSetExtensionUpdate.
+func (vmsseu VirtualMachineScaleSetExtensionUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmsseu.VirtualMachineScaleSetExtensionProperties != nil {
+ objectMap["properties"] = vmsseu.VirtualMachineScaleSetExtensionProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetExtensionUpdate struct.
+func (vmsseu *VirtualMachineScaleSetExtensionUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vmsseu.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ vmsseu.Type = &typeVar
+ }
+ case "properties":
+ if v != nil {
+ var virtualMachineScaleSetExtensionProperties VirtualMachineScaleSetExtensionProperties
+ err = json.Unmarshal(*v, &virtualMachineScaleSetExtensionProperties)
+ if err != nil {
+ return err
+ }
+ vmsseu.VirtualMachineScaleSetExtensionProperties = &virtualMachineScaleSetExtensionProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vmsseu.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
// VirtualMachineScaleSetIdentity identity for the virtual machine scale set.
type VirtualMachineScaleSetIdentity struct {
// PrincipalID - READ-ONLY; The principal id of virtual machine scale set identity. This property will only be provided for a system assigned identity.
@@ -11440,6 +12319,12 @@ type VirtualMachineScaleSetUpdate struct {
Identity *VirtualMachineScaleSetIdentity `json:"identity,omitempty"`
// Tags - Resource tags
Tags map[string]*string `json:"tags"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdate.
@@ -11517,6 +12402,33 @@ func (vmssu *VirtualMachineScaleSetUpdate) UnmarshalJSON(body []byte) error {
}
vmssu.Tags = tags
}
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vmssu.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vmssu.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ vmssu.Type = &typeVar
+ }
}
}
@@ -11591,7 +12503,8 @@ func (vmssuic *VirtualMachineScaleSetUpdateIPConfiguration) UnmarshalJSON(body [
}
// VirtualMachineScaleSetUpdateIPConfigurationProperties describes a virtual machine scale set network
-// profile's IP configuration properties.
+// 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"`
@@ -11745,12 +12658,14 @@ type VirtualMachineScaleSetUpdateProperties struct {
Overprovision *bool `json:"overprovision,omitempty"`
// DoNotRunExtensionsOnOverprovisionedVMs - When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs.
DoNotRunExtensionsOnOverprovisionedVMs *bool `json:"doNotRunExtensionsOnOverprovisionedVMs,omitempty"`
- // SinglePlacementGroup - When true this limits the scale set to a single placement group, of max size 100 virtual machines.
+ // SinglePlacementGroup - When true this limits the scale set to a single placement group, of max size 100 virtual machines.NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true.
SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"`
// AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type.
AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"`
// ScaleInPolicy - Specifies the scale-in policy that decides which virtual machines are chosen for removal when a Virtual Machine Scale Set is scaled-in.
ScaleInPolicy *ScaleInPolicy `json:"scaleInPolicy,omitempty"`
+ // ProximityPlacementGroup - Specifies information about the proximity placement group that the virtual machine scale set should be assigned to.
Minimum api-version: 2018-04-01.
+ ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"`
}
// VirtualMachineScaleSetUpdatePublicIPAddressConfiguration describes a virtual machines scale set IP
@@ -11839,7 +12754,7 @@ type VirtualMachineScaleSetUpdateVMProfile struct {
ExtensionProfile *VirtualMachineScaleSetExtensionProfile `json:"extensionProfile,omitempty"`
// LicenseType - The license type, which is for bring your own license scenario.
LicenseType *string `json:"licenseType,omitempty"`
- // BillingProfile - Specifies the billing related details of a low priority VMSS.
Minimum api-version: 2019-03-01.
+ // BillingProfile - Specifies the billing related details of a Azure Spot VMSS.
Minimum api-version: 2019-03-01.
BillingProfile *BillingProfile `json:"billingProfile,omitempty"`
// ScheduledEventsProfile - Specifies Scheduled Event related configurations.
ScheduledEventsProfile *ScheduledEventsProfile `json:"scheduledEventsProfile,omitempty"`
@@ -12302,11 +13217,11 @@ type VirtualMachineScaleSetVMProfile struct {
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"`
- // Priority - Specifies the priority for the virtual machines in the scale set.
Minimum api-version: 2017-10-30-preview. Possible values include: 'Regular', 'Low'
+ // Priority - Specifies the priority for the virtual machines in the scale set.
Minimum api-version: 2017-10-30-preview. Possible values include: 'Regular', 'Low', 'Spot'
Priority VirtualMachinePriorityTypes `json:"priority,omitempty"`
- // EvictionPolicy - Specifies the eviction policy for virtual machines in a low priority scale set.
Minimum api-version: 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete'
+ // EvictionPolicy - Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set.
For Azure Spot virtual machines, the only supported value is 'Deallocate' and the minimum api-version is 2019-03-01.
For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete'
EvictionPolicy VirtualMachineEvictionPolicyTypes `json:"evictionPolicy,omitempty"`
- // BillingProfile - Specifies the billing related details of a low priority VMSS.
Minimum api-version: 2019-03-01.
+ // BillingProfile - Specifies the billing related details of a Azure Spot VMSS.
Minimum api-version: 2019-03-01.
BillingProfile *BillingProfile `json:"billingProfile,omitempty"`
// ScheduledEventsProfile - Specifies Scheduled Event related configurations.
ScheduledEventsProfile *ScheduledEventsProfile `json:"scheduledEventsProfile,omitempty"`
@@ -13015,6 +13930,12 @@ type VirtualMachineUpdate struct {
Zones *[]string `json:"zones,omitempty"`
// Tags - Resource tags
Tags map[string]*string `json:"tags"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for VirtualMachineUpdate.
@@ -13092,6 +14013,33 @@ func (vmu *VirtualMachineUpdate) UnmarshalJSON(body []byte) error {
}
vmu.Tags = tags
}
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vmu.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vmu.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ vmu.Type = &typeVar
+ }
}
}
@@ -13110,7 +14058,7 @@ type WindowsConfiguration struct {
ProvisionVMAgent *bool `json:"provisionVMAgent,omitempty"`
// EnableAutomaticUpdates - Indicates whether Automatic Updates is enabled for the Windows virtual machine. Default value is true.
For virtual machine scale sets, this property can be updated and updates will take effect on OS reprovisioning.
EnableAutomaticUpdates *bool `json:"enableAutomaticUpdates,omitempty"`
- // TimeZone - Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time"
+ // TimeZone - Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time".
Possible values can be [TimeZoneInfo.Id](https://docs.microsoft.com/en-us/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id) value from time zones returned by [TimeZoneInfo.GetSystemTimeZones](https://docs.microsoft.com/en-us/dotnet/api/system.timezoneinfo.getsystemtimezones).
TimeZone *string `json:"timeZone,omitempty"`
// AdditionalUnattendContent - Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup.
AdditionalUnattendContent *[]AdditionalUnattendContent `json:"additionalUnattendContent,omitempty"`
@@ -13126,7 +14074,7 @@ type WinRMConfiguration struct {
// 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 - Specifies the protocol of WinRM 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/compute/mgmt/2019-07-01/compute/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/operations.go
index 021b16328..5f835c9c6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/operations.go
@@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient {
return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client.
+// 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)}
}
@@ -91,8 +92,7 @@ func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request,
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/proximityplacementgroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/proximityplacementgroups.go
index a42d52685..ee21ab969 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/proximityplacementgroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/proximityplacementgroups.go
@@ -35,7 +35,9 @@ func NewProximityPlacementGroupsClient(subscriptionID string) ProximityPlacement
return NewProximityPlacementGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewProximityPlacementGroupsClientWithBaseURI creates an instance of the ProximityPlacementGroupsClient client.
+// NewProximityPlacementGroupsClientWithBaseURI creates an instance of the ProximityPlacementGroupsClient client using
+// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign
+// clouds, Azure stack).
func NewProximityPlacementGroupsClientWithBaseURI(baseURI string, subscriptionID string) ProximityPlacementGroupsClient {
return ProximityPlacementGroupsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -103,8 +105,7 @@ func (client ProximityPlacementGroupsClient) CreateOrUpdatePreparer(ctx context.
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ProximityPlacementGroupsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
@@ -180,8 +181,7 @@ func (client ProximityPlacementGroupsClient) DeletePreparer(ctx context.Context,
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ProximityPlacementGroupsClient) DeleteSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// DeleteResponder handles the response to the Delete request. The method always
@@ -200,7 +200,9 @@ func (client ProximityPlacementGroupsClient) DeleteResponder(resp *http.Response
// Parameters:
// resourceGroupName - the name of the resource group.
// proximityPlacementGroupName - the name of the proximity placement group.
-func (client ProximityPlacementGroupsClient) Get(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string) (result ProximityPlacementGroup, err error) {
+// includeColocationStatus - includeColocationStatus=true enables fetching the colocation status of all the
+// resources in the proximity placement group.
+func (client ProximityPlacementGroupsClient) Get(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, includeColocationStatus string) (result ProximityPlacementGroup, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupsClient.Get")
defer func() {
@@ -211,7 +213,7 @@ func (client ProximityPlacementGroupsClient) Get(ctx context.Context, resourceGr
tracing.EndSpan(ctx, sc, err)
}()
}
- req, err := client.GetPreparer(ctx, resourceGroupName, proximityPlacementGroupName)
+ req, err := client.GetPreparer(ctx, resourceGroupName, proximityPlacementGroupName, includeColocationStatus)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Get", nil, "Failure preparing request")
return
@@ -233,7 +235,7 @@ func (client ProximityPlacementGroupsClient) Get(ctx context.Context, resourceGr
}
// GetPreparer prepares the Get request.
-func (client ProximityPlacementGroupsClient) GetPreparer(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string) (*http.Request, error) {
+func (client ProximityPlacementGroupsClient) GetPreparer(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, includeColocationStatus string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"proximityPlacementGroupName": autorest.Encode("path", proximityPlacementGroupName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
@@ -244,6 +246,9 @@ func (client ProximityPlacementGroupsClient) GetPreparer(ctx context.Context, re
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
+ if len(includeColocationStatus) > 0 {
+ queryParameters["includeColocationStatus"] = autorest.Encode("query", includeColocationStatus)
+ }
preparer := autorest.CreatePreparer(
autorest.AsGet(),
@@ -256,8 +261,7 @@ func (client ProximityPlacementGroupsClient) GetPreparer(ctx context.Context, re
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client ProximityPlacementGroupsClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -332,8 +336,7 @@ func (client ProximityPlacementGroupsClient) ListByResourceGroupPreparer(ctx con
// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
// http.Response Body if it receives an error.
func (client ProximityPlacementGroupsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
@@ -442,8 +445,7 @@ func (client ProximityPlacementGroupsClient) ListBySubscriptionPreparer(ctx cont
// ListBySubscriptionSender sends the ListBySubscription request. The method will close the
// http.Response Body if it receives an error.
func (client ProximityPlacementGroupsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always
@@ -559,8 +561,7 @@ func (client ProximityPlacementGroupsClient) UpdatePreparer(ctx context.Context,
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client ProximityPlacementGroupsClient) UpdateSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// UpdateResponder handles the response to the Update request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/resourceskus.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/resourceskus.go
index adb402788..e71328f0c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/resourceskus.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/resourceskus.go
@@ -35,14 +35,15 @@ func NewResourceSkusClient(subscriptionID string) ResourceSkusClient {
return NewResourceSkusClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewResourceSkusClientWithBaseURI creates an instance of the ResourceSkusClient client.
+// NewResourceSkusClientWithBaseURI creates an instance of the ResourceSkusClient client using a custom endpoint. Use
+// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
func NewResourceSkusClientWithBaseURI(baseURI string, subscriptionID string) ResourceSkusClient {
return ResourceSkusClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// List gets the list of Microsoft.Compute SKUs available for your Subscription.
// Parameters:
-// filter - the filter to apply on the operation.
+// filter - the filter to apply on the operation. Only **location** filter is supported currently.
func (client ResourceSkusClient) List(ctx context.Context, filter string) (result ResourceSkusResultPage, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusClient.List")
@@ -101,8 +102,7 @@ func (client ResourceSkusClient) ListPreparer(ctx context.Context, filter string
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client ResourceSkusClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/snapshots.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/snapshots.go
index 3a52fe873..046a45bfb 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/snapshots.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/snapshots.go
@@ -36,7 +36,8 @@ func NewSnapshotsClient(subscriptionID string) SnapshotsClient {
return NewSnapshotsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewSnapshotsClientWithBaseURI creates an instance of the SnapshotsClient client.
+// 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)}
}
@@ -113,9 +114,8 @@ func (client SnapshotsClient) CreateOrUpdatePreparer(ctx context.Context, resour
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -191,9 +191,8 @@ func (client SnapshotsClient) DeletePreparer(ctx context.Context, resourceGroupN
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -274,8 +273,7 @@ func (client SnapshotsClient) GetPreparer(ctx context.Context, resourceGroupName
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -355,9 +353,8 @@ func (client SnapshotsClient) GrantAccessPreparer(ctx context.Context, resourceG
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -434,8 +431,7 @@ func (client SnapshotsClient) ListPreparer(ctx context.Context) (*http.Request,
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -547,8 +543,7 @@ func (client SnapshotsClient) ListByResourceGroupPreparer(ctx context.Context, r
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
@@ -656,9 +651,8 @@ func (client SnapshotsClient) RevokeAccessPreparer(ctx context.Context, resource
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -736,9 +730,8 @@ func (client SnapshotsClient) UpdatePreparer(ctx context.Context, resourceGroupN
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/usage.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/usage.go
index 690136c06..896a2f230 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/usage.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/usage.go
@@ -36,7 +36,8 @@ func NewUsageClient(subscriptionID string) UsageClient {
return NewUsageClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewUsageClientWithBaseURI creates an instance of the UsageClient client.
+// 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)}
}
@@ -107,8 +108,7 @@ func (client UsageClient) ListPreparer(ctx context.Context, location string) (*h
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/version.go
index 7ad07e015..cbadbc945 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/version.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/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.Number + " compute/2019-07-01"
+ return "Azure-SDK-For-Go/" + Version() + " compute/2019-07-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/compute/mgmt/2019-07-01/compute/virtualmachineextensionimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineextensionimages.go
index 7a670a607..43785bcc9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineextensionimages.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineextensionimages.go
@@ -36,7 +36,8 @@ func NewVirtualMachineExtensionImagesClient(subscriptionID string) VirtualMachin
}
// NewVirtualMachineExtensionImagesClientWithBaseURI creates an instance of the VirtualMachineExtensionImagesClient
-// client.
+// 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)}
}
@@ -102,8 +103,7 @@ func (client VirtualMachineExtensionImagesClient) GetPreparer(ctx context.Contex
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -178,8 +178,7 @@ func (client VirtualMachineExtensionImagesClient) ListTypesPreparer(ctx context.
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListTypesResponder handles the response to the ListTypes request. The method always
@@ -265,8 +264,7 @@ func (client VirtualMachineExtensionImagesClient) ListVersionsPreparer(ctx conte
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListVersionsResponder handles the response to the ListVersions request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineextensions.go
index a77180ddc..e5e7a178b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineextensions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineextensions.go
@@ -35,7 +35,9 @@ func NewVirtualMachineExtensionsClient(subscriptionID string) VirtualMachineExte
return NewVirtualMachineExtensionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewVirtualMachineExtensionsClientWithBaseURI creates an instance of the VirtualMachineExtensionsClient client.
+// 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)}
}
@@ -99,9 +101,8 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdatePreparer(ctx context.
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -178,9 +179,8 @@ func (client VirtualMachineExtensionsClient) DeletePreparer(ctx context.Context,
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -266,8 +266,7 @@ func (client VirtualMachineExtensionsClient) GetPreparer(ctx context.Context, re
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -347,8 +346,7 @@ func (client VirtualMachineExtensionsClient) ListPreparer(ctx context.Context, r
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineExtensionsClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -423,9 +421,8 @@ func (client VirtualMachineExtensionsClient) UpdatePreparer(ctx context.Context,
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineimages.go
index e1e830c2f..ac4ffaea2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineimages.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineimages.go
@@ -35,7 +35,9 @@ func NewVirtualMachineImagesClient(subscriptionID string) VirtualMachineImagesCl
return NewVirtualMachineImagesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewVirtualMachineImagesClientWithBaseURI creates an instance of the VirtualMachineImagesClient client.
+// 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)}
}
@@ -106,8 +108,7 @@ func (client VirtualMachineImagesClient) GetPreparer(ctx context.Context, locati
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -129,8 +130,8 @@ func (client VirtualMachineImagesClient) GetResponder(resp *http.Response) (resu
// publisherName - a valid image publisher.
// offer - a valid image publisher offer.
// skus - a valid image SKU.
-// filter - the filter to apply on the operation.
-func (client VirtualMachineImagesClient) List(ctx context.Context, location string, publisherName string, offer string, skus string, filter string, top *int32, orderby string) (result ListVirtualMachineImageResource, err error) {
+// 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() {
@@ -141,7 +142,7 @@ func (client VirtualMachineImagesClient) List(ctx context.Context, location stri
tracing.EndSpan(ctx, sc, err)
}()
}
- req, err := client.ListPreparer(ctx, location, publisherName, offer, skus, filter, top, orderby)
+ 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
@@ -163,7 +164,7 @@ func (client VirtualMachineImagesClient) List(ctx context.Context, location stri
}
// ListPreparer prepares the List request.
-func (client VirtualMachineImagesClient) ListPreparer(ctx context.Context, location string, publisherName string, offer string, skus string, filter string, top *int32, orderby string) (*http.Request, error) {
+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),
@@ -176,8 +177,8 @@ func (client VirtualMachineImagesClient) ListPreparer(ctx context.Context, locat
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
- if len(filter) > 0 {
- queryParameters["$filter"] = autorest.Encode("query", filter)
+ if len(expand) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
}
if top != nil {
queryParameters["$top"] = autorest.Encode("query", *top)
@@ -197,8 +198,7 @@ func (client VirtualMachineImagesClient) ListPreparer(ctx context.Context, locat
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -274,8 +274,7 @@ func (client VirtualMachineImagesClient) ListOffersPreparer(ctx context.Context,
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListOffersResponder handles the response to the ListOffers request. The method always
@@ -349,8 +348,7 @@ func (client VirtualMachineImagesClient) ListPublishersPreparer(ctx context.Cont
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListPublishersResponder handles the response to the ListPublishers request. The method always
@@ -428,8 +426,7 @@ func (client VirtualMachineImagesClient) ListSkusPreparer(ctx context.Context, l
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListSkusResponder handles the response to the ListSkus request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineruncommands.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineruncommands.go
index 82be43acf..97b91a188 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineruncommands.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineruncommands.go
@@ -36,7 +36,9 @@ func NewVirtualMachineRunCommandsClient(subscriptionID string) VirtualMachineRun
return NewVirtualMachineRunCommandsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewVirtualMachineRunCommandsClientWithBaseURI creates an instance of the VirtualMachineRunCommandsClient client.
+// 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)}
}
@@ -107,8 +109,7 @@ func (client VirtualMachineRunCommandsClient) GetPreparer(ctx context.Context, l
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -189,8 +190,7 @@ func (client VirtualMachineRunCommandsClient) ListPreparer(ctx context.Context,
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachines.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachines.go
index b329db181..e3f4955e9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachines.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachines.go
@@ -36,7 +36,8 @@ func NewVirtualMachinesClient(subscriptionID string) VirtualMachinesClient {
return NewVirtualMachinesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewVirtualMachinesClientWithBaseURI creates an instance of the VirtualMachinesClient client.
+// 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)}
}
@@ -107,9 +108,8 @@ func (client VirtualMachinesClient) CapturePreparer(ctx context.Context, resourc
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -185,9 +185,8 @@ func (client VirtualMachinesClient) ConvertToManagedDisksPreparer(ctx context.Co
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -207,7 +206,8 @@ func (client VirtualMachinesClient) ConvertToManagedDisksResponder(resp *http.Re
return
}
-// CreateOrUpdate the operation to create or update a virtual machine.
+// CreateOrUpdate the operation to create or update a virtual machine. Please note some properties can be set only
+// during virtual machine creation.
// Parameters:
// resourceGroupName - the name of the resource group.
// VMName - the name of the virtual machine.
@@ -286,9 +286,8 @@ func (client VirtualMachinesClient) CreateOrUpdatePreparer(ctx context.Context,
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -364,9 +363,8 @@ func (client VirtualMachinesClient) DeallocatePreparer(ctx context.Context, reso
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -440,9 +438,8 @@ func (client VirtualMachinesClient) DeletePreparer(ctx context.Context, resource
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -462,7 +459,11 @@ func (client VirtualMachinesClient) DeleteResponder(resp *http.Response) (result
return
}
-// Generalize sets the state of the virtual machine to generalized.
+// Generalize sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine
+// before performing this operation.
For Windows, please refer to [Create a managed image of a generalized VM in
+// Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/capture-image-resource).
For Linux, please
+// refer to [How to create an image of a virtual machine or
+// VHD](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/capture-image).
// Parameters:
// resourceGroupName - the name of the resource group.
// VMName - the name of the virtual machine.
@@ -522,8 +523,7 @@ func (client VirtualMachinesClient) GeneralizePreparer(ctx context.Context, reso
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GeneralizeResponder handles the response to the Generalize request. The method always
@@ -602,8 +602,7 @@ func (client VirtualMachinesClient) GetPreparer(ctx context.Context, resourceGro
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -679,8 +678,7 @@ func (client VirtualMachinesClient) InstanceViewPreparer(ctx context.Context, re
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// InstanceViewResponder handles the response to the InstanceView request. The method always
@@ -756,8 +754,7 @@ func (client VirtualMachinesClient) ListPreparer(ctx context.Context, resourceGr
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -872,8 +869,7 @@ func (client VirtualMachinesClient) ListAllPreparer(ctx context.Context, statusO
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListAllResponder handles the response to the ListAll request. The method always
@@ -986,8 +982,7 @@ func (client VirtualMachinesClient) ListAvailableSizesPreparer(ctx context.Conte
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListAvailableSizesResponder handles the response to the ListAvailableSizes request. The method always
@@ -1068,8 +1063,7 @@ func (client VirtualMachinesClient) ListByLocationPreparer(ctx context.Context,
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByLocationResponder handles the response to the ListByLocation request. The method always
@@ -1176,9 +1170,8 @@ func (client VirtualMachinesClient) PerformMaintenancePreparer(ctx context.Conte
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -1261,9 +1254,8 @@ func (client VirtualMachinesClient) PowerOffPreparer(ctx context.Context, resour
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -1337,9 +1329,8 @@ func (client VirtualMachinesClient) ReapplyPreparer(ctx context.Context, resourc
// ReapplySender sends the Reapply request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) ReapplySender(req *http.Request) (future VirtualMachinesReapplyFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -1413,9 +1404,8 @@ func (client VirtualMachinesClient) RedeployPreparer(ctx context.Context, resour
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -1495,9 +1485,8 @@ func (client VirtualMachinesClient) ReimagePreparer(ctx context.Context, resourc
// ReimageSender sends the Reimage request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) ReimageSender(req *http.Request) (future VirtualMachinesReimageFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -1571,9 +1560,8 @@ func (client VirtualMachinesClient) RestartPreparer(ctx context.Context, resourc
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -1656,9 +1644,8 @@ func (client VirtualMachinesClient) RunCommandPreparer(ctx context.Context, reso
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -1733,9 +1720,8 @@ func (client VirtualMachinesClient) StartPreparer(ctx context.Context, resourceG
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -1812,9 +1798,8 @@ func (client VirtualMachinesClient) UpdatePreparer(ctx context.Context, resource
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) UpdateSender(req *http.Request) (future VirtualMachinesUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetextensions.go
index 7e4d6d0a6..2fa341f0a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetextensions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetextensions.go
@@ -36,7 +36,8 @@ func NewVirtualMachineScaleSetExtensionsClient(subscriptionID string) VirtualMac
}
// NewVirtualMachineScaleSetExtensionsClientWithBaseURI creates an instance of the
-// VirtualMachineScaleSetExtensionsClient client.
+// 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)}
}
@@ -87,6 +88,7 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdatePreparer(ctx
"api-version": APIVersion,
}
+ extensionParameters.Type = nil
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPut(),
@@ -100,9 +102,8 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdatePreparer(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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -179,9 +180,8 @@ func (client VirtualMachineScaleSetExtensionsClient) DeletePreparer(ctx context.
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -267,8 +267,7 @@ func (client VirtualMachineScaleSetExtensionsClient) GetPreparer(ctx context.Con
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -345,8 +344,7 @@ func (client VirtualMachineScaleSetExtensionsClient) ListPreparer(ctx context.Co
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -398,3 +396,86 @@ func (client VirtualMachineScaleSetExtensionsClient) ListComplete(ctx context.Co
result.page, err = client.List(ctx, resourceGroupName, VMScaleSetName)
return
}
+
+// Update the operation to update an extension.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set where the extension should be updated.
+// vmssExtensionName - the name of the VM scale set extension.
+// extensionParameters - parameters supplied to the Update VM scale set Extension operation.
+func (client VirtualMachineScaleSetExtensionsClient) Update(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, extensionParameters VirtualMachineScaleSetExtensionUpdate) (result VirtualMachineScaleSetExtensionsUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, VMScaleSetName, vmssExtensionName, extensionParameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client VirtualMachineScaleSetExtensionsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, extensionParameters VirtualMachineScaleSetExtensionUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ "vmssExtensionName": autorest.Encode("path", vmssExtensionName),
+ }
+
+ const APIVersion = "2019-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ extensionParameters.Name = nil
+ extensionParameters.Type = nil
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}", pathParameters),
+ autorest.WithJSON(extensionParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetExtensionsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetExtensionsUpdateFuture, err error) {
+ var resp *http.Response
+ 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 VirtualMachineScaleSetExtensionsClient) UpdateResponder(resp *http.Response) (result VirtualMachineScaleSetExtension, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/compute/mgmt/2019-07-01/compute/virtualmachinescalesetrollingupgrades.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetrollingupgrades.go
index c20c01d51..4d6c96a9a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetrollingupgrades.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetrollingupgrades.go
@@ -37,7 +37,8 @@ func NewVirtualMachineScaleSetRollingUpgradesClient(subscriptionID string) Virtu
}
// NewVirtualMachineScaleSetRollingUpgradesClientWithBaseURI creates an instance of the
-// VirtualMachineScaleSetRollingUpgradesClient client.
+// 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)}
}
@@ -96,9 +97,8 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) CancelPreparer(ctx con
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -178,8 +178,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatestPreparer(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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetLatestResponder handles the response to the GetLatest request. The method always
@@ -251,9 +250,8 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeP
// StartExtensionUpgradeSender sends the StartExtensionUpgrade request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeSender(req *http.Request) (future VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -328,9 +326,8 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradePreparer
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesets.go
index 54b1393fe..367b5a9ce 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesets.go
@@ -36,7 +36,9 @@ func NewVirtualMachineScaleSetsClient(subscriptionID string) VirtualMachineScale
return NewVirtualMachineScaleSetsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewVirtualMachineScaleSetsClientWithBaseURI creates an instance of the VirtualMachineScaleSetsClient client.
+// 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)}
}
@@ -87,20 +89,25 @@ func (client VirtualMachineScaleSetsClient) ConvertToSinglePlacementGroupPrepare
"vmScaleSetName": autorest.Encode("path", VMScaleSetName),
}
+ const APIVersion = "2019-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/convertToSinglePlacementGroup", pathParameters),
- autorest.WithJSON(parameters))
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// ConvertToSinglePlacementGroupSender sends the ConvertToSinglePlacementGroup request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) ConvertToSinglePlacementGroupSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ConvertToSinglePlacementGroupResponder handles the response to the ConvertToSinglePlacementGroup request. The method always
@@ -138,15 +145,15 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdate(ctx context.Context,
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: 5, 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: 5, 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: 0, Chain: nil},
+ {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
}},
}},
}},
@@ -195,9 +202,8 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdatePreparer(ctx context.C
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -279,9 +285,8 @@ func (client VirtualMachineScaleSetsClient) DeallocatePreparer(ctx context.Conte
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -355,9 +360,8 @@ func (client VirtualMachineScaleSetsClient) DeletePreparer(ctx context.Context,
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -440,9 +444,8 @@ func (client VirtualMachineScaleSetsClient) DeleteInstancesPreparer(ctx context.
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -525,8 +528,7 @@ func (client VirtualMachineScaleSetsClient) ForceRecoveryServiceFabricPlatformUp
// ForceRecoveryServiceFabricPlatformUpdateDomainWalkSender sends the ForceRecoveryServiceFabricPlatformUpdateDomainWalk request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) ForceRecoveryServiceFabricPlatformUpdateDomainWalkSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ForceRecoveryServiceFabricPlatformUpdateDomainWalkResponder handles the response to the ForceRecoveryServiceFabricPlatformUpdateDomainWalk request. The method always
@@ -602,8 +604,7 @@ func (client VirtualMachineScaleSetsClient) GetPreparer(ctx context.Context, res
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -679,8 +680,7 @@ func (client VirtualMachineScaleSetsClient) GetInstanceViewPreparer(ctx context.
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetInstanceViewResponder handles the response to the GetInstanceView request. The method always
@@ -757,8 +757,7 @@ func (client VirtualMachineScaleSetsClient) GetOSUpgradeHistoryPreparer(ctx cont
// GetOSUpgradeHistorySender sends the GetOSUpgradeHistory request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) GetOSUpgradeHistorySender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetOSUpgradeHistoryResponder handles the response to the GetOSUpgradeHistory request. The method always
@@ -870,8 +869,7 @@ func (client VirtualMachineScaleSetsClient) ListPreparer(ctx context.Context, re
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -982,8 +980,7 @@ func (client VirtualMachineScaleSetsClient) ListAllPreparer(ctx context.Context)
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListAllResponder handles the response to the ListAll request. The method always
@@ -1098,8 +1095,7 @@ func (client VirtualMachineScaleSetsClient) ListSkusPreparer(ctx context.Context
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListSkusResponder handles the response to the ListSkus request. The method always
@@ -1214,9 +1210,8 @@ func (client VirtualMachineScaleSetsClient) PerformMaintenancePreparer(ctx conte
// PerformMaintenanceSender sends the PerformMaintenance request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) PerformMaintenanceSender(req *http.Request) (future VirtualMachineScaleSetsPerformMaintenanceFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -1305,9 +1300,8 @@ func (client VirtualMachineScaleSetsClient) PowerOffPreparer(ctx context.Context
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -1388,9 +1382,8 @@ func (client VirtualMachineScaleSetsClient) RedeployPreparer(ctx context.Context
// RedeploySender sends the Redeploy request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) RedeploySender(req *http.Request) (future VirtualMachineScaleSetsRedeployFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -1471,9 +1464,8 @@ func (client VirtualMachineScaleSetsClient) ReimagePreparer(ctx context.Context,
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -1554,9 +1546,8 @@ func (client VirtualMachineScaleSetsClient) ReimageAllPreparer(ctx context.Conte
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -1636,9 +1627,8 @@ func (client VirtualMachineScaleSetsClient) RestartPreparer(ctx context.Context,
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -1718,9 +1708,8 @@ func (client VirtualMachineScaleSetsClient) StartPreparer(ctx context.Context, r
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -1797,9 +1786,8 @@ func (client VirtualMachineScaleSetsClient) UpdatePreparer(ctx context.Context,
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -1883,9 +1871,8 @@ func (client VirtualMachineScaleSetsClient) UpdateInstancesPreparer(ctx context.
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetvmextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetvmextensions.go
index 3fe6bf51d..7ead82f40 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetvmextensions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetvmextensions.go
@@ -37,7 +37,8 @@ func NewVirtualMachineScaleSetVMExtensionsClient(subscriptionID string) VirtualM
}
// NewVirtualMachineScaleSetVMExtensionsClientWithBaseURI creates an instance of the
-// VirtualMachineScaleSetVMExtensionsClient client.
+// VirtualMachineScaleSetVMExtensionsClient client using a custom endpoint. Use this when interacting with an Azure
+// cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
func NewVirtualMachineScaleSetVMExtensionsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetVMExtensionsClient {
return VirtualMachineScaleSetVMExtensionsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -103,9 +104,8 @@ func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdatePreparer(ct
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -184,9 +184,8 @@ func (client VirtualMachineScaleSetVMExtensionsClient) DeletePreparer(ctx contex
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMExtensionsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetVMExtensionsDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -274,8 +273,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) GetPreparer(ctx context.C
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMExtensionsClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -357,8 +355,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) ListPreparer(ctx context.
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMExtensionsClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -435,9 +432,8 @@ func (client VirtualMachineScaleSetVMExtensionsClient) UpdatePreparer(ctx contex
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMExtensionsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetVMExtensionsUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetvms.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetvms.go
index 155e6eee8..ab94b738f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetvms.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetvms.go
@@ -36,7 +36,9 @@ func NewVirtualMachineScaleSetVMsClient(subscriptionID string) VirtualMachineSca
return NewVirtualMachineScaleSetVMsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewVirtualMachineScaleSetVMsClientWithBaseURI creates an instance of the VirtualMachineScaleSetVMsClient client.
+// 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)}
}
@@ -99,9 +101,8 @@ func (client VirtualMachineScaleSetVMsClient) DeallocatePreparer(ctx context.Con
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -177,9 +178,8 @@ func (client VirtualMachineScaleSetVMsClient) DeletePreparer(ctx context.Context
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -265,8 +265,7 @@ func (client VirtualMachineScaleSetVMsClient) GetPreparer(ctx context.Context, r
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -344,8 +343,7 @@ func (client VirtualMachineScaleSetVMsClient) GetInstanceViewPreparer(ctx contex
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetInstanceViewResponder handles the response to the GetInstanceView request. The method always
@@ -434,8 +432,7 @@ func (client VirtualMachineScaleSetVMsClient) ListPreparer(ctx context.Context,
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -544,9 +541,8 @@ func (client VirtualMachineScaleSetVMsClient) PerformMaintenancePreparer(ctx con
// PerformMaintenanceSender sends the PerformMaintenance request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) PerformMaintenanceSender(req *http.Request) (future VirtualMachineScaleSetVMsPerformMaintenanceFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -631,9 +627,8 @@ func (client VirtualMachineScaleSetVMsClient) PowerOffPreparer(ctx context.Conte
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -710,9 +705,8 @@ func (client VirtualMachineScaleSetVMsClient) RedeployPreparer(ctx context.Conte
// RedeploySender sends the Redeploy request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) RedeploySender(req *http.Request) (future VirtualMachineScaleSetVMsRedeployFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -794,9 +788,8 @@ func (client VirtualMachineScaleSetVMsClient) ReimagePreparer(ctx context.Contex
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -873,9 +866,8 @@ func (client VirtualMachineScaleSetVMsClient) ReimageAllPreparer(ctx context.Con
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -951,9 +943,8 @@ func (client VirtualMachineScaleSetVMsClient) RestartPreparer(ctx context.Contex
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -1038,9 +1029,8 @@ func (client VirtualMachineScaleSetVMsClient) RunCommandPreparer(ctx context.Con
// RunCommandSender sends the RunCommand request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) RunCommandSender(req *http.Request) (future VirtualMachineScaleSetVMsRunCommandFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -1117,9 +1107,8 @@ func (client VirtualMachineScaleSetVMsClient) StartPreparer(ctx context.Context,
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -1223,9 +1212,8 @@ func (client VirtualMachineScaleSetVMsClient) UpdatePreparer(ctx context.Context
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetVMsUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinesizes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinesizes.go
index 55335fe9a..c4fffc18c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinesizes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinesizes.go
@@ -36,7 +36,9 @@ func NewVirtualMachineSizesClient(subscriptionID string) VirtualMachineSizesClie
return NewVirtualMachineSizesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewVirtualMachineSizesClientWithBaseURI creates an instance of the VirtualMachineSizesClient client.
+// 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)}
}
@@ -106,8 +108,7 @@ func (client VirtualMachineSizesClient) ListPreparer(ctx context.Context, locati
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
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
new file mode 100644
index 000000000..fa23adc38
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/availabilitysets.go
@@ -0,0 +1,655 @@
+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
+}
+
+// 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 = "2019-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.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,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete delete an availability set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// availabilitySetName - the name of the availability set.
+func (client AvailabilitySetsClient) Delete(ctx context.Context, resourceGroupName string, availabilitySetName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, availabilitySetName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// 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 = "2019-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.Compute/availabilitySets/{availabilitySetName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client AvailabilitySetsClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client AvailabilitySetsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get retrieves information about an availability set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// availabilitySetName - the name of the availability set.
+func (client AvailabilitySetsClient) Get(ctx context.Context, resourceGroupName string, availabilitySetName string) (result AvailabilitySet, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, availabilitySetName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// 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 = "2019-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.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,
+ client.ByInspecting(),
+ 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
+}
+
+// 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 = "2019-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.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,
+ client.ByInspecting(),
+ 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
+}
+
+// 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 = "2019-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.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,
+ client.ByInspecting(),
+ 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.
+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
+}
+
+// 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 = "2019-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}/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,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listBySubscriptionNextResults retrieves the next set of results, if any.
+func (client AvailabilitySetsClient) listBySubscriptionNextResults(ctx context.Context, lastResults AvailabilitySetListResult) (result AvailabilitySetListResult, err error) {
+ req, err := lastResults.availabilitySetListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListBySubscriptionSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "listBySubscriptionNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListBySubscriptionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required.
+func (client AvailabilitySetsClient) ListBySubscriptionComplete(ctx context.Context, expand string) (result AvailabilitySetListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.ListBySubscription")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListBySubscription(ctx, expand)
+ return
+}
+
+// Update update an availability set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// availabilitySetName - the name of the availability set.
+// parameters - parameters supplied to the Update Availability Set operation.
+func (client AvailabilitySetsClient) Update(ctx context.Context, resourceGroupName string, availabilitySetName string, parameters AvailabilitySetUpdate) (result AvailabilitySet, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, availabilitySetName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Update", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client AvailabilitySetsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, availabilitySetName string, parameters AvailabilitySetUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "availabilitySetName": autorest.Encode("path", availabilitySetName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/availabilitySets/{availabilitySetName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client AvailabilitySetsClient) UpdateSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client AvailabilitySetsClient) UpdateResponder(resp *http.Response) (result AvailabilitySet, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/2019-12-01/compute/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/client.go
new file mode 100644
index 000000000..d9d043019
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/client.go
@@ -0,0 +1,52 @@
+// Package compute implements the Azure ARM Compute service API version .
+//
+// 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/2019-12-01/compute/containerservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/containerservices.go
new file mode 100644
index 000000000..0d0f705da
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/containerservices.go
@@ -0,0 +1,535 @@
+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"
+)
+
+// ContainerServicesClient is the compute Client
+type ContainerServicesClient struct {
+ BaseClient
+}
+
+// NewContainerServicesClient creates an instance of the ContainerServicesClient client.
+func NewContainerServicesClient(subscriptionID string) ContainerServicesClient {
+ return NewContainerServicesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient 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 NewContainerServicesClientWithBaseURI(baseURI string, subscriptionID string) ContainerServicesClient {
+ return ContainerServicesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates a container service with the specified configuration of orchestrator, masters, and
+// agents.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// containerServiceName - the name of the container service in the specified subscription and resource group.
+// parameters - parameters supplied to the Create or Update a Container Service operation.
+func (client ContainerServicesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, containerServiceName string, parameters ContainerService) (result ContainerServicesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.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.ContainerServiceProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.CustomProfile", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.CustomProfile.Orchestrator", Name: validation.Null, Rule: true, Chain: nil}}},
+ {Target: "parameters.ContainerServiceProperties.ServicePrincipalProfile", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.ServicePrincipalProfile.ClientID", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.ContainerServiceProperties.ServicePrincipalProfile.Secret", Name: validation.Null, Rule: true, Chain: nil},
+ }},
+ {Target: "parameters.ContainerServiceProperties.MasterProfile", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.MasterProfile.DNSPrefix", Name: validation.Null, Rule: true, Chain: nil}}},
+ {Target: "parameters.ContainerServiceProperties.AgentPoolProfiles", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.ContainerServiceProperties.WindowsProfile", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.WindowsProfile.AdminUsername", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.WindowsProfile.AdminUsername", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$`, Chain: nil}}},
+ {Target: "parameters.ContainerServiceProperties.WindowsProfile.AdminPassword", Name: validation.Null, Rule: true, Chain: nil},
+ }},
+ {Target: "parameters.ContainerServiceProperties.LinuxProfile", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.LinuxProfile.AdminUsername", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.LinuxProfile.AdminUsername", Name: validation.Pattern, Rule: `^[a-z][a-z0-9_-]*$`, Chain: nil}}},
+ {Target: "parameters.ContainerServiceProperties.LinuxProfile.SSH", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.LinuxProfile.SSH.PublicKeys", Name: validation.Null, Rule: true, Chain: nil}}},
+ }},
+ {Target: "parameters.ContainerServiceProperties.DiagnosticsProfile", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.DiagnosticsProfile.VMDiagnostics", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.DiagnosticsProfile.VMDiagnostics.Enabled", Name: validation.Null, Rule: true, Chain: nil}}},
+ }},
+ }}}}}); err != nil {
+ return result, validation.NewError("compute.ContainerServicesClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, containerServiceName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client ContainerServicesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, containerServiceName string, parameters ContainerService) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "containerServiceName": autorest.Encode("path", containerServiceName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-01-31"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}", 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 ContainerServicesClient) CreateOrUpdateSender(req *http.Request) (future ContainerServicesCreateOrUpdateFuture, 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 ContainerServicesClient) CreateOrUpdateResponder(resp *http.Response) (result ContainerService, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete deletes the specified container service in the specified subscription and resource group. The operation does
+// not delete other resources created as part of creating a container service, including storage accounts, VMs, and
+// availability sets. All the other resources created with the container service are part of the same resource group
+// and can be deleted individually.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// containerServiceName - the name of the container service in the specified subscription and resource group.
+func (client ContainerServicesClient) Delete(ctx context.Context, resourceGroupName string, containerServiceName string) (result ContainerServicesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, containerServiceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client ContainerServicesClient) DeletePreparer(ctx context.Context, resourceGroupName string, containerServiceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "containerServiceName": autorest.Encode("path", containerServiceName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-01-31"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}", 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 ContainerServicesClient) DeleteSender(req *http.Request) (future ContainerServicesDeleteFuture, 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 ContainerServicesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get gets the properties of the specified container service in the specified subscription and resource group. The
+// operation returns the properties including state, orchestrator, number of masters and agents, and FQDNs of masters
+// and agents.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// containerServiceName - the name of the container service in the specified subscription and resource group.
+func (client ContainerServicesClient) Get(ctx context.Context, resourceGroupName string, containerServiceName string) (result ContainerService, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.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, containerServiceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "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.ContainerServicesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client ContainerServicesClient) GetPreparer(ctx context.Context, resourceGroupName string, containerServiceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "containerServiceName": autorest.Encode("path", containerServiceName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-01-31"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}", 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 ContainerServicesClient) 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 ContainerServicesClient) GetResponder(resp *http.Response) (result ContainerService, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List gets a list of container services in the specified subscription. The operation returns properties of each
+// container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents.
+func (client ContainerServicesClient) List(ctx context.Context) (result ContainerServiceListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.List")
+ defer func() {
+ sc := -1
+ if result.cslr.Response.Response != nil {
+ sc = result.cslr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.cslr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.cslr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client ContainerServicesClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-01-31"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/containerServices", 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 ContainerServicesClient) 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 ContainerServicesClient) ListResponder(resp *http.Response) (result ContainerServiceListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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 ContainerServicesClient) listNextResults(ctx context.Context, lastResults ContainerServiceListResult) (result ContainerServiceListResult, err error) {
+ req, err := lastResults.containerServiceListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "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.ContainerServicesClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ContainerServicesClient) ListComplete(ctx context.Context) (result ContainerServiceListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.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 a list of container services in the specified subscription and resource group. The
+// operation returns properties of each container service including state, orchestrator, number of masters and agents,
+// and FQDNs of masters and agents.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client ContainerServicesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ContainerServiceListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.cslr.Response.Response != nil {
+ sc = result.cslr.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.ContainerServicesClient", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.cslr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.cslr, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "ListByResourceGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client ContainerServicesClient) 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-01-31"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices", 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 ContainerServicesClient) 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 ContainerServicesClient) ListByResourceGroupResponder(resp *http.Response) (result ContainerServiceListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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 ContainerServicesClient) listByResourceGroupNextResults(ctx context.Context, lastResults ContainerServiceListResult) (result ContainerServiceListResult, err error) {
+ req, err := lastResults.containerServiceListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "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.ContainerServicesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ContainerServicesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ContainerServiceListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.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/2019-12-01/compute/dedicatedhostgroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/dedicatedhostgroups.go
new file mode 100644
index 000000000..2ae90747f
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/dedicatedhostgroups.go
@@ -0,0 +1,588 @@
+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"
+)
+
+// DedicatedHostGroupsClient is the compute Client
+type DedicatedHostGroupsClient struct {
+ BaseClient
+}
+
+// NewDedicatedHostGroupsClient creates an instance of the DedicatedHostGroupsClient client.
+func NewDedicatedHostGroupsClient(subscriptionID string) DedicatedHostGroupsClient {
+ return NewDedicatedHostGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewDedicatedHostGroupsClientWithBaseURI creates an instance of the DedicatedHostGroupsClient client using a custom
+// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure
+// stack).
+func NewDedicatedHostGroupsClientWithBaseURI(baseURI string, subscriptionID string) DedicatedHostGroupsClient {
+ return DedicatedHostGroupsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate create or update a dedicated host group. For details of Dedicated Host and Dedicated Host Groups
+// please see [Dedicated Host Documentation] (https://go.microsoft.com/fwlink/?linkid=2082596)
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// hostGroupName - the name of the dedicated host group.
+// parameters - parameters supplied to the Create Dedicated Host Group.
+func (client DedicatedHostGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, hostGroupName string, parameters DedicatedHostGroup) (result DedicatedHostGroup, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.DedicatedHostGroupProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.DedicatedHostGroupProperties.PlatformFaultDomainCount", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.DedicatedHostGroupProperties.PlatformFaultDomainCount", Name: validation.InclusiveMaximum, Rule: int64(3), Chain: nil},
+ {Target: "parameters.DedicatedHostGroupProperties.PlatformFaultDomainCount", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil},
+ }},
+ }}}}}); err != nil {
+ return result, validation.NewError("compute.DedicatedHostGroupsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, hostGroupName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateOrUpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "CreateOrUpdate", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client DedicatedHostGroupsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, hostGroupName string, parameters DedicatedHostGroup) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "hostGroupName": autorest.Encode("path", hostGroupName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/hostGroups/{hostGroupName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client DedicatedHostGroupsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client DedicatedHostGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result DedicatedHostGroup, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete delete a dedicated host group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// hostGroupName - the name of the dedicated host group.
+func (client DedicatedHostGroupsClient) Delete(ctx context.Context, resourceGroupName string, hostGroupName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, hostGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client DedicatedHostGroupsClient) DeletePreparer(ctx context.Context, resourceGroupName string, hostGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "hostGroupName": autorest.Encode("path", hostGroupName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/hostGroups/{hostGroupName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client DedicatedHostGroupsClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client DedicatedHostGroupsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get retrieves information about a dedicated host group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// hostGroupName - the name of the dedicated host group.
+func (client DedicatedHostGroupsClient) Get(ctx context.Context, resourceGroupName string, hostGroupName string) (result DedicatedHostGroup, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, hostGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client DedicatedHostGroupsClient) GetPreparer(ctx context.Context, resourceGroupName string, hostGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "hostGroupName": autorest.Encode("path", hostGroupName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/hostGroups/{hostGroupName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client DedicatedHostGroupsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client DedicatedHostGroupsClient) GetResponder(resp *http.Response) (result DedicatedHostGroup, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListByResourceGroup lists all of the dedicated host groups in the specified resource group. Use the nextLink
+// property in the response to get the next page of dedicated host groups.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client DedicatedHostGroupsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result DedicatedHostGroupListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.dhglr.Response.Response != nil {
+ sc = result.dhglr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listByResourceGroupNextResults
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.dhglr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.dhglr, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "ListByResourceGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client DedicatedHostGroupsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/hostGroups", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client DedicatedHostGroupsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
+// closes the http.Response Body.
+func (client DedicatedHostGroupsClient) ListByResourceGroupResponder(resp *http.Response) (result DedicatedHostGroupListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByResourceGroupNextResults retrieves the next set of results, if any.
+func (client DedicatedHostGroupsClient) listByResourceGroupNextResults(ctx context.Context, lastResults DedicatedHostGroupListResult) (result DedicatedHostGroupListResult, err error) {
+ req, err := lastResults.dedicatedHostGroupListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client DedicatedHostGroupsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result DedicatedHostGroupListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByResourceGroup(ctx, resourceGroupName)
+ return
+}
+
+// ListBySubscription lists all of the dedicated host groups in the subscription. Use the nextLink property in the
+// response to get the next page of dedicated host groups.
+func (client DedicatedHostGroupsClient) ListBySubscription(ctx context.Context) (result DedicatedHostGroupListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupsClient.ListBySubscription")
+ defer func() {
+ sc := -1
+ if result.dhglr.Response.Response != nil {
+ sc = result.dhglr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listBySubscriptionNextResults
+ req, err := client.ListBySubscriptionPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "ListBySubscription", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListBySubscriptionSender(req)
+ if err != nil {
+ result.dhglr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "ListBySubscription", resp, "Failure sending request")
+ return
+ }
+
+ result.dhglr, err = client.ListBySubscriptionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "ListBySubscription", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListBySubscriptionPreparer prepares the ListBySubscription request.
+func (client DedicatedHostGroupsClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/hostGroups", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListBySubscriptionSender sends the ListBySubscription request. The method will close the
+// http.Response Body if it receives an error.
+func (client DedicatedHostGroupsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always
+// closes the http.Response Body.
+func (client DedicatedHostGroupsClient) ListBySubscriptionResponder(resp *http.Response) (result DedicatedHostGroupListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listBySubscriptionNextResults retrieves the next set of results, if any.
+func (client DedicatedHostGroupsClient) listBySubscriptionNextResults(ctx context.Context, lastResults DedicatedHostGroupListResult) (result DedicatedHostGroupListResult, err error) {
+ req, err := lastResults.dedicatedHostGroupListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListBySubscriptionSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "listBySubscriptionNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListBySubscriptionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required.
+func (client DedicatedHostGroupsClient) ListBySubscriptionComplete(ctx context.Context) (result DedicatedHostGroupListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupsClient.ListBySubscription")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListBySubscription(ctx)
+ return
+}
+
+// Update update an dedicated host group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// hostGroupName - the name of the dedicated host group.
+// parameters - parameters supplied to the Update Dedicated Host Group operation.
+func (client DedicatedHostGroupsClient) Update(ctx context.Context, resourceGroupName string, hostGroupName string, parameters DedicatedHostGroupUpdate) (result DedicatedHostGroup, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, hostGroupName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Update", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client DedicatedHostGroupsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, hostGroupName string, parameters DedicatedHostGroupUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "hostGroupName": autorest.Encode("path", hostGroupName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/hostGroups/{hostGroupName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client DedicatedHostGroupsClient) UpdateSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client DedicatedHostGroupsClient) UpdateResponder(resp *http.Response) (result DedicatedHostGroup, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/2019-12-01/compute/dedicatedhosts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/dedicatedhosts.go
new file mode 100644
index 000000000..53126ca84
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/dedicatedhosts.go
@@ -0,0 +1,491 @@
+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"
+)
+
+// DedicatedHostsClient is the compute Client
+type DedicatedHostsClient struct {
+ BaseClient
+}
+
+// NewDedicatedHostsClient creates an instance of the DedicatedHostsClient client.
+func NewDedicatedHostsClient(subscriptionID string) DedicatedHostsClient {
+ return NewDedicatedHostsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewDedicatedHostsClientWithBaseURI creates an instance of the DedicatedHostsClient client using a custom endpoint.
+// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
+func NewDedicatedHostsClientWithBaseURI(baseURI string, subscriptionID string) DedicatedHostsClient {
+ return DedicatedHostsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate create or update a dedicated host .
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// hostGroupName - the name of the dedicated host group.
+// hostName - the name of the dedicated host .
+// parameters - parameters supplied to the Create Dedicated Host.
+func (client DedicatedHostsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, parameters DedicatedHost) (result DedicatedHostsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.DedicatedHostProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.DedicatedHostProperties.PlatformFaultDomain", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.DedicatedHostProperties.PlatformFaultDomain", Name: validation.InclusiveMaximum, Rule: int64(2), Chain: nil},
+ {Target: "parameters.DedicatedHostProperties.PlatformFaultDomain", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
+ }},
+ }},
+ {Target: "parameters.Sku", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("compute.DedicatedHostsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, hostGroupName, hostName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client DedicatedHostsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, parameters DedicatedHost) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "hostGroupName": autorest.Encode("path", hostGroupName),
+ "hostName": autorest.Encode("path", hostName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/hostGroups/{hostGroupName}/hosts/{hostName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client DedicatedHostsClient) CreateOrUpdateSender(req *http.Request) (future DedicatedHostsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ 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 DedicatedHostsClient) CreateOrUpdateResponder(resp *http.Response) (result DedicatedHost, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete delete a dedicated host.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// hostGroupName - the name of the dedicated host group.
+// hostName - the name of the dedicated host.
+func (client DedicatedHostsClient) Delete(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string) (result DedicatedHostsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, hostGroupName, hostName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client DedicatedHostsClient) DeletePreparer(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "hostGroupName": autorest.Encode("path", hostGroupName),
+ "hostName": autorest.Encode("path", hostName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/hostGroups/{hostGroupName}/hosts/{hostName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client DedicatedHostsClient) DeleteSender(req *http.Request) (future DedicatedHostsDeleteFuture, err error) {
+ var resp *http.Response
+ 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 DedicatedHostsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get retrieves information about a dedicated host.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// hostGroupName - the name of the dedicated host group.
+// hostName - the name of the dedicated host.
+// expand - the expand expression to apply on the operation.
+func (client DedicatedHostsClient) Get(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, expand InstanceViewTypes) (result DedicatedHost, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, hostGroupName, hostName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client DedicatedHostsClient) GetPreparer(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, expand InstanceViewTypes) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "hostGroupName": autorest.Encode("path", hostGroupName),
+ "hostName": autorest.Encode("path", hostName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(string(expand)) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client DedicatedHostsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client DedicatedHostsClient) GetResponder(resp *http.Response) (result DedicatedHost, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListByHostGroup lists all of the dedicated hosts in the specified dedicated host group. Use the nextLink property in
+// the response to get the next page of dedicated hosts.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// hostGroupName - the name of the dedicated host group.
+func (client DedicatedHostsClient) ListByHostGroup(ctx context.Context, resourceGroupName string, hostGroupName string) (result DedicatedHostListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostsClient.ListByHostGroup")
+ defer func() {
+ sc := -1
+ if result.dhlr.Response.Response != nil {
+ sc = result.dhlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listByHostGroupNextResults
+ req, err := client.ListByHostGroupPreparer(ctx, resourceGroupName, hostGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "ListByHostGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByHostGroupSender(req)
+ if err != nil {
+ result.dhlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "ListByHostGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.dhlr, err = client.ListByHostGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "ListByHostGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByHostGroupPreparer prepares the ListByHostGroup request.
+func (client DedicatedHostsClient) ListByHostGroupPreparer(ctx context.Context, resourceGroupName string, hostGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "hostGroupName": autorest.Encode("path", hostGroupName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/hostGroups/{hostGroupName}/hosts", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByHostGroupSender sends the ListByHostGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client DedicatedHostsClient) ListByHostGroupSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByHostGroupResponder handles the response to the ListByHostGroup request. The method always
+// closes the http.Response Body.
+func (client DedicatedHostsClient) ListByHostGroupResponder(resp *http.Response) (result DedicatedHostListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByHostGroupNextResults retrieves the next set of results, if any.
+func (client DedicatedHostsClient) listByHostGroupNextResults(ctx context.Context, lastResults DedicatedHostListResult) (result DedicatedHostListResult, err error) {
+ req, err := lastResults.dedicatedHostListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "listByHostGroupNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByHostGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "listByHostGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByHostGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "listByHostGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByHostGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client DedicatedHostsClient) ListByHostGroupComplete(ctx context.Context, resourceGroupName string, hostGroupName string) (result DedicatedHostListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostsClient.ListByHostGroup")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByHostGroup(ctx, resourceGroupName, hostGroupName)
+ return
+}
+
+// Update update an dedicated host .
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// hostGroupName - the name of the dedicated host group.
+// hostName - the name of the dedicated host .
+// parameters - parameters supplied to the Update Dedicated Host operation.
+func (client DedicatedHostsClient) Update(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, parameters DedicatedHostUpdate) (result DedicatedHostsUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, hostGroupName, hostName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client DedicatedHostsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, parameters DedicatedHostUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "hostGroupName": autorest.Encode("path", hostGroupName),
+ "hostName": autorest.Encode("path", hostName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/hostGroups/{hostGroupName}/hosts/{hostName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client DedicatedHostsClient) UpdateSender(req *http.Request) (future DedicatedHostsUpdateFuture, err error) {
+ var resp *http.Response
+ 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 DedicatedHostsClient) UpdateResponder(resp *http.Response) (result DedicatedHost, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/2019-12-01/compute/diskencryptionsets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/diskencryptionsets.go
new file mode 100644
index 000000000..12874d026
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/diskencryptionsets.go
@@ -0,0 +1,595 @@
+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"
+)
+
+// DiskEncryptionSetsClient is the compute Client
+type DiskEncryptionSetsClient struct {
+ BaseClient
+}
+
+// NewDiskEncryptionSetsClient creates an instance of the DiskEncryptionSetsClient client.
+func NewDiskEncryptionSetsClient(subscriptionID string) DiskEncryptionSetsClient {
+ return NewDiskEncryptionSetsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewDiskEncryptionSetsClientWithBaseURI creates an instance of the DiskEncryptionSetsClient client using a custom
+// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure
+// stack).
+func NewDiskEncryptionSetsClientWithBaseURI(baseURI string, subscriptionID string) DiskEncryptionSetsClient {
+ return DiskEncryptionSetsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates a disk encryption set
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// diskEncryptionSetName - the name of the disk encryption set that is being created. The name can't be changed
+// after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The
+// maximum name length is 80 characters.
+// diskEncryptionSet - disk encryption set object supplied in the body of the Put disk encryption set
+// operation.
+func (client DiskEncryptionSetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, diskEncryptionSet DiskEncryptionSet) (result DiskEncryptionSetsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: diskEncryptionSet,
+ Constraints: []validation.Constraint{{Target: "diskEncryptionSet.EncryptionSetProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "diskEncryptionSet.EncryptionSetProperties.ActiveKey", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "diskEncryptionSet.EncryptionSetProperties.ActiveKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "diskEncryptionSet.EncryptionSetProperties.ActiveKey.KeyURL", Name: validation.Null, Rule: true, Chain: nil},
+ }},
+ }}}}}); err != nil {
+ return result, validation.NewError("compute.DiskEncryptionSetsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, diskEncryptionSetName, diskEncryptionSet)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client DiskEncryptionSetsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, diskEncryptionSet DiskEncryptionSet) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "diskEncryptionSetName": autorest.Encode("path", diskEncryptionSetName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}", pathParameters),
+ autorest.WithJSON(diskEncryptionSet),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client DiskEncryptionSetsClient) CreateOrUpdateSender(req *http.Request) (future DiskEncryptionSetsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ 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 DiskEncryptionSetsClient) CreateOrUpdateResponder(resp *http.Response) (result DiskEncryptionSet, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete deletes a disk encryption set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// diskEncryptionSetName - the name of the disk encryption set that is being created. The name can't be changed
+// after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The
+// maximum name length is 80 characters.
+func (client DiskEncryptionSetsClient) Delete(ctx context.Context, resourceGroupName string, diskEncryptionSetName string) (result DiskEncryptionSetsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, diskEncryptionSetName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client DiskEncryptionSetsClient) DeletePreparer(ctx context.Context, resourceGroupName string, diskEncryptionSetName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "diskEncryptionSetName": autorest.Encode("path", diskEncryptionSetName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client DiskEncryptionSetsClient) DeleteSender(req *http.Request) (future DiskEncryptionSetsDeleteFuture, err error) {
+ var resp *http.Response
+ 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 DiskEncryptionSetsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get gets information about a disk encryption set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// diskEncryptionSetName - the name of the disk encryption set that is being created. The name can't be changed
+// after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The
+// maximum name length is 80 characters.
+func (client DiskEncryptionSetsClient) Get(ctx context.Context, resourceGroupName string, diskEncryptionSetName string) (result DiskEncryptionSet, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, diskEncryptionSetName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client DiskEncryptionSetsClient) GetPreparer(ctx context.Context, resourceGroupName string, diskEncryptionSetName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "diskEncryptionSetName": autorest.Encode("path", diskEncryptionSetName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client DiskEncryptionSetsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client DiskEncryptionSetsClient) GetResponder(resp *http.Response) (result DiskEncryptionSet, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List lists all the disk encryption sets under a subscription.
+func (client DiskEncryptionSetsClient) List(ctx context.Context) (result DiskEncryptionSetListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.List")
+ defer func() {
+ sc := -1
+ if result.desl.Response.Response != nil {
+ sc = result.desl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.desl.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.desl, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client DiskEncryptionSetsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/diskEncryptionSets", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client DiskEncryptionSetsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client DiskEncryptionSetsClient) ListResponder(resp *http.Response) (result DiskEncryptionSetList, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client DiskEncryptionSetsClient) listNextResults(ctx context.Context, lastResults DiskEncryptionSetList) (result DiskEncryptionSetList, err error) {
+ req, err := lastResults.diskEncryptionSetListPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client DiskEncryptionSetsClient) ListComplete(ctx context.Context) (result DiskEncryptionSetListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx)
+ return
+}
+
+// ListByResourceGroup lists all the disk encryption sets under a resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client DiskEncryptionSetsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result DiskEncryptionSetListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.desl.Response.Response != nil {
+ sc = result.desl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listByResourceGroupNextResults
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.desl.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.desl, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "ListByResourceGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client DiskEncryptionSetsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client DiskEncryptionSetsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
+// closes the http.Response Body.
+func (client DiskEncryptionSetsClient) ListByResourceGroupResponder(resp *http.Response) (result DiskEncryptionSetList, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByResourceGroupNextResults retrieves the next set of results, if any.
+func (client DiskEncryptionSetsClient) listByResourceGroupNextResults(ctx context.Context, lastResults DiskEncryptionSetList) (result DiskEncryptionSetList, err error) {
+ req, err := lastResults.diskEncryptionSetListPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client DiskEncryptionSetsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result DiskEncryptionSetListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByResourceGroup(ctx, resourceGroupName)
+ return
+}
+
+// Update updates (patches) a disk encryption set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// diskEncryptionSetName - the name of the disk encryption set that is being created. The name can't be changed
+// after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The
+// maximum name length is 80 characters.
+// diskEncryptionSet - disk encryption set object supplied in the body of the Patch disk encryption set
+// operation.
+func (client DiskEncryptionSetsClient) Update(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, diskEncryptionSet DiskEncryptionSetUpdate) (result DiskEncryptionSetsUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, diskEncryptionSetName, diskEncryptionSet)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client DiskEncryptionSetsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, diskEncryptionSet DiskEncryptionSetUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "diskEncryptionSetName": autorest.Encode("path", diskEncryptionSetName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}", pathParameters),
+ autorest.WithJSON(diskEncryptionSet),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client DiskEncryptionSetsClient) UpdateSender(req *http.Request) (future DiskEncryptionSetsUpdateFuture, err error) {
+ var resp *http.Response
+ 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 DiskEncryptionSetsClient) UpdateResponder(resp *http.Response) (result DiskEncryptionSet, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/2019-12-01/compute/disks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/disks.go
new file mode 100644
index 000000000..420deb654
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/disks.go
@@ -0,0 +1,762 @@
+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.CreationData.GalleryImageReference", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "disk.DiskProperties.CreationData.GalleryImageReference.ID", Name: validation.Null, Rule: true, Chain: nil}}},
+ }},
+ {Target: "disk.DiskProperties.EncryptionSettingsCollection", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "disk.DiskProperties.EncryptionSettingsCollection.Enabled", Name: validation.Null, Rule: true, Chain: nil}}},
+ }}}}}); err != nil {
+ return result, validation.NewError("compute.DisksClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, diskName, disk)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client DisksClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, diskName string, disk Disk) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "diskName": autorest.Encode("path", diskName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ disk.ManagedBy = nil
+ disk.ManagedByExtended = nil
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}", pathParameters),
+ autorest.WithJSON(disk),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client DisksClient) CreateOrUpdateSender(req *http.Request) (future DisksCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ 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 DisksClient) CreateOrUpdateResponder(resp *http.Response) (result Disk, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client DisksClient) DeletePreparer(ctx context.Context, resourceGroupName string, diskName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "diskName": autorest.Encode("path", diskName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client DisksClient) DeleteSender(req *http.Request) (future DisksDeleteFuture, err error) {
+ var resp *http.Response
+ 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 DisksClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get gets information about a disk.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// diskName - the name of the managed disk that is being created. The name can't be changed after the disk is
+// created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80
+// characters.
+func (client DisksClient) Get(ctx context.Context, resourceGroupName string, diskName string) (result Disk, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, diskName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// 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 = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client DisksClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client DisksClient) GetResponder(resp *http.Response) (result Disk, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// GrantAccessPreparer prepares the GrantAccess request.
+func (client DisksClient) GrantAccessPreparer(ctx context.Context, resourceGroupName string, diskName string, grantAccessData GrantAccessData) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "diskName": autorest.Encode("path", diskName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/beginGetAccess", pathParameters),
+ autorest.WithJSON(grantAccessData),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GrantAccessSender sends the GrantAccess request. The method will close the
+// http.Response Body if it receives an error.
+func (client DisksClient) GrantAccessSender(req *http.Request) (future DisksGrantAccessFuture, err error) {
+ var resp *http.Response
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ 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,
+ client.ByInspecting(),
+ 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
+}
+
+// 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 = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/disks", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client DisksClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client DisksClient) ListResponder(resp *http.Response) (result DiskList, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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
+}
+
+// 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 = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client DisksClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
+// closes the http.Response Body.
+func (client DisksClient) ListByResourceGroupResponder(resp *http.Response) (result DiskList, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// RevokeAccessPreparer prepares the RevokeAccess request.
+func (client DisksClient) RevokeAccessPreparer(ctx context.Context, resourceGroupName string, diskName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "diskName": autorest.Encode("path", diskName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/endGetAccess", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// RevokeAccessSender sends the RevokeAccess request. The method will close the
+// http.Response Body if it receives an error.
+func (client DisksClient) RevokeAccessSender(req *http.Request) (future DisksRevokeAccessFuture, err error) {
+ var resp *http.Response
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// RevokeAccessResponder handles the response to the RevokeAccess request. The method always
+// closes the http.Response Body.
+func (client DisksClient) RevokeAccessResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Update updates (patches) a disk.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// diskName - the name of the managed disk that is being created. The name can't be changed after the disk is
+// created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80
+// characters.
+// disk - disk object supplied in the body of the Patch disk operation.
+func (client DisksClient) Update(ctx context.Context, resourceGroupName string, diskName string, disk DiskUpdate) (result DisksUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.Update")
+ defer func() {
+ sc := -1
+ if result.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", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client DisksClient) UpdatePreparer(ctx context.Context, resourceGroupName string, diskName string, disk DiskUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "diskName": autorest.Encode("path", diskName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}", pathParameters),
+ autorest.WithJSON(disk),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client DisksClient) UpdateSender(req *http.Request) (future DisksUpdateFuture, err error) {
+ var resp *http.Response
+ 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 DisksClient) UpdateResponder(resp *http.Response) (result Disk, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/2019-12-01/compute/galleries.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleries.go
new file mode 100644
index 000000000..e4f6dad92
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleries.go
@@ -0,0 +1,574 @@
+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"
+)
+
+// GalleriesClient is the compute Client
+type GalleriesClient struct {
+ BaseClient
+}
+
+// NewGalleriesClient creates an instance of the GalleriesClient client.
+func NewGalleriesClient(subscriptionID string) GalleriesClient {
+ return NewGalleriesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewGalleriesClientWithBaseURI creates an instance of the GalleriesClient client using a custom endpoint. Use this
+// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
+func NewGalleriesClientWithBaseURI(baseURI string, subscriptionID string) GalleriesClient {
+ return GalleriesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate create or update a Shared Image Gallery.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Image Gallery. The allowed characters are alphabets and numbers with
+// dots and periods allowed in the middle. The maximum length is 80 characters.
+// gallery - parameters supplied to the create or update Shared Image Gallery operation.
+func (client GalleriesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, gallery Gallery) (result GalleriesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, galleryName, gallery)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client GalleriesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, gallery Gallery) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/galleries/{galleryName}", pathParameters),
+ autorest.WithJSON(gallery),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleriesClient) CreateOrUpdateSender(req *http.Request) (future GalleriesCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ 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 GalleriesClient) CreateOrUpdateResponder(resp *http.Response) (result Gallery, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete delete a Shared Image Gallery.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Image Gallery to be deleted.
+func (client GalleriesClient) Delete(ctx context.Context, resourceGroupName string, galleryName string) (result GalleriesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, galleryName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client GalleriesClient) DeletePreparer(ctx context.Context, resourceGroupName string, galleryName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/galleries/{galleryName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleriesClient) DeleteSender(req *http.Request) (future GalleriesDeleteFuture, err error) {
+ var resp *http.Response
+ 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 GalleriesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get retrieves information about a Shared Image Gallery.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Image Gallery.
+func (client GalleriesClient) Get(ctx context.Context, resourceGroupName string, galleryName string) (result Gallery, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, galleryName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client GalleriesClient) GetPreparer(ctx context.Context, resourceGroupName string, galleryName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/galleries/{galleryName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleriesClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client GalleriesClient) GetResponder(resp *http.Response) (result Gallery, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List list galleries under a subscription.
+func (client GalleriesClient) List(ctx context.Context) (result GalleryListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.List")
+ defer func() {
+ sc := -1
+ if result.gl.Response.Response != nil {
+ sc = result.gl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.gl.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.gl, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client GalleriesClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/galleries", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleriesClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client GalleriesClient) ListResponder(resp *http.Response) (result GalleryList, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client GalleriesClient) listNextResults(ctx context.Context, lastResults GalleryList) (result GalleryList, err error) {
+ req, err := lastResults.galleryListPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.GalleriesClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.GalleriesClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client GalleriesClient) ListComplete(ctx context.Context) (result GalleryListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx)
+ return
+}
+
+// ListByResourceGroup list galleries under a resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client GalleriesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result GalleryListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.gl.Response.Response != nil {
+ sc = result.gl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listByResourceGroupNextResults
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.gl.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.gl, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "ListByResourceGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client GalleriesClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/galleries", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleriesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
+// closes the http.Response Body.
+func (client GalleriesClient) ListByResourceGroupResponder(resp *http.Response) (result GalleryList, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByResourceGroupNextResults retrieves the next set of results, if any.
+func (client GalleriesClient) listByResourceGroupNextResults(ctx context.Context, lastResults GalleryList) (result GalleryList, err error) {
+ req, err := lastResults.galleryListPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.GalleriesClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.GalleriesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client GalleriesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result GalleryListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByResourceGroup(ctx, resourceGroupName)
+ return
+}
+
+// Update update a Shared Image Gallery.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Image Gallery. The allowed characters are alphabets and numbers with
+// dots and periods allowed in the middle. The maximum length is 80 characters.
+// gallery - parameters supplied to the update Shared Image Gallery operation.
+func (client GalleriesClient) Update(ctx context.Context, resourceGroupName string, galleryName string, gallery GalleryUpdate) (result GalleriesUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, galleryName, gallery)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client GalleriesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, gallery GalleryUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/galleries/{galleryName}", pathParameters),
+ autorest.WithJSON(gallery),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleriesClient) UpdateSender(req *http.Request) (future GalleriesUpdateFuture, err error) {
+ var resp *http.Response
+ 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 GalleriesClient) UpdateResponder(resp *http.Response) (result Gallery, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/2019-12-01/compute/galleryapplications.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplications.go
new file mode 100644
index 000000000..1968d2533
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplications.go
@@ -0,0 +1,483 @@
+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"
+)
+
+// GalleryApplicationsClient is the compute Client
+type GalleryApplicationsClient struct {
+ BaseClient
+}
+
+// NewGalleryApplicationsClient creates an instance of the GalleryApplicationsClient client.
+func NewGalleryApplicationsClient(subscriptionID string) GalleryApplicationsClient {
+ return NewGalleryApplicationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewGalleryApplicationsClientWithBaseURI creates an instance of the GalleryApplicationsClient client using a custom
+// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure
+// stack).
+func NewGalleryApplicationsClientWithBaseURI(baseURI string, subscriptionID string) GalleryApplicationsClient {
+ return GalleryApplicationsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate create or update a gallery Application Definition.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Application Gallery in which the Application Definition is to be
+// created.
+// galleryApplicationName - the name of the gallery Application Definition to be created or updated. The
+// allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The
+// maximum length is 80 characters.
+// galleryApplication - parameters supplied to the create or update gallery Application operation.
+func (client GalleryApplicationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplication GalleryApplication) (result GalleryApplicationsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, galleryName, galleryApplicationName, galleryApplication)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client GalleryApplicationsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplication GalleryApplication) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryApplicationName": autorest.Encode("path", galleryApplicationName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/galleries/{galleryName}/applications/{galleryApplicationName}", pathParameters),
+ autorest.WithJSON(galleryApplication),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryApplicationsClient) CreateOrUpdateSender(req *http.Request) (future GalleryApplicationsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ 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 GalleryApplicationsClient) CreateOrUpdateResponder(resp *http.Response) (result GalleryApplication, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete delete a gallery Application.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Application Gallery in which the Application Definition is to be
+// deleted.
+// galleryApplicationName - the name of the gallery Application Definition to be deleted.
+func (client GalleryApplicationsClient) Delete(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string) (result GalleryApplicationsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, galleryName, galleryApplicationName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client GalleryApplicationsClient) DeletePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryApplicationName": autorest.Encode("path", galleryApplicationName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/galleries/{galleryName}/applications/{galleryApplicationName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryApplicationsClient) DeleteSender(req *http.Request) (future GalleryApplicationsDeleteFuture, err error) {
+ var resp *http.Response
+ 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 GalleryApplicationsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get retrieves information about a gallery Application Definition.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Application Gallery from which the Application Definitions are to be
+// retrieved.
+// galleryApplicationName - the name of the gallery Application Definition to be retrieved.
+func (client GalleryApplicationsClient) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string) (result GalleryApplication, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, galleryName, galleryApplicationName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client GalleryApplicationsClient) GetPreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryApplicationName": autorest.Encode("path", galleryApplicationName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/galleries/{galleryName}/applications/{galleryApplicationName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryApplicationsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client GalleryApplicationsClient) GetResponder(resp *http.Response) (result GalleryApplication, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListByGallery list gallery Application Definitions in a gallery.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Application Gallery from which Application Definitions are to be
+// listed.
+func (client GalleryApplicationsClient) ListByGallery(ctx context.Context, resourceGroupName string, galleryName string) (result GalleryApplicationListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationsClient.ListByGallery")
+ defer func() {
+ sc := -1
+ if result.gal.Response.Response != nil {
+ sc = result.gal.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listByGalleryNextResults
+ req, err := client.ListByGalleryPreparer(ctx, resourceGroupName, galleryName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "ListByGallery", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByGallerySender(req)
+ if err != nil {
+ result.gal.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "ListByGallery", resp, "Failure sending request")
+ return
+ }
+
+ result.gal, err = client.ListByGalleryResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "ListByGallery", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByGalleryPreparer prepares the ListByGallery request.
+func (client GalleryApplicationsClient) ListByGalleryPreparer(ctx context.Context, resourceGroupName string, galleryName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/galleries/{galleryName}/applications", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByGallerySender sends the ListByGallery request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryApplicationsClient) ListByGallerySender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByGalleryResponder handles the response to the ListByGallery request. The method always
+// closes the http.Response Body.
+func (client GalleryApplicationsClient) ListByGalleryResponder(resp *http.Response) (result GalleryApplicationList, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByGalleryNextResults retrieves the next set of results, if any.
+func (client GalleryApplicationsClient) listByGalleryNextResults(ctx context.Context, lastResults GalleryApplicationList) (result GalleryApplicationList, err error) {
+ req, err := lastResults.galleryApplicationListPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "listByGalleryNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByGallerySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "listByGalleryNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByGalleryResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "listByGalleryNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByGalleryComplete enumerates all values, automatically crossing page boundaries as required.
+func (client GalleryApplicationsClient) ListByGalleryComplete(ctx context.Context, resourceGroupName string, galleryName string) (result GalleryApplicationListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationsClient.ListByGallery")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByGallery(ctx, resourceGroupName, galleryName)
+ return
+}
+
+// Update update a gallery Application Definition.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Application Gallery in which the Application Definition is to be
+// updated.
+// galleryApplicationName - the name of the gallery Application Definition to be updated. The allowed
+// characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum
+// length is 80 characters.
+// galleryApplication - parameters supplied to the update gallery Application operation.
+func (client GalleryApplicationsClient) Update(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplication GalleryApplicationUpdate) (result GalleryApplicationsUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, galleryName, galleryApplicationName, galleryApplication)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client GalleryApplicationsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplication GalleryApplicationUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryApplicationName": autorest.Encode("path", galleryApplicationName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/galleries/{galleryName}/applications/{galleryApplicationName}", pathParameters),
+ autorest.WithJSON(galleryApplication),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryApplicationsClient) UpdateSender(req *http.Request) (future GalleryApplicationsUpdateFuture, err error) {
+ var resp *http.Response
+ 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 GalleryApplicationsClient) UpdateResponder(resp *http.Response) (result GalleryApplication, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/2019-12-01/compute/galleryapplicationversions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplicationversions.go
new file mode 100644
index 000000000..795f6c8e8
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplicationversions.go
@@ -0,0 +1,512 @@
+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"
+)
+
+// GalleryApplicationVersionsClient is the compute Client
+type GalleryApplicationVersionsClient struct {
+ BaseClient
+}
+
+// NewGalleryApplicationVersionsClient creates an instance of the GalleryApplicationVersionsClient client.
+func NewGalleryApplicationVersionsClient(subscriptionID string) GalleryApplicationVersionsClient {
+ return NewGalleryApplicationVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewGalleryApplicationVersionsClientWithBaseURI creates an instance of the GalleryApplicationVersionsClient client
+// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign
+// clouds, Azure stack).
+func NewGalleryApplicationVersionsClientWithBaseURI(baseURI string, subscriptionID string) GalleryApplicationVersionsClient {
+ return GalleryApplicationVersionsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate create or update a gallery Application Version.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Application Gallery in which the Application Definition resides.
+// galleryApplicationName - the name of the gallery Application Definition in which the Application Version is
+// to be created.
+// galleryApplicationVersionName - the name of the gallery Application Version to be created. Needs to follow
+// semantic version name pattern: The allowed characters are digit and period. Digits must be within the range
+// of a 32-bit integer. Format: ..
+// galleryApplicationVersion - parameters supplied to the create or update gallery Application Version
+// operation.
+func (client GalleryApplicationVersionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, galleryApplicationVersion GalleryApplicationVersion) (result GalleryApplicationVersionsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: galleryApplicationVersion,
+ Constraints: []validation.Constraint{{Target: "galleryApplicationVersion.GalleryApplicationVersionProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "galleryApplicationVersion.GalleryApplicationVersionProperties.PublishingProfile", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "galleryApplicationVersion.GalleryApplicationVersionProperties.PublishingProfile.Source", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "galleryApplicationVersion.GalleryApplicationVersionProperties.PublishingProfile.Source.FileName", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "galleryApplicationVersion.GalleryApplicationVersionProperties.PublishingProfile.Source.MediaLink", Name: validation.Null, Rule: true, Chain: nil},
+ }},
+ }},
+ }}}}}); err != nil {
+ return result, validation.NewError("compute.GalleryApplicationVersionsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, galleryName, galleryApplicationName, galleryApplicationVersionName, galleryApplicationVersion)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client GalleryApplicationVersionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, galleryApplicationVersion GalleryApplicationVersion) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryApplicationName": autorest.Encode("path", galleryApplicationName),
+ "galleryApplicationVersionName": autorest.Encode("path", galleryApplicationVersionName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}", pathParameters),
+ autorest.WithJSON(galleryApplicationVersion),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryApplicationVersionsClient) CreateOrUpdateSender(req *http.Request) (future GalleryApplicationVersionsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ 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 GalleryApplicationVersionsClient) CreateOrUpdateResponder(resp *http.Response) (result GalleryApplicationVersion, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete delete a gallery Application Version.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Application Gallery in which the Application Definition resides.
+// galleryApplicationName - the name of the gallery Application Definition in which the Application Version
+// resides.
+// galleryApplicationVersionName - the name of the gallery Application Version to be deleted.
+func (client GalleryApplicationVersionsClient) Delete(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string) (result GalleryApplicationVersionsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, galleryName, galleryApplicationName, galleryApplicationVersionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client GalleryApplicationVersionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryApplicationName": autorest.Encode("path", galleryApplicationName),
+ "galleryApplicationVersionName": autorest.Encode("path", galleryApplicationVersionName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryApplicationVersionsClient) DeleteSender(req *http.Request) (future GalleryApplicationVersionsDeleteFuture, err error) {
+ var resp *http.Response
+ 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 GalleryApplicationVersionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get retrieves information about a gallery Application Version.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Application Gallery in which the Application Definition resides.
+// galleryApplicationName - the name of the gallery Application Definition in which the Application Version
+// resides.
+// galleryApplicationVersionName - the name of the gallery Application Version to be retrieved.
+// expand - the expand expression to apply on the operation.
+func (client GalleryApplicationVersionsClient) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, expand ReplicationStatusTypes) (result GalleryApplicationVersion, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, galleryName, galleryApplicationName, galleryApplicationVersionName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client GalleryApplicationVersionsClient) GetPreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, expand ReplicationStatusTypes) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryApplicationName": autorest.Encode("path", galleryApplicationName),
+ "galleryApplicationVersionName": autorest.Encode("path", galleryApplicationVersionName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(string(expand)) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryApplicationVersionsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client GalleryApplicationVersionsClient) GetResponder(resp *http.Response) (result GalleryApplicationVersion, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListByGalleryApplication list gallery Application Versions in a gallery Application Definition.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Application Gallery in which the Application Definition resides.
+// galleryApplicationName - the name of the Shared Application Gallery Application Definition from which the
+// Application Versions are to be listed.
+func (client GalleryApplicationVersionsClient) ListByGalleryApplication(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string) (result GalleryApplicationVersionListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionsClient.ListByGalleryApplication")
+ defer func() {
+ sc := -1
+ if result.gavl.Response.Response != nil {
+ sc = result.gavl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listByGalleryApplicationNextResults
+ req, err := client.ListByGalleryApplicationPreparer(ctx, resourceGroupName, galleryName, galleryApplicationName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "ListByGalleryApplication", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByGalleryApplicationSender(req)
+ if err != nil {
+ result.gavl.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "ListByGalleryApplication", resp, "Failure sending request")
+ return
+ }
+
+ result.gavl, err = client.ListByGalleryApplicationResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "ListByGalleryApplication", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByGalleryApplicationPreparer prepares the ListByGalleryApplication request.
+func (client GalleryApplicationVersionsClient) ListByGalleryApplicationPreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryApplicationName": autorest.Encode("path", galleryApplicationName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByGalleryApplicationSender sends the ListByGalleryApplication request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryApplicationVersionsClient) ListByGalleryApplicationSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByGalleryApplicationResponder handles the response to the ListByGalleryApplication request. The method always
+// closes the http.Response Body.
+func (client GalleryApplicationVersionsClient) ListByGalleryApplicationResponder(resp *http.Response) (result GalleryApplicationVersionList, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByGalleryApplicationNextResults retrieves the next set of results, if any.
+func (client GalleryApplicationVersionsClient) listByGalleryApplicationNextResults(ctx context.Context, lastResults GalleryApplicationVersionList) (result GalleryApplicationVersionList, err error) {
+ req, err := lastResults.galleryApplicationVersionListPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "listByGalleryApplicationNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByGalleryApplicationSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "listByGalleryApplicationNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByGalleryApplicationResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "listByGalleryApplicationNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByGalleryApplicationComplete enumerates all values, automatically crossing page boundaries as required.
+func (client GalleryApplicationVersionsClient) ListByGalleryApplicationComplete(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string) (result GalleryApplicationVersionListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionsClient.ListByGalleryApplication")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByGalleryApplication(ctx, resourceGroupName, galleryName, galleryApplicationName)
+ return
+}
+
+// Update update a gallery Application Version.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Application Gallery in which the Application Definition resides.
+// galleryApplicationName - the name of the gallery Application Definition in which the Application Version is
+// to be updated.
+// galleryApplicationVersionName - the name of the gallery Application Version to be updated. Needs to follow
+// semantic version name pattern: The allowed characters are digit and period. Digits must be within the range
+// of a 32-bit integer. Format: ..
+// galleryApplicationVersion - parameters supplied to the update gallery Application Version operation.
+func (client GalleryApplicationVersionsClient) Update(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, galleryApplicationVersion GalleryApplicationVersionUpdate) (result GalleryApplicationVersionsUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, galleryName, galleryApplicationName, galleryApplicationVersionName, galleryApplicationVersion)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client GalleryApplicationVersionsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, galleryApplicationVersion GalleryApplicationVersionUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryApplicationName": autorest.Encode("path", galleryApplicationName),
+ "galleryApplicationVersionName": autorest.Encode("path", galleryApplicationVersionName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}", pathParameters),
+ autorest.WithJSON(galleryApplicationVersion),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryApplicationVersionsClient) UpdateSender(req *http.Request) (future GalleryApplicationVersionsUpdateFuture, err error) {
+ var resp *http.Response
+ 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 GalleryApplicationVersionsClient) UpdateResponder(resp *http.Response) (result GalleryApplicationVersion, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/2019-12-01/compute/galleryimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimages.go
new file mode 100644
index 000000000..c88030f69
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimages.go
@@ -0,0 +1,490 @@
+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"
+)
+
+// GalleryImagesClient is the compute Client
+type GalleryImagesClient struct {
+ BaseClient
+}
+
+// NewGalleryImagesClient creates an instance of the GalleryImagesClient client.
+func NewGalleryImagesClient(subscriptionID string) GalleryImagesClient {
+ return NewGalleryImagesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewGalleryImagesClientWithBaseURI creates an instance of the GalleryImagesClient client using a custom endpoint.
+// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
+func NewGalleryImagesClientWithBaseURI(baseURI string, subscriptionID string) GalleryImagesClient {
+ return GalleryImagesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate create or update a gallery Image Definition.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Image Gallery in which the Image Definition is to be created.
+// galleryImageName - the name of the gallery Image Definition to be created or updated. The allowed characters
+// are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80
+// characters.
+// galleryImage - parameters supplied to the create or update gallery image operation.
+func (client GalleryImagesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImage GalleryImage) (result GalleryImagesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImagesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: galleryImage,
+ Constraints: []validation.Constraint{{Target: "galleryImage.GalleryImageProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "galleryImage.GalleryImageProperties.Identifier", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "galleryImage.GalleryImageProperties.Identifier.Publisher", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "galleryImage.GalleryImageProperties.Identifier.Offer", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "galleryImage.GalleryImageProperties.Identifier.Sku", Name: validation.Null, Rule: true, Chain: nil},
+ }},
+ }}}}}); err != nil {
+ return result, validation.NewError("compute.GalleryImagesClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, galleryName, galleryImageName, galleryImage)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client GalleryImagesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImage GalleryImage) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryImageName": autorest.Encode("path", galleryImageName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/galleries/{galleryName}/images/{galleryImageName}", pathParameters),
+ autorest.WithJSON(galleryImage),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryImagesClient) CreateOrUpdateSender(req *http.Request) (future GalleryImagesCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ 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 GalleryImagesClient) CreateOrUpdateResponder(resp *http.Response) (result GalleryImage, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete delete a gallery image.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Image Gallery in which the Image Definition is to be deleted.
+// galleryImageName - the name of the gallery Image Definition to be deleted.
+func (client GalleryImagesClient) Delete(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (result GalleryImagesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImagesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, galleryName, galleryImageName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client GalleryImagesClient) DeletePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryImageName": autorest.Encode("path", galleryImageName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/galleries/{galleryName}/images/{galleryImageName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryImagesClient) DeleteSender(req *http.Request) (future GalleryImagesDeleteFuture, err error) {
+ var resp *http.Response
+ 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 GalleryImagesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get retrieves information about a gallery Image Definition.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Image Gallery from which the Image Definitions are to be retrieved.
+// galleryImageName - the name of the gallery Image Definition to be retrieved.
+func (client GalleryImagesClient) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (result GalleryImage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImagesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, galleryName, galleryImageName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client GalleryImagesClient) GetPreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryImageName": autorest.Encode("path", galleryImageName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/galleries/{galleryName}/images/{galleryImageName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryImagesClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client GalleryImagesClient) GetResponder(resp *http.Response) (result GalleryImage, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListByGallery list gallery Image Definitions in a gallery.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Image Gallery from which Image Definitions are to be listed.
+func (client GalleryImagesClient) ListByGallery(ctx context.Context, resourceGroupName string, galleryName string) (result GalleryImageListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImagesClient.ListByGallery")
+ defer func() {
+ sc := -1
+ if result.gil.Response.Response != nil {
+ sc = result.gil.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listByGalleryNextResults
+ req, err := client.ListByGalleryPreparer(ctx, resourceGroupName, galleryName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "ListByGallery", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByGallerySender(req)
+ if err != nil {
+ result.gil.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "ListByGallery", resp, "Failure sending request")
+ return
+ }
+
+ result.gil, err = client.ListByGalleryResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "ListByGallery", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByGalleryPreparer prepares the ListByGallery request.
+func (client GalleryImagesClient) ListByGalleryPreparer(ctx context.Context, resourceGroupName string, galleryName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/galleries/{galleryName}/images", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByGallerySender sends the ListByGallery request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryImagesClient) ListByGallerySender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByGalleryResponder handles the response to the ListByGallery request. The method always
+// closes the http.Response Body.
+func (client GalleryImagesClient) ListByGalleryResponder(resp *http.Response) (result GalleryImageList, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByGalleryNextResults retrieves the next set of results, if any.
+func (client GalleryImagesClient) listByGalleryNextResults(ctx context.Context, lastResults GalleryImageList) (result GalleryImageList, err error) {
+ req, err := lastResults.galleryImageListPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "listByGalleryNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByGallerySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "listByGalleryNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByGalleryResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "listByGalleryNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByGalleryComplete enumerates all values, automatically crossing page boundaries as required.
+func (client GalleryImagesClient) ListByGalleryComplete(ctx context.Context, resourceGroupName string, galleryName string) (result GalleryImageListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImagesClient.ListByGallery")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByGallery(ctx, resourceGroupName, galleryName)
+ return
+}
+
+// Update update a gallery Image Definition.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Image Gallery in which the Image Definition is to be updated.
+// galleryImageName - the name of the gallery Image Definition to be updated. The allowed characters are
+// alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80
+// characters.
+// galleryImage - parameters supplied to the update gallery image operation.
+func (client GalleryImagesClient) Update(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImage GalleryImageUpdate) (result GalleryImagesUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImagesClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, galleryName, galleryImageName, galleryImage)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client GalleryImagesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImage GalleryImageUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryImageName": autorest.Encode("path", galleryImageName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/galleries/{galleryName}/images/{galleryImageName}", pathParameters),
+ autorest.WithJSON(galleryImage),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryImagesClient) UpdateSender(req *http.Request) (future GalleryImagesUpdateFuture, err error) {
+ var resp *http.Response
+ 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 GalleryImagesClient) UpdateResponder(resp *http.Response) (result GalleryImage, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/2019-12-01/compute/galleryimageversions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimageversions.go
new file mode 100644
index 000000000..a81aa50e8
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimageversions.go
@@ -0,0 +1,501 @@
+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"
+)
+
+// GalleryImageVersionsClient is the compute Client
+type GalleryImageVersionsClient struct {
+ BaseClient
+}
+
+// NewGalleryImageVersionsClient creates an instance of the GalleryImageVersionsClient client.
+func NewGalleryImageVersionsClient(subscriptionID string) GalleryImageVersionsClient {
+ return NewGalleryImageVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewGalleryImageVersionsClientWithBaseURI creates an instance of the GalleryImageVersionsClient client using a custom
+// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure
+// stack).
+func NewGalleryImageVersionsClientWithBaseURI(baseURI string, subscriptionID string) GalleryImageVersionsClient {
+ return GalleryImageVersionsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate create or update a gallery Image Version.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Image Gallery in which the Image Definition resides.
+// galleryImageName - the name of the gallery Image Definition in which the Image Version is to be created.
+// galleryImageVersionName - the name of the gallery Image Version to be created. Needs to follow semantic
+// version name pattern: The allowed characters are digit and period. Digits must be within the range of a
+// 32-bit integer. Format: ..
+// galleryImageVersion - parameters supplied to the create or update gallery Image Version operation.
+func (client GalleryImageVersionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, galleryImageVersion GalleryImageVersion) (result GalleryImageVersionsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: galleryImageVersion,
+ Constraints: []validation.Constraint{{Target: "galleryImageVersion.GalleryImageVersionProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "galleryImageVersion.GalleryImageVersionProperties.StorageProfile", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
+ return result, validation.NewError("compute.GalleryImageVersionsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client GalleryImageVersionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, galleryImageVersion GalleryImageVersion) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryImageName": autorest.Encode("path", galleryImageName),
+ "galleryImageVersionName": autorest.Encode("path", galleryImageVersionName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}", pathParameters),
+ autorest.WithJSON(galleryImageVersion),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryImageVersionsClient) CreateOrUpdateSender(req *http.Request) (future GalleryImageVersionsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ 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 GalleryImageVersionsClient) CreateOrUpdateResponder(resp *http.Response) (result GalleryImageVersion, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete delete a gallery Image Version.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Image Gallery in which the Image Definition resides.
+// galleryImageName - the name of the gallery Image Definition in which the Image Version resides.
+// galleryImageVersionName - the name of the gallery Image Version to be deleted.
+func (client GalleryImageVersionsClient) Delete(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string) (result GalleryImageVersionsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, galleryName, galleryImageName, galleryImageVersionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client GalleryImageVersionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryImageName": autorest.Encode("path", galleryImageName),
+ "galleryImageVersionName": autorest.Encode("path", galleryImageVersionName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryImageVersionsClient) DeleteSender(req *http.Request) (future GalleryImageVersionsDeleteFuture, err error) {
+ var resp *http.Response
+ 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 GalleryImageVersionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get retrieves information about a gallery Image Version.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Image Gallery in which the Image Definition resides.
+// galleryImageName - the name of the gallery Image Definition in which the Image Version resides.
+// galleryImageVersionName - the name of the gallery Image Version to be retrieved.
+// expand - the expand expression to apply on the operation.
+func (client GalleryImageVersionsClient) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, expand ReplicationStatusTypes) (result GalleryImageVersion, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client GalleryImageVersionsClient) GetPreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, expand ReplicationStatusTypes) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryImageName": autorest.Encode("path", galleryImageName),
+ "galleryImageVersionName": autorest.Encode("path", galleryImageVersionName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(string(expand)) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryImageVersionsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client GalleryImageVersionsClient) GetResponder(resp *http.Response) (result GalleryImageVersion, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListByGalleryImage list gallery Image Versions in a gallery Image Definition.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Image Gallery in which the Image Definition resides.
+// galleryImageName - the name of the Shared Image Gallery Image Definition from which the Image Versions are
+// to be listed.
+func (client GalleryImageVersionsClient) ListByGalleryImage(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (result GalleryImageVersionListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionsClient.ListByGalleryImage")
+ defer func() {
+ sc := -1
+ if result.givl.Response.Response != nil {
+ sc = result.givl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listByGalleryImageNextResults
+ req, err := client.ListByGalleryImagePreparer(ctx, resourceGroupName, galleryName, galleryImageName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "ListByGalleryImage", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByGalleryImageSender(req)
+ if err != nil {
+ result.givl.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "ListByGalleryImage", resp, "Failure sending request")
+ return
+ }
+
+ result.givl, err = client.ListByGalleryImageResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "ListByGalleryImage", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByGalleryImagePreparer prepares the ListByGalleryImage request.
+func (client GalleryImageVersionsClient) ListByGalleryImagePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryImageName": autorest.Encode("path", galleryImageName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/galleries/{galleryName}/images/{galleryImageName}/versions", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByGalleryImageSender sends the ListByGalleryImage request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryImageVersionsClient) ListByGalleryImageSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByGalleryImageResponder handles the response to the ListByGalleryImage request. The method always
+// closes the http.Response Body.
+func (client GalleryImageVersionsClient) ListByGalleryImageResponder(resp *http.Response) (result GalleryImageVersionList, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByGalleryImageNextResults retrieves the next set of results, if any.
+func (client GalleryImageVersionsClient) listByGalleryImageNextResults(ctx context.Context, lastResults GalleryImageVersionList) (result GalleryImageVersionList, err error) {
+ req, err := lastResults.galleryImageVersionListPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "listByGalleryImageNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByGalleryImageSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "listByGalleryImageNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByGalleryImageResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "listByGalleryImageNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByGalleryImageComplete enumerates all values, automatically crossing page boundaries as required.
+func (client GalleryImageVersionsClient) ListByGalleryImageComplete(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (result GalleryImageVersionListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionsClient.ListByGalleryImage")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByGalleryImage(ctx, resourceGroupName, galleryName, galleryImageName)
+ return
+}
+
+// Update update a gallery Image Version.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Image Gallery in which the Image Definition resides.
+// galleryImageName - the name of the gallery Image Definition in which the Image Version is to be updated.
+// galleryImageVersionName - the name of the gallery Image Version to be updated. Needs to follow semantic
+// version name pattern: The allowed characters are digit and period. Digits must be within the range of a
+// 32-bit integer. Format: ..
+// galleryImageVersion - parameters supplied to the update gallery Image Version operation.
+func (client GalleryImageVersionsClient) Update(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, galleryImageVersion GalleryImageVersionUpdate) (result GalleryImageVersionsUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client GalleryImageVersionsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, galleryImageVersion GalleryImageVersionUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryImageName": autorest.Encode("path", galleryImageName),
+ "galleryImageVersionName": autorest.Encode("path", galleryImageVersionName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}", pathParameters),
+ autorest.WithJSON(galleryImageVersion),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryImageVersionsClient) UpdateSender(req *http.Request) (future GalleryImageVersionsUpdateFuture, err error) {
+ var resp *http.Response
+ 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 GalleryImageVersionsClient) UpdateResponder(resp *http.Response) (result GalleryImageVersion, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/2019-12-01/compute/images.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/images.go
new file mode 100644
index 000000000..aadeb4529
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/images.go
@@ -0,0 +1,577 @@
+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"
+)
+
+// 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)
+ }()
+ }
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, imageName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client ImagesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, imageName string, parameters Image) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "imageName": autorest.Encode("path", imageName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.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
+ }
+ 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 ImagesClient) CreateOrUpdateResponder(resp *http.Response) (result Image, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client ImagesClient) DeletePreparer(ctx context.Context, resourceGroupName string, imageName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "imageName": autorest.Encode("path", imageName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.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
+ }
+ 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 ImagesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get gets an image.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// imageName - the name of the image.
+// expand - the expand expression to apply on the operation.
+func (client ImagesClient) Get(ctx context.Context, resourceGroupName string, imageName string, expand string) (result Image, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ImagesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, imageName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// 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 = "2019-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.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,
+ client.ByInspecting(),
+ 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
+}
+
+// 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 = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/images", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client ImagesClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client ImagesClient) ListResponder(resp *http.Response) (result ImageListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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
+}
+
+// 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 = "2019-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.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,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByResourceGroupNextResults retrieves the next set of results, if any.
+func (client ImagesClient) listByResourceGroupNextResults(ctx context.Context, lastResults ImageListResult) (result ImageListResult, err error) {
+ req, err := lastResults.imageListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.ImagesClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.ImagesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ImagesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ImageListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ImagesClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByResourceGroup(ctx, resourceGroupName)
+ return
+}
+
+// Update update an image.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// imageName - the name of the image.
+// parameters - parameters supplied to the Update Image operation.
+func (client ImagesClient) Update(ctx context.Context, resourceGroupName string, imageName string, parameters ImageUpdate) (result ImagesUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ImagesClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, imageName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client ImagesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, imageName string, parameters ImageUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "imageName": autorest.Encode("path", imageName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/images/{imageName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client ImagesClient) UpdateSender(req *http.Request) (future ImagesUpdateFuture, err error) {
+ var resp *http.Response
+ 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 ImagesClient) UpdateResponder(resp *http.Response) (result Image, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/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
new file mode 100644
index 000000000..e6e20676f
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/loganalytics.go
@@ -0,0 +1,211 @@
+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"
+)
+
+// LogAnalyticsClient is the compute Client
+type LogAnalyticsClient struct {
+ BaseClient
+}
+
+// NewLogAnalyticsClient creates an instance of the LogAnalyticsClient client.
+func NewLogAnalyticsClient(subscriptionID string) LogAnalyticsClient {
+ return NewLogAnalyticsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewLogAnalyticsClientWithBaseURI creates an instance of the LogAnalyticsClient client using a custom endpoint. Use
+// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
+func NewLogAnalyticsClientWithBaseURI(baseURI string, subscriptionID string) LogAnalyticsClient {
+ return LogAnalyticsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// ExportRequestRateByInterval export logs that show Api requests made by this subscription in the given time window to
+// show throttling activities.
+// Parameters:
+// parameters - parameters supplied to the LogAnalytics getRequestRateByInterval Api.
+// location - the location upon which virtual-machine-sizes is queried.
+func (client LogAnalyticsClient) ExportRequestRateByInterval(ctx context.Context, parameters RequestRateByIntervalInput, location string) (result LogAnalyticsExportRequestRateByIntervalFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LogAnalyticsClient.ExportRequestRateByInterval")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: location,
+ Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("compute.LogAnalyticsClient", "ExportRequestRateByInterval", err.Error())
+ }
+
+ req, err := client.ExportRequestRateByIntervalPreparer(ctx, parameters, location)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.LogAnalyticsClient", "ExportRequestRateByInterval", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.ExportRequestRateByIntervalSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.LogAnalyticsClient", "ExportRequestRateByInterval", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// ExportRequestRateByIntervalPreparer prepares the ExportRequestRateByInterval request.
+func (client LogAnalyticsClient) ExportRequestRateByIntervalPreparer(ctx context.Context, parameters RequestRateByIntervalInput, location string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getRequestRateByInterval", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ExportRequestRateByIntervalSender sends the ExportRequestRateByInterval request. The method will close the
+// http.Response Body if it receives an error.
+func (client LogAnalyticsClient) ExportRequestRateByIntervalSender(req *http.Request) (future LogAnalyticsExportRequestRateByIntervalFuture, err error) {
+ var resp *http.Response
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// ExportRequestRateByIntervalResponder handles the response to the ExportRequestRateByInterval request. The method always
+// closes the http.Response Body.
+func (client LogAnalyticsClient) ExportRequestRateByIntervalResponder(resp *http.Response) (result LogAnalyticsOperationResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ExportThrottledRequests export logs that show total throttled Api requests for this subscription in the given time
+// window.
+// Parameters:
+// parameters - parameters supplied to the LogAnalytics getThrottledRequests Api.
+// location - the location upon which virtual-machine-sizes is queried.
+func (client LogAnalyticsClient) ExportThrottledRequests(ctx context.Context, parameters ThrottledRequestsInput, location string) (result LogAnalyticsExportThrottledRequestsFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LogAnalyticsClient.ExportThrottledRequests")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: location,
+ Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("compute.LogAnalyticsClient", "ExportThrottledRequests", err.Error())
+ }
+
+ req, err := client.ExportThrottledRequestsPreparer(ctx, parameters, location)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.LogAnalyticsClient", "ExportThrottledRequests", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.ExportThrottledRequestsSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.LogAnalyticsClient", "ExportThrottledRequests", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// ExportThrottledRequestsPreparer prepares the ExportThrottledRequests request.
+func (client LogAnalyticsClient) ExportThrottledRequestsPreparer(ctx context.Context, parameters ThrottledRequestsInput, location string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getThrottledRequests", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ExportThrottledRequestsSender sends the ExportThrottledRequests request. The method will close the
+// http.Response Body if it receives an error.
+func (client LogAnalyticsClient) ExportThrottledRequestsSender(req *http.Request) (future LogAnalyticsExportThrottledRequestsFuture, err error) {
+ var resp *http.Response
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// ExportThrottledRequestsResponder handles the response to the ExportThrottledRequests request. The method always
+// closes the http.Response Body.
+func (client LogAnalyticsClient) ExportThrottledRequestsResponder(resp *http.Response) (result LogAnalyticsOperationResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/2019-12-01/compute/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/models.go
new file mode 100644
index 000000000..6b5eb1bc6
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/models.go
@@ -0,0 +1,14345 @@
+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/2019-12-01/compute"
+
+// AccessLevel enumerates the values for access level.
+type AccessLevel string
+
+const (
+ // None ...
+ None AccessLevel = "None"
+ // Read ...
+ Read AccessLevel = "Read"
+ // Write ...
+ Write AccessLevel = "Write"
+)
+
+// PossibleAccessLevelValues returns an array of possible values for the AccessLevel const type.
+func PossibleAccessLevelValues() []AccessLevel {
+ return []AccessLevel{None, Read, Write}
+}
+
+// AggregatedReplicationState enumerates the values for aggregated replication state.
+type AggregatedReplicationState string
+
+const (
+ // Completed ...
+ Completed AggregatedReplicationState = "Completed"
+ // Failed ...
+ Failed AggregatedReplicationState = "Failed"
+ // InProgress ...
+ InProgress AggregatedReplicationState = "InProgress"
+ // Unknown ...
+ Unknown AggregatedReplicationState = "Unknown"
+)
+
+// PossibleAggregatedReplicationStateValues returns an array of possible values for the AggregatedReplicationState const type.
+func PossibleAggregatedReplicationStateValues() []AggregatedReplicationState {
+ return []AggregatedReplicationState{Completed, Failed, InProgress, Unknown}
+}
+
+// AvailabilitySetSkuTypes enumerates the values for availability set sku types.
+type AvailabilitySetSkuTypes string
+
+const (
+ // Aligned ...
+ Aligned AvailabilitySetSkuTypes = "Aligned"
+ // Classic ...
+ Classic AvailabilitySetSkuTypes = "Classic"
+)
+
+// PossibleAvailabilitySetSkuTypesValues returns an array of possible values for the AvailabilitySetSkuTypes const type.
+func PossibleAvailabilitySetSkuTypesValues() []AvailabilitySetSkuTypes {
+ return []AvailabilitySetSkuTypes{Aligned, Classic}
+}
+
+// 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}
+}
+
+// ContainerServiceOrchestratorTypes enumerates the values for container service orchestrator types.
+type ContainerServiceOrchestratorTypes string
+
+const (
+ // Custom ...
+ Custom ContainerServiceOrchestratorTypes = "Custom"
+ // DCOS ...
+ DCOS ContainerServiceOrchestratorTypes = "DCOS"
+ // Kubernetes ...
+ Kubernetes ContainerServiceOrchestratorTypes = "Kubernetes"
+ // Swarm ...
+ Swarm ContainerServiceOrchestratorTypes = "Swarm"
+)
+
+// PossibleContainerServiceOrchestratorTypesValues returns an array of possible values for the ContainerServiceOrchestratorTypes const type.
+func PossibleContainerServiceOrchestratorTypesValues() []ContainerServiceOrchestratorTypes {
+ return []ContainerServiceOrchestratorTypes{Custom, DCOS, Kubernetes, Swarm}
+}
+
+// ContainerServiceVMSizeTypes enumerates the values for container service vm size types.
+type ContainerServiceVMSizeTypes string
+
+const (
+ // StandardA0 ...
+ StandardA0 ContainerServiceVMSizeTypes = "Standard_A0"
+ // StandardA1 ...
+ StandardA1 ContainerServiceVMSizeTypes = "Standard_A1"
+ // StandardA10 ...
+ StandardA10 ContainerServiceVMSizeTypes = "Standard_A10"
+ // StandardA11 ...
+ StandardA11 ContainerServiceVMSizeTypes = "Standard_A11"
+ // StandardA2 ...
+ StandardA2 ContainerServiceVMSizeTypes = "Standard_A2"
+ // StandardA3 ...
+ StandardA3 ContainerServiceVMSizeTypes = "Standard_A3"
+ // StandardA4 ...
+ StandardA4 ContainerServiceVMSizeTypes = "Standard_A4"
+ // StandardA5 ...
+ StandardA5 ContainerServiceVMSizeTypes = "Standard_A5"
+ // StandardA6 ...
+ StandardA6 ContainerServiceVMSizeTypes = "Standard_A6"
+ // StandardA7 ...
+ StandardA7 ContainerServiceVMSizeTypes = "Standard_A7"
+ // StandardA8 ...
+ StandardA8 ContainerServiceVMSizeTypes = "Standard_A8"
+ // StandardA9 ...
+ StandardA9 ContainerServiceVMSizeTypes = "Standard_A9"
+ // StandardD1 ...
+ StandardD1 ContainerServiceVMSizeTypes = "Standard_D1"
+ // StandardD11 ...
+ StandardD11 ContainerServiceVMSizeTypes = "Standard_D11"
+ // StandardD11V2 ...
+ StandardD11V2 ContainerServiceVMSizeTypes = "Standard_D11_v2"
+ // StandardD12 ...
+ StandardD12 ContainerServiceVMSizeTypes = "Standard_D12"
+ // StandardD12V2 ...
+ StandardD12V2 ContainerServiceVMSizeTypes = "Standard_D12_v2"
+ // StandardD13 ...
+ StandardD13 ContainerServiceVMSizeTypes = "Standard_D13"
+ // StandardD13V2 ...
+ StandardD13V2 ContainerServiceVMSizeTypes = "Standard_D13_v2"
+ // StandardD14 ...
+ StandardD14 ContainerServiceVMSizeTypes = "Standard_D14"
+ // StandardD14V2 ...
+ StandardD14V2 ContainerServiceVMSizeTypes = "Standard_D14_v2"
+ // StandardD1V2 ...
+ StandardD1V2 ContainerServiceVMSizeTypes = "Standard_D1_v2"
+ // StandardD2 ...
+ StandardD2 ContainerServiceVMSizeTypes = "Standard_D2"
+ // StandardD2V2 ...
+ StandardD2V2 ContainerServiceVMSizeTypes = "Standard_D2_v2"
+ // StandardD3 ...
+ StandardD3 ContainerServiceVMSizeTypes = "Standard_D3"
+ // StandardD3V2 ...
+ StandardD3V2 ContainerServiceVMSizeTypes = "Standard_D3_v2"
+ // StandardD4 ...
+ StandardD4 ContainerServiceVMSizeTypes = "Standard_D4"
+ // StandardD4V2 ...
+ StandardD4V2 ContainerServiceVMSizeTypes = "Standard_D4_v2"
+ // StandardD5V2 ...
+ StandardD5V2 ContainerServiceVMSizeTypes = "Standard_D5_v2"
+ // StandardDS1 ...
+ StandardDS1 ContainerServiceVMSizeTypes = "Standard_DS1"
+ // StandardDS11 ...
+ StandardDS11 ContainerServiceVMSizeTypes = "Standard_DS11"
+ // StandardDS12 ...
+ StandardDS12 ContainerServiceVMSizeTypes = "Standard_DS12"
+ // StandardDS13 ...
+ StandardDS13 ContainerServiceVMSizeTypes = "Standard_DS13"
+ // StandardDS14 ...
+ StandardDS14 ContainerServiceVMSizeTypes = "Standard_DS14"
+ // StandardDS2 ...
+ StandardDS2 ContainerServiceVMSizeTypes = "Standard_DS2"
+ // StandardDS3 ...
+ StandardDS3 ContainerServiceVMSizeTypes = "Standard_DS3"
+ // StandardDS4 ...
+ StandardDS4 ContainerServiceVMSizeTypes = "Standard_DS4"
+ // StandardG1 ...
+ StandardG1 ContainerServiceVMSizeTypes = "Standard_G1"
+ // StandardG2 ...
+ StandardG2 ContainerServiceVMSizeTypes = "Standard_G2"
+ // StandardG3 ...
+ StandardG3 ContainerServiceVMSizeTypes = "Standard_G3"
+ // StandardG4 ...
+ StandardG4 ContainerServiceVMSizeTypes = "Standard_G4"
+ // StandardG5 ...
+ StandardG5 ContainerServiceVMSizeTypes = "Standard_G5"
+ // StandardGS1 ...
+ StandardGS1 ContainerServiceVMSizeTypes = "Standard_GS1"
+ // StandardGS2 ...
+ StandardGS2 ContainerServiceVMSizeTypes = "Standard_GS2"
+ // StandardGS3 ...
+ StandardGS3 ContainerServiceVMSizeTypes = "Standard_GS3"
+ // StandardGS4 ...
+ StandardGS4 ContainerServiceVMSizeTypes = "Standard_GS4"
+ // StandardGS5 ...
+ StandardGS5 ContainerServiceVMSizeTypes = "Standard_GS5"
+)
+
+// PossibleContainerServiceVMSizeTypesValues returns an array of possible values for the ContainerServiceVMSizeTypes const type.
+func PossibleContainerServiceVMSizeTypesValues() []ContainerServiceVMSizeTypes {
+ return []ContainerServiceVMSizeTypes{StandardA0, StandardA1, StandardA10, StandardA11, StandardA2, StandardA3, StandardA4, StandardA5, StandardA6, StandardA7, StandardA8, StandardA9, StandardD1, StandardD11, StandardD11V2, StandardD12, StandardD12V2, StandardD13, StandardD13V2, StandardD14, StandardD14V2, StandardD1V2, StandardD2, StandardD2V2, StandardD3, StandardD3V2, StandardD4, StandardD4V2, StandardD5V2, StandardDS1, StandardDS11, StandardDS12, StandardDS13, StandardDS14, StandardDS2, StandardDS3, StandardDS4, StandardG1, StandardG2, StandardG3, StandardG4, StandardG5, StandardGS1, StandardGS2, StandardGS3, StandardGS4, StandardGS5}
+}
+
+// DedicatedHostLicenseTypes enumerates the values for dedicated host license types.
+type DedicatedHostLicenseTypes string
+
+const (
+ // DedicatedHostLicenseTypesNone ...
+ DedicatedHostLicenseTypesNone DedicatedHostLicenseTypes = "None"
+ // DedicatedHostLicenseTypesWindowsServerHybrid ...
+ DedicatedHostLicenseTypesWindowsServerHybrid DedicatedHostLicenseTypes = "Windows_Server_Hybrid"
+ // DedicatedHostLicenseTypesWindowsServerPerpetual ...
+ DedicatedHostLicenseTypesWindowsServerPerpetual DedicatedHostLicenseTypes = "Windows_Server_Perpetual"
+)
+
+// PossibleDedicatedHostLicenseTypesValues returns an array of possible values for the DedicatedHostLicenseTypes const type.
+func PossibleDedicatedHostLicenseTypesValues() []DedicatedHostLicenseTypes {
+ return []DedicatedHostLicenseTypes{DedicatedHostLicenseTypesNone, DedicatedHostLicenseTypesWindowsServerHybrid, DedicatedHostLicenseTypesWindowsServerPerpetual}
+}
+
+// DiffDiskOptions enumerates the values for diff disk options.
+type DiffDiskOptions string
+
+const (
+ // Local ...
+ Local DiffDiskOptions = "Local"
+)
+
+// PossibleDiffDiskOptionsValues returns an array of possible values for the DiffDiskOptions const type.
+func PossibleDiffDiskOptionsValues() []DiffDiskOptions {
+ return []DiffDiskOptions{Local}
+}
+
+// DiffDiskPlacement enumerates the values for diff disk placement.
+type DiffDiskPlacement string
+
+const (
+ // CacheDisk ...
+ CacheDisk DiffDiskPlacement = "CacheDisk"
+ // ResourceDisk ...
+ ResourceDisk DiffDiskPlacement = "ResourceDisk"
+)
+
+// PossibleDiffDiskPlacementValues returns an array of possible values for the DiffDiskPlacement const type.
+func PossibleDiffDiskPlacementValues() []DiffDiskPlacement {
+ return []DiffDiskPlacement{CacheDisk, ResourceDisk}
+}
+
+// DiskCreateOption enumerates the values for disk create option.
+type DiskCreateOption string
+
+const (
+ // Attach Disk will be attached to a VM.
+ Attach DiskCreateOption = "Attach"
+ // Copy Create a new disk or snapshot by copying from a disk or snapshot specified by the given
+ // sourceResourceId.
+ Copy DiskCreateOption = "Copy"
+ // Empty Create an empty data disk of a size given by diskSizeGB.
+ Empty DiskCreateOption = "Empty"
+ // FromImage Create a new disk from a platform image specified by the given imageReference or
+ // galleryImageReference.
+ FromImage DiskCreateOption = "FromImage"
+ // Import Create a disk by importing from a blob specified by a sourceUri in a storage account specified by
+ // storageAccountId.
+ Import DiskCreateOption = "Import"
+ // Restore Create a new disk by copying from a backup recovery point.
+ Restore DiskCreateOption = "Restore"
+ // Upload Create a new disk by obtaining a write token and using it to directly upload the contents of the
+ // disk.
+ Upload DiskCreateOption = "Upload"
+)
+
+// PossibleDiskCreateOptionValues returns an array of possible values for the DiskCreateOption const type.
+func PossibleDiskCreateOptionValues() []DiskCreateOption {
+ return []DiskCreateOption{Attach, Copy, Empty, FromImage, Import, Restore, Upload}
+}
+
+// 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}
+}
+
+// DiskEncryptionSetIdentityType enumerates the values for disk encryption set identity type.
+type DiskEncryptionSetIdentityType string
+
+const (
+ // SystemAssigned ...
+ SystemAssigned DiskEncryptionSetIdentityType = "SystemAssigned"
+)
+
+// PossibleDiskEncryptionSetIdentityTypeValues returns an array of possible values for the DiskEncryptionSetIdentityType const type.
+func PossibleDiskEncryptionSetIdentityTypeValues() []DiskEncryptionSetIdentityType {
+ return []DiskEncryptionSetIdentityType{SystemAssigned}
+}
+
+// DiskState enumerates the values for disk state.
+type DiskState string
+
+const (
+ // ActiveSAS The disk currently has an Active SAS Uri associated with it.
+ ActiveSAS DiskState = "ActiveSAS"
+ // ActiveUpload A disk is created for upload and a write token has been issued for uploading to it.
+ ActiveUpload DiskState = "ActiveUpload"
+ // Attached The disk is currently mounted to a running VM.
+ Attached DiskState = "Attached"
+ // ReadyToUpload A disk is ready to be created by upload by requesting a write token.
+ ReadyToUpload DiskState = "ReadyToUpload"
+ // Reserved The disk is mounted to a stopped-deallocated VM
+ Reserved DiskState = "Reserved"
+ // Unattached The disk is not being used and can be attached to a VM.
+ Unattached DiskState = "Unattached"
+)
+
+// PossibleDiskStateValues returns an array of possible values for the DiskState const type.
+func PossibleDiskStateValues() []DiskState {
+ return []DiskState{ActiveSAS, ActiveUpload, Attached, ReadyToUpload, Reserved, Unattached}
+}
+
+// DiskStorageAccountTypes enumerates the values for disk storage account types.
+type DiskStorageAccountTypes string
+
+const (
+ // PremiumLRS Premium SSD locally redundant storage. Best for production and performance sensitive
+ // workloads.
+ PremiumLRS DiskStorageAccountTypes = "Premium_LRS"
+ // StandardLRS Standard HDD locally redundant storage. Best for backup, non-critical, and infrequent
+ // access.
+ StandardLRS DiskStorageAccountTypes = "Standard_LRS"
+ // StandardSSDLRS Standard SSD locally redundant storage. Best for web servers, lightly used enterprise
+ // applications and dev/test.
+ StandardSSDLRS DiskStorageAccountTypes = "StandardSSD_LRS"
+ // UltraSSDLRS Ultra SSD locally redundant storage. Best for IO-intensive workloads such as SAP HANA, top
+ // tier databases (for example, SQL, Oracle), and other transaction-heavy workloads.
+ UltraSSDLRS DiskStorageAccountTypes = "UltraSSD_LRS"
+)
+
+// PossibleDiskStorageAccountTypesValues returns an array of possible values for the DiskStorageAccountTypes const type.
+func PossibleDiskStorageAccountTypesValues() []DiskStorageAccountTypes {
+ return []DiskStorageAccountTypes{PremiumLRS, StandardLRS, StandardSSDLRS, UltraSSDLRS}
+}
+
+// EncryptionType enumerates the values for encryption type.
+type EncryptionType string
+
+const (
+ // EncryptionAtRestWithCustomerKey Disk is encrypted with Customer managed key at rest.
+ EncryptionAtRestWithCustomerKey EncryptionType = "EncryptionAtRestWithCustomerKey"
+ // EncryptionAtRestWithPlatformKey Disk is encrypted with XStore managed key at rest. It is the default
+ // encryption type.
+ EncryptionAtRestWithPlatformKey EncryptionType = "EncryptionAtRestWithPlatformKey"
+)
+
+// PossibleEncryptionTypeValues returns an array of possible values for the EncryptionType const type.
+func PossibleEncryptionTypeValues() []EncryptionType {
+ return []EncryptionType{EncryptionAtRestWithCustomerKey, EncryptionAtRestWithPlatformKey}
+}
+
+// HostCaching enumerates the values for host caching.
+type HostCaching string
+
+const (
+ // HostCachingNone ...
+ HostCachingNone HostCaching = "None"
+ // HostCachingReadOnly ...
+ HostCachingReadOnly HostCaching = "ReadOnly"
+ // HostCachingReadWrite ...
+ HostCachingReadWrite HostCaching = "ReadWrite"
+)
+
+// PossibleHostCachingValues returns an array of possible values for the HostCaching const type.
+func PossibleHostCachingValues() []HostCaching {
+ return []HostCaching{HostCachingNone, HostCachingReadOnly, HostCachingReadWrite}
+}
+
+// HyperVGeneration enumerates the values for hyper v generation.
+type HyperVGeneration string
+
+const (
+ // V1 ...
+ V1 HyperVGeneration = "V1"
+ // V2 ...
+ V2 HyperVGeneration = "V2"
+)
+
+// PossibleHyperVGenerationValues returns an array of possible values for the HyperVGeneration const type.
+func PossibleHyperVGenerationValues() []HyperVGeneration {
+ return []HyperVGeneration{V1, V2}
+}
+
+// HyperVGenerationType enumerates the values for hyper v generation type.
+type HyperVGenerationType string
+
+const (
+ // HyperVGenerationTypeV1 ...
+ HyperVGenerationTypeV1 HyperVGenerationType = "V1"
+ // HyperVGenerationTypeV2 ...
+ HyperVGenerationTypeV2 HyperVGenerationType = "V2"
+)
+
+// PossibleHyperVGenerationTypeValues returns an array of possible values for the HyperVGenerationType const type.
+func PossibleHyperVGenerationTypeValues() []HyperVGenerationType {
+ return []HyperVGenerationType{HyperVGenerationTypeV1, HyperVGenerationTypeV2}
+}
+
+// HyperVGenerationTypes enumerates the values for hyper v generation types.
+type HyperVGenerationTypes string
+
+const (
+ // HyperVGenerationTypesV1 ...
+ HyperVGenerationTypesV1 HyperVGenerationTypes = "V1"
+ // HyperVGenerationTypesV2 ...
+ HyperVGenerationTypesV2 HyperVGenerationTypes = "V2"
+)
+
+// PossibleHyperVGenerationTypesValues returns an array of possible values for the HyperVGenerationTypes const type.
+func PossibleHyperVGenerationTypesValues() []HyperVGenerationTypes {
+ return []HyperVGenerationTypes{HyperVGenerationTypesV1, HyperVGenerationTypesV2}
+}
+
+// InstanceViewTypes enumerates the values for instance view types.
+type InstanceViewTypes string
+
+const (
+ // InstanceView ...
+ InstanceView InstanceViewTypes = "instanceView"
+)
+
+// PossibleInstanceViewTypesValues returns an array of possible values for the InstanceViewTypes const type.
+func PossibleInstanceViewTypesValues() []InstanceViewTypes {
+ return []InstanceViewTypes{InstanceView}
+}
+
+// IntervalInMins enumerates the values for interval in mins.
+type IntervalInMins string
+
+const (
+ // FiveMins ...
+ FiveMins IntervalInMins = "FiveMins"
+ // SixtyMins ...
+ SixtyMins IntervalInMins = "SixtyMins"
+ // ThirtyMins ...
+ ThirtyMins IntervalInMins = "ThirtyMins"
+ // ThreeMins ...
+ ThreeMins IntervalInMins = "ThreeMins"
+)
+
+// PossibleIntervalInMinsValues returns an array of possible values for the IntervalInMins const type.
+func PossibleIntervalInMinsValues() []IntervalInMins {
+ return []IntervalInMins{FiveMins, SixtyMins, ThirtyMins, ThreeMins}
+}
+
+// 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 image. Needs to be provisioned during deployment time.
+ Generalized OperatingSystemStateTypes = "Generalized"
+ // Specialized Specialized image. Contains already provisioned OS Disk.
+ 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}
+}
+
+// OrchestrationServiceNames enumerates the values for orchestration service names.
+type OrchestrationServiceNames string
+
+const (
+ // AutomaticRepairs ...
+ AutomaticRepairs OrchestrationServiceNames = "AutomaticRepairs"
+)
+
+// PossibleOrchestrationServiceNamesValues returns an array of possible values for the OrchestrationServiceNames const type.
+func PossibleOrchestrationServiceNamesValues() []OrchestrationServiceNames {
+ return []OrchestrationServiceNames{AutomaticRepairs}
+}
+
+// OrchestrationServiceState enumerates the values for orchestration service state.
+type OrchestrationServiceState string
+
+const (
+ // NotRunning ...
+ NotRunning OrchestrationServiceState = "NotRunning"
+ // Running ...
+ Running OrchestrationServiceState = "Running"
+ // Suspended ...
+ Suspended OrchestrationServiceState = "Suspended"
+)
+
+// PossibleOrchestrationServiceStateValues returns an array of possible values for the OrchestrationServiceState const type.
+func PossibleOrchestrationServiceStateValues() []OrchestrationServiceState {
+ return []OrchestrationServiceState{NotRunning, Running, Suspended}
+}
+
+// OrchestrationServiceStateAction enumerates the values for orchestration service state action.
+type OrchestrationServiceStateAction string
+
+const (
+ // Resume ...
+ Resume OrchestrationServiceStateAction = "Resume"
+ // Suspend ...
+ Suspend OrchestrationServiceStateAction = "Suspend"
+)
+
+// PossibleOrchestrationServiceStateActionValues returns an array of possible values for the OrchestrationServiceStateAction const type.
+func PossibleOrchestrationServiceStateActionValues() []OrchestrationServiceStateAction {
+ return []OrchestrationServiceStateAction{Resume, Suspend}
+}
+
+// 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}
+}
+
+// ProvisioningState enumerates the values for provisioning state.
+type ProvisioningState string
+
+const (
+ // ProvisioningStateCreating ...
+ ProvisioningStateCreating ProvisioningState = "Creating"
+ // ProvisioningStateDeleting ...
+ ProvisioningStateDeleting ProvisioningState = "Deleting"
+ // ProvisioningStateFailed ...
+ ProvisioningStateFailed ProvisioningState = "Failed"
+ // ProvisioningStateMigrating ...
+ ProvisioningStateMigrating ProvisioningState = "Migrating"
+ // ProvisioningStateSucceeded ...
+ ProvisioningStateSucceeded ProvisioningState = "Succeeded"
+ // ProvisioningStateUpdating ...
+ ProvisioningStateUpdating ProvisioningState = "Updating"
+)
+
+// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type.
+func PossibleProvisioningStateValues() []ProvisioningState {
+ return []ProvisioningState{ProvisioningStateCreating, ProvisioningStateDeleting, ProvisioningStateFailed, ProvisioningStateMigrating, ProvisioningStateSucceeded, ProvisioningStateUpdating}
+}
+
+// ProvisioningState1 enumerates the values for provisioning state 1.
+type ProvisioningState1 string
+
+const (
+ // ProvisioningState1Creating ...
+ ProvisioningState1Creating ProvisioningState1 = "Creating"
+ // ProvisioningState1Deleting ...
+ ProvisioningState1Deleting ProvisioningState1 = "Deleting"
+ // ProvisioningState1Failed ...
+ ProvisioningState1Failed ProvisioningState1 = "Failed"
+ // ProvisioningState1Migrating ...
+ ProvisioningState1Migrating ProvisioningState1 = "Migrating"
+ // ProvisioningState1Succeeded ...
+ ProvisioningState1Succeeded ProvisioningState1 = "Succeeded"
+ // ProvisioningState1Updating ...
+ ProvisioningState1Updating ProvisioningState1 = "Updating"
+)
+
+// PossibleProvisioningState1Values returns an array of possible values for the ProvisioningState1 const type.
+func PossibleProvisioningState1Values() []ProvisioningState1 {
+ return []ProvisioningState1{ProvisioningState1Creating, ProvisioningState1Deleting, ProvisioningState1Failed, ProvisioningState1Migrating, ProvisioningState1Succeeded, ProvisioningState1Updating}
+}
+
+// ProvisioningState2 enumerates the values for provisioning state 2.
+type ProvisioningState2 string
+
+const (
+ // ProvisioningState2Creating ...
+ ProvisioningState2Creating ProvisioningState2 = "Creating"
+ // ProvisioningState2Deleting ...
+ ProvisioningState2Deleting ProvisioningState2 = "Deleting"
+ // ProvisioningState2Failed ...
+ ProvisioningState2Failed ProvisioningState2 = "Failed"
+ // ProvisioningState2Migrating ...
+ ProvisioningState2Migrating ProvisioningState2 = "Migrating"
+ // ProvisioningState2Succeeded ...
+ ProvisioningState2Succeeded ProvisioningState2 = "Succeeded"
+ // ProvisioningState2Updating ...
+ ProvisioningState2Updating ProvisioningState2 = "Updating"
+)
+
+// PossibleProvisioningState2Values returns an array of possible values for the ProvisioningState2 const type.
+func PossibleProvisioningState2Values() []ProvisioningState2 {
+ return []ProvisioningState2{ProvisioningState2Creating, ProvisioningState2Deleting, ProvisioningState2Failed, ProvisioningState2Migrating, ProvisioningState2Succeeded, ProvisioningState2Updating}
+}
+
+// ProvisioningState3 enumerates the values for provisioning state 3.
+type ProvisioningState3 string
+
+const (
+ // ProvisioningState3Creating ...
+ ProvisioningState3Creating ProvisioningState3 = "Creating"
+ // ProvisioningState3Deleting ...
+ ProvisioningState3Deleting ProvisioningState3 = "Deleting"
+ // ProvisioningState3Failed ...
+ ProvisioningState3Failed ProvisioningState3 = "Failed"
+ // ProvisioningState3Migrating ...
+ ProvisioningState3Migrating ProvisioningState3 = "Migrating"
+ // ProvisioningState3Succeeded ...
+ ProvisioningState3Succeeded ProvisioningState3 = "Succeeded"
+ // ProvisioningState3Updating ...
+ ProvisioningState3Updating ProvisioningState3 = "Updating"
+)
+
+// PossibleProvisioningState3Values returns an array of possible values for the ProvisioningState3 const type.
+func PossibleProvisioningState3Values() []ProvisioningState3 {
+ return []ProvisioningState3{ProvisioningState3Creating, ProvisioningState3Deleting, ProvisioningState3Failed, ProvisioningState3Migrating, ProvisioningState3Succeeded, ProvisioningState3Updating}
+}
+
+// ProximityPlacementGroupType enumerates the values for proximity placement group type.
+type ProximityPlacementGroupType string
+
+const (
+ // Standard ...
+ Standard ProximityPlacementGroupType = "Standard"
+ // Ultra ...
+ Ultra ProximityPlacementGroupType = "Ultra"
+)
+
+// PossibleProximityPlacementGroupTypeValues returns an array of possible values for the ProximityPlacementGroupType const type.
+func PossibleProximityPlacementGroupTypeValues() []ProximityPlacementGroupType {
+ return []ProximityPlacementGroupType{Standard, Ultra}
+}
+
+// ReplicationState enumerates the values for replication state.
+type ReplicationState string
+
+const (
+ // ReplicationStateCompleted ...
+ ReplicationStateCompleted ReplicationState = "Completed"
+ // ReplicationStateFailed ...
+ ReplicationStateFailed ReplicationState = "Failed"
+ // ReplicationStateReplicating ...
+ ReplicationStateReplicating ReplicationState = "Replicating"
+ // ReplicationStateUnknown ...
+ ReplicationStateUnknown ReplicationState = "Unknown"
+)
+
+// PossibleReplicationStateValues returns an array of possible values for the ReplicationState const type.
+func PossibleReplicationStateValues() []ReplicationState {
+ return []ReplicationState{ReplicationStateCompleted, ReplicationStateFailed, ReplicationStateReplicating, ReplicationStateUnknown}
+}
+
+// ReplicationStatusTypes enumerates the values for replication status types.
+type ReplicationStatusTypes string
+
+const (
+ // ReplicationStatusTypesReplicationStatus ...
+ ReplicationStatusTypesReplicationStatus ReplicationStatusTypes = "ReplicationStatus"
+)
+
+// PossibleReplicationStatusTypesValues returns an array of possible values for the ReplicationStatusTypes const type.
+func PossibleReplicationStatusTypesValues() []ReplicationStatusTypes {
+ return []ReplicationStatusTypes{ReplicationStatusTypesReplicationStatus}
+}
+
+// ResourceIdentityType enumerates the values for resource identity type.
+type ResourceIdentityType string
+
+const (
+ // ResourceIdentityTypeNone ...
+ ResourceIdentityTypeNone ResourceIdentityType = "None"
+ // ResourceIdentityTypeSystemAssigned ...
+ ResourceIdentityTypeSystemAssigned ResourceIdentityType = "SystemAssigned"
+ // ResourceIdentityTypeSystemAssignedUserAssigned ...
+ ResourceIdentityTypeSystemAssignedUserAssigned ResourceIdentityType = "SystemAssigned, UserAssigned"
+ // ResourceIdentityTypeUserAssigned ...
+ ResourceIdentityTypeUserAssigned ResourceIdentityType = "UserAssigned"
+)
+
+// PossibleResourceIdentityTypeValues returns an array of possible values for the ResourceIdentityType const type.
+func PossibleResourceIdentityTypeValues() []ResourceIdentityType {
+ return []ResourceIdentityType{ResourceIdentityTypeNone, ResourceIdentityTypeSystemAssigned, ResourceIdentityTypeSystemAssignedUserAssigned, ResourceIdentityTypeUserAssigned}
+}
+
+// ResourceSkuCapacityScaleType enumerates the values for resource sku capacity scale type.
+type ResourceSkuCapacityScaleType string
+
+const (
+ // ResourceSkuCapacityScaleTypeAutomatic ...
+ ResourceSkuCapacityScaleTypeAutomatic ResourceSkuCapacityScaleType = "Automatic"
+ // ResourceSkuCapacityScaleTypeManual ...
+ ResourceSkuCapacityScaleTypeManual ResourceSkuCapacityScaleType = "Manual"
+ // ResourceSkuCapacityScaleTypeNone ...
+ ResourceSkuCapacityScaleTypeNone ResourceSkuCapacityScaleType = "None"
+)
+
+// PossibleResourceSkuCapacityScaleTypeValues returns an array of possible values for the ResourceSkuCapacityScaleType const type.
+func PossibleResourceSkuCapacityScaleTypeValues() []ResourceSkuCapacityScaleType {
+ return []ResourceSkuCapacityScaleType{ResourceSkuCapacityScaleTypeAutomatic, ResourceSkuCapacityScaleTypeManual, ResourceSkuCapacityScaleTypeNone}
+}
+
+// ResourceSkuRestrictionsReasonCode enumerates the values for resource sku restrictions reason code.
+type ResourceSkuRestrictionsReasonCode string
+
+const (
+ // 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"
+ // Zone ...
+ Zone ResourceSkuRestrictionsType = "Zone"
+)
+
+// PossibleResourceSkuRestrictionsTypeValues returns an array of possible values for the ResourceSkuRestrictionsType const type.
+func PossibleResourceSkuRestrictionsTypeValues() []ResourceSkuRestrictionsType {
+ return []ResourceSkuRestrictionsType{Location, Zone}
+}
+
+// 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 (
+ // RollingUpgradeStatusCodeCancelled ...
+ RollingUpgradeStatusCodeCancelled RollingUpgradeStatusCode = "Cancelled"
+ // RollingUpgradeStatusCodeCompleted ...
+ RollingUpgradeStatusCodeCompleted RollingUpgradeStatusCode = "Completed"
+ // RollingUpgradeStatusCodeFaulted ...
+ RollingUpgradeStatusCodeFaulted RollingUpgradeStatusCode = "Faulted"
+ // RollingUpgradeStatusCodeRollingForward ...
+ RollingUpgradeStatusCodeRollingForward RollingUpgradeStatusCode = "RollingForward"
+)
+
+// PossibleRollingUpgradeStatusCodeValues returns an array of possible values for the RollingUpgradeStatusCode const type.
+func PossibleRollingUpgradeStatusCodeValues() []RollingUpgradeStatusCode {
+ return []RollingUpgradeStatusCode{RollingUpgradeStatusCodeCancelled, RollingUpgradeStatusCodeCompleted, RollingUpgradeStatusCodeFaulted, RollingUpgradeStatusCodeRollingForward}
+}
+
+// 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}
+}
+
+// SnapshotStorageAccountTypes enumerates the values for snapshot storage account types.
+type SnapshotStorageAccountTypes string
+
+const (
+ // SnapshotStorageAccountTypesPremiumLRS Premium SSD locally redundant storage
+ SnapshotStorageAccountTypesPremiumLRS SnapshotStorageAccountTypes = "Premium_LRS"
+ // SnapshotStorageAccountTypesStandardLRS Standard HDD locally redundant storage
+ SnapshotStorageAccountTypesStandardLRS SnapshotStorageAccountTypes = "Standard_LRS"
+ // SnapshotStorageAccountTypesStandardZRS Standard zone redundant storage
+ SnapshotStorageAccountTypesStandardZRS SnapshotStorageAccountTypes = "Standard_ZRS"
+)
+
+// PossibleSnapshotStorageAccountTypesValues returns an array of possible values for the SnapshotStorageAccountTypes const type.
+func PossibleSnapshotStorageAccountTypesValues() []SnapshotStorageAccountTypes {
+ return []SnapshotStorageAccountTypes{SnapshotStorageAccountTypesPremiumLRS, SnapshotStorageAccountTypesStandardLRS, SnapshotStorageAccountTypesStandardZRS}
+}
+
+// StatusLevelTypes enumerates the values for status level types.
+type StatusLevelTypes string
+
+const (
+ // 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}
+}
+
+// StorageAccountType enumerates the values for storage account type.
+type StorageAccountType string
+
+const (
+ // StorageAccountTypePremiumLRS ...
+ StorageAccountTypePremiumLRS StorageAccountType = "Premium_LRS"
+ // StorageAccountTypeStandardLRS ...
+ StorageAccountTypeStandardLRS StorageAccountType = "Standard_LRS"
+ // StorageAccountTypeStandardZRS ...
+ StorageAccountTypeStandardZRS StorageAccountType = "Standard_ZRS"
+)
+
+// PossibleStorageAccountTypeValues returns an array of possible values for the StorageAccountType const type.
+func PossibleStorageAccountTypeValues() []StorageAccountType {
+ return []StorageAccountType{StorageAccountTypePremiumLRS, StorageAccountTypeStandardLRS, StorageAccountTypeStandardZRS}
+}
+
+// StorageAccountTypes enumerates the values for storage account types.
+type StorageAccountTypes string
+
+const (
+ // StorageAccountTypesPremiumLRS ...
+ StorageAccountTypesPremiumLRS StorageAccountTypes = "Premium_LRS"
+ // StorageAccountTypesStandardLRS ...
+ StorageAccountTypesStandardLRS StorageAccountTypes = "Standard_LRS"
+ // StorageAccountTypesStandardSSDLRS ...
+ StorageAccountTypesStandardSSDLRS StorageAccountTypes = "StandardSSD_LRS"
+ // StorageAccountTypesUltraSSDLRS ...
+ StorageAccountTypesUltraSSDLRS StorageAccountTypes = "UltraSSD_LRS"
+)
+
+// PossibleStorageAccountTypesValues returns an array of possible values for the StorageAccountTypes const type.
+func PossibleStorageAccountTypesValues() []StorageAccountTypes {
+ return []StorageAccountTypes{StorageAccountTypesPremiumLRS, StorageAccountTypesStandardLRS, StorageAccountTypesStandardSSDLRS, StorageAccountTypesUltraSSDLRS}
+}
+
+// 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}
+}
+
+// UpgradeOperationInvoker enumerates the values for upgrade operation invoker.
+type UpgradeOperationInvoker string
+
+const (
+ // UpgradeOperationInvokerPlatform ...
+ UpgradeOperationInvokerPlatform UpgradeOperationInvoker = "Platform"
+ // UpgradeOperationInvokerUnknown ...
+ UpgradeOperationInvokerUnknown UpgradeOperationInvoker = "Unknown"
+ // UpgradeOperationInvokerUser ...
+ UpgradeOperationInvokerUser UpgradeOperationInvoker = "User"
+)
+
+// PossibleUpgradeOperationInvokerValues returns an array of possible values for the UpgradeOperationInvoker const type.
+func PossibleUpgradeOperationInvokerValues() []UpgradeOperationInvoker {
+ return []UpgradeOperationInvoker{UpgradeOperationInvokerPlatform, UpgradeOperationInvokerUnknown, UpgradeOperationInvokerUser}
+}
+
+// UpgradeState enumerates the values for upgrade state.
+type UpgradeState string
+
+const (
+ // UpgradeStateCancelled ...
+ UpgradeStateCancelled UpgradeState = "Cancelled"
+ // UpgradeStateCompleted ...
+ UpgradeStateCompleted UpgradeState = "Completed"
+ // UpgradeStateFaulted ...
+ UpgradeStateFaulted UpgradeState = "Faulted"
+ // UpgradeStateRollingForward ...
+ UpgradeStateRollingForward UpgradeState = "RollingForward"
+)
+
+// PossibleUpgradeStateValues returns an array of possible values for the UpgradeState const type.
+func PossibleUpgradeStateValues() []UpgradeState {
+ return []UpgradeState{UpgradeStateCancelled, UpgradeStateCompleted, UpgradeStateFaulted, UpgradeStateRollingForward}
+}
+
+// VirtualMachineEvictionPolicyTypes enumerates the values for virtual machine eviction policy types.
+type VirtualMachineEvictionPolicyTypes string
+
+const (
+ // Deallocate ...
+ Deallocate VirtualMachineEvictionPolicyTypes = "Deallocate"
+ // Delete ...
+ Delete VirtualMachineEvictionPolicyTypes = "Delete"
+)
+
+// PossibleVirtualMachineEvictionPolicyTypesValues returns an array of possible values for the VirtualMachineEvictionPolicyTypes const type.
+func PossibleVirtualMachineEvictionPolicyTypesValues() []VirtualMachineEvictionPolicyTypes {
+ return []VirtualMachineEvictionPolicyTypes{Deallocate, Delete}
+}
+
+// VirtualMachinePriorityTypes enumerates the values for virtual machine priority types.
+type VirtualMachinePriorityTypes string
+
+const (
+ // Low ...
+ Low VirtualMachinePriorityTypes = "Low"
+ // Regular ...
+ Regular VirtualMachinePriorityTypes = "Regular"
+ // Spot ...
+ Spot VirtualMachinePriorityTypes = "Spot"
+)
+
+// PossibleVirtualMachinePriorityTypesValues returns an array of possible values for the VirtualMachinePriorityTypes const type.
+func PossibleVirtualMachinePriorityTypesValues() []VirtualMachinePriorityTypes {
+ return []VirtualMachinePriorityTypes{Low, Regular, Spot}
+}
+
+// VirtualMachineScaleSetScaleInRules enumerates the values for virtual machine scale set scale in rules.
+type VirtualMachineScaleSetScaleInRules string
+
+const (
+ // Default ...
+ Default VirtualMachineScaleSetScaleInRules = "Default"
+ // NewestVM ...
+ NewestVM VirtualMachineScaleSetScaleInRules = "NewestVM"
+ // OldestVM ...
+ OldestVM VirtualMachineScaleSetScaleInRules = "OldestVM"
+)
+
+// PossibleVirtualMachineScaleSetScaleInRulesValues returns an array of possible values for the VirtualMachineScaleSetScaleInRules const type.
+func PossibleVirtualMachineScaleSetScaleInRulesValues() []VirtualMachineScaleSetScaleInRules {
+ return []VirtualMachineScaleSetScaleInRules{Default, NewestVM, OldestVM}
+}
+
+// VirtualMachineScaleSetSkuScaleType enumerates the values for virtual machine scale set sku scale type.
+type VirtualMachineScaleSetSkuScaleType string
+
+const (
+ // VirtualMachineScaleSetSkuScaleTypeAutomatic ...
+ VirtualMachineScaleSetSkuScaleTypeAutomatic VirtualMachineScaleSetSkuScaleType = "Automatic"
+ // VirtualMachineScaleSetSkuScaleTypeNone ...
+ VirtualMachineScaleSetSkuScaleTypeNone VirtualMachineScaleSetSkuScaleType = "None"
+)
+
+// PossibleVirtualMachineScaleSetSkuScaleTypeValues returns an array of possible values for the VirtualMachineScaleSetSkuScaleType const type.
+func PossibleVirtualMachineScaleSetSkuScaleTypeValues() []VirtualMachineScaleSetSkuScaleType {
+ return []VirtualMachineScaleSetSkuScaleType{VirtualMachineScaleSetSkuScaleTypeAutomatic, VirtualMachineScaleSetSkuScaleTypeNone}
+}
+
+// VirtualMachineSizeTypes enumerates the values for virtual machine size types.
+type VirtualMachineSizeTypes string
+
+const (
+ // VirtualMachineSizeTypesBasicA0 ...
+ VirtualMachineSizeTypesBasicA0 VirtualMachineSizeTypes = "Basic_A0"
+ // VirtualMachineSizeTypesBasicA1 ...
+ VirtualMachineSizeTypesBasicA1 VirtualMachineSizeTypes = "Basic_A1"
+ // VirtualMachineSizeTypesBasicA2 ...
+ VirtualMachineSizeTypesBasicA2 VirtualMachineSizeTypes = "Basic_A2"
+ // VirtualMachineSizeTypesBasicA3 ...
+ VirtualMachineSizeTypesBasicA3 VirtualMachineSizeTypes = "Basic_A3"
+ // VirtualMachineSizeTypesBasicA4 ...
+ VirtualMachineSizeTypesBasicA4 VirtualMachineSizeTypes = "Basic_A4"
+ // VirtualMachineSizeTypesStandardA0 ...
+ VirtualMachineSizeTypesStandardA0 VirtualMachineSizeTypes = "Standard_A0"
+ // VirtualMachineSizeTypesStandardA1 ...
+ VirtualMachineSizeTypesStandardA1 VirtualMachineSizeTypes = "Standard_A1"
+ // VirtualMachineSizeTypesStandardA10 ...
+ VirtualMachineSizeTypesStandardA10 VirtualMachineSizeTypes = "Standard_A10"
+ // VirtualMachineSizeTypesStandardA11 ...
+ VirtualMachineSizeTypesStandardA11 VirtualMachineSizeTypes = "Standard_A11"
+ // VirtualMachineSizeTypesStandardA1V2 ...
+ VirtualMachineSizeTypesStandardA1V2 VirtualMachineSizeTypes = "Standard_A1_v2"
+ // VirtualMachineSizeTypesStandardA2 ...
+ VirtualMachineSizeTypesStandardA2 VirtualMachineSizeTypes = "Standard_A2"
+ // VirtualMachineSizeTypesStandardA2mV2 ...
+ VirtualMachineSizeTypesStandardA2mV2 VirtualMachineSizeTypes = "Standard_A2m_v2"
+ // VirtualMachineSizeTypesStandardA2V2 ...
+ VirtualMachineSizeTypesStandardA2V2 VirtualMachineSizeTypes = "Standard_A2_v2"
+ // VirtualMachineSizeTypesStandardA3 ...
+ VirtualMachineSizeTypesStandardA3 VirtualMachineSizeTypes = "Standard_A3"
+ // VirtualMachineSizeTypesStandardA4 ...
+ VirtualMachineSizeTypesStandardA4 VirtualMachineSizeTypes = "Standard_A4"
+ // VirtualMachineSizeTypesStandardA4mV2 ...
+ VirtualMachineSizeTypesStandardA4mV2 VirtualMachineSizeTypes = "Standard_A4m_v2"
+ // VirtualMachineSizeTypesStandardA4V2 ...
+ VirtualMachineSizeTypesStandardA4V2 VirtualMachineSizeTypes = "Standard_A4_v2"
+ // VirtualMachineSizeTypesStandardA5 ...
+ VirtualMachineSizeTypesStandardA5 VirtualMachineSizeTypes = "Standard_A5"
+ // VirtualMachineSizeTypesStandardA6 ...
+ VirtualMachineSizeTypesStandardA6 VirtualMachineSizeTypes = "Standard_A6"
+ // VirtualMachineSizeTypesStandardA7 ...
+ VirtualMachineSizeTypesStandardA7 VirtualMachineSizeTypes = "Standard_A7"
+ // VirtualMachineSizeTypesStandardA8 ...
+ VirtualMachineSizeTypesStandardA8 VirtualMachineSizeTypes = "Standard_A8"
+ // VirtualMachineSizeTypesStandardA8mV2 ...
+ VirtualMachineSizeTypesStandardA8mV2 VirtualMachineSizeTypes = "Standard_A8m_v2"
+ // VirtualMachineSizeTypesStandardA8V2 ...
+ VirtualMachineSizeTypesStandardA8V2 VirtualMachineSizeTypes = "Standard_A8_v2"
+ // VirtualMachineSizeTypesStandardA9 ...
+ VirtualMachineSizeTypesStandardA9 VirtualMachineSizeTypes = "Standard_A9"
+ // VirtualMachineSizeTypesStandardB1ms ...
+ VirtualMachineSizeTypesStandardB1ms VirtualMachineSizeTypes = "Standard_B1ms"
+ // VirtualMachineSizeTypesStandardB1s ...
+ VirtualMachineSizeTypesStandardB1s VirtualMachineSizeTypes = "Standard_B1s"
+ // VirtualMachineSizeTypesStandardB2ms ...
+ VirtualMachineSizeTypesStandardB2ms VirtualMachineSizeTypes = "Standard_B2ms"
+ // VirtualMachineSizeTypesStandardB2s ...
+ VirtualMachineSizeTypesStandardB2s VirtualMachineSizeTypes = "Standard_B2s"
+ // VirtualMachineSizeTypesStandardB4ms ...
+ VirtualMachineSizeTypesStandardB4ms VirtualMachineSizeTypes = "Standard_B4ms"
+ // VirtualMachineSizeTypesStandardB8ms ...
+ VirtualMachineSizeTypesStandardB8ms VirtualMachineSizeTypes = "Standard_B8ms"
+ // VirtualMachineSizeTypesStandardD1 ...
+ VirtualMachineSizeTypesStandardD1 VirtualMachineSizeTypes = "Standard_D1"
+ // VirtualMachineSizeTypesStandardD11 ...
+ VirtualMachineSizeTypesStandardD11 VirtualMachineSizeTypes = "Standard_D11"
+ // VirtualMachineSizeTypesStandardD11V2 ...
+ VirtualMachineSizeTypesStandardD11V2 VirtualMachineSizeTypes = "Standard_D11_v2"
+ // VirtualMachineSizeTypesStandardD12 ...
+ VirtualMachineSizeTypesStandardD12 VirtualMachineSizeTypes = "Standard_D12"
+ // VirtualMachineSizeTypesStandardD12V2 ...
+ VirtualMachineSizeTypesStandardD12V2 VirtualMachineSizeTypes = "Standard_D12_v2"
+ // VirtualMachineSizeTypesStandardD13 ...
+ VirtualMachineSizeTypesStandardD13 VirtualMachineSizeTypes = "Standard_D13"
+ // VirtualMachineSizeTypesStandardD13V2 ...
+ VirtualMachineSizeTypesStandardD13V2 VirtualMachineSizeTypes = "Standard_D13_v2"
+ // VirtualMachineSizeTypesStandardD14 ...
+ VirtualMachineSizeTypesStandardD14 VirtualMachineSizeTypes = "Standard_D14"
+ // VirtualMachineSizeTypesStandardD14V2 ...
+ VirtualMachineSizeTypesStandardD14V2 VirtualMachineSizeTypes = "Standard_D14_v2"
+ // VirtualMachineSizeTypesStandardD15V2 ...
+ VirtualMachineSizeTypesStandardD15V2 VirtualMachineSizeTypes = "Standard_D15_v2"
+ // VirtualMachineSizeTypesStandardD16sV3 ...
+ VirtualMachineSizeTypesStandardD16sV3 VirtualMachineSizeTypes = "Standard_D16s_v3"
+ // VirtualMachineSizeTypesStandardD16V3 ...
+ VirtualMachineSizeTypesStandardD16V3 VirtualMachineSizeTypes = "Standard_D16_v3"
+ // VirtualMachineSizeTypesStandardD1V2 ...
+ VirtualMachineSizeTypesStandardD1V2 VirtualMachineSizeTypes = "Standard_D1_v2"
+ // VirtualMachineSizeTypesStandardD2 ...
+ VirtualMachineSizeTypesStandardD2 VirtualMachineSizeTypes = "Standard_D2"
+ // VirtualMachineSizeTypesStandardD2sV3 ...
+ VirtualMachineSizeTypesStandardD2sV3 VirtualMachineSizeTypes = "Standard_D2s_v3"
+ // VirtualMachineSizeTypesStandardD2V2 ...
+ VirtualMachineSizeTypesStandardD2V2 VirtualMachineSizeTypes = "Standard_D2_v2"
+ // VirtualMachineSizeTypesStandardD2V3 ...
+ VirtualMachineSizeTypesStandardD2V3 VirtualMachineSizeTypes = "Standard_D2_v3"
+ // VirtualMachineSizeTypesStandardD3 ...
+ VirtualMachineSizeTypesStandardD3 VirtualMachineSizeTypes = "Standard_D3"
+ // VirtualMachineSizeTypesStandardD32sV3 ...
+ VirtualMachineSizeTypesStandardD32sV3 VirtualMachineSizeTypes = "Standard_D32s_v3"
+ // VirtualMachineSizeTypesStandardD32V3 ...
+ VirtualMachineSizeTypesStandardD32V3 VirtualMachineSizeTypes = "Standard_D32_v3"
+ // VirtualMachineSizeTypesStandardD3V2 ...
+ VirtualMachineSizeTypesStandardD3V2 VirtualMachineSizeTypes = "Standard_D3_v2"
+ // VirtualMachineSizeTypesStandardD4 ...
+ VirtualMachineSizeTypesStandardD4 VirtualMachineSizeTypes = "Standard_D4"
+ // VirtualMachineSizeTypesStandardD4sV3 ...
+ VirtualMachineSizeTypesStandardD4sV3 VirtualMachineSizeTypes = "Standard_D4s_v3"
+ // VirtualMachineSizeTypesStandardD4V2 ...
+ VirtualMachineSizeTypesStandardD4V2 VirtualMachineSizeTypes = "Standard_D4_v2"
+ // VirtualMachineSizeTypesStandardD4V3 ...
+ VirtualMachineSizeTypesStandardD4V3 VirtualMachineSizeTypes = "Standard_D4_v3"
+ // VirtualMachineSizeTypesStandardD5V2 ...
+ VirtualMachineSizeTypesStandardD5V2 VirtualMachineSizeTypes = "Standard_D5_v2"
+ // VirtualMachineSizeTypesStandardD64sV3 ...
+ VirtualMachineSizeTypesStandardD64sV3 VirtualMachineSizeTypes = "Standard_D64s_v3"
+ // VirtualMachineSizeTypesStandardD64V3 ...
+ VirtualMachineSizeTypesStandardD64V3 VirtualMachineSizeTypes = "Standard_D64_v3"
+ // VirtualMachineSizeTypesStandardD8sV3 ...
+ VirtualMachineSizeTypesStandardD8sV3 VirtualMachineSizeTypes = "Standard_D8s_v3"
+ // VirtualMachineSizeTypesStandardD8V3 ...
+ VirtualMachineSizeTypesStandardD8V3 VirtualMachineSizeTypes = "Standard_D8_v3"
+ // VirtualMachineSizeTypesStandardDS1 ...
+ VirtualMachineSizeTypesStandardDS1 VirtualMachineSizeTypes = "Standard_DS1"
+ // VirtualMachineSizeTypesStandardDS11 ...
+ VirtualMachineSizeTypesStandardDS11 VirtualMachineSizeTypes = "Standard_DS11"
+ // VirtualMachineSizeTypesStandardDS11V2 ...
+ VirtualMachineSizeTypesStandardDS11V2 VirtualMachineSizeTypes = "Standard_DS11_v2"
+ // VirtualMachineSizeTypesStandardDS12 ...
+ VirtualMachineSizeTypesStandardDS12 VirtualMachineSizeTypes = "Standard_DS12"
+ // VirtualMachineSizeTypesStandardDS12V2 ...
+ VirtualMachineSizeTypesStandardDS12V2 VirtualMachineSizeTypes = "Standard_DS12_v2"
+ // VirtualMachineSizeTypesStandardDS13 ...
+ VirtualMachineSizeTypesStandardDS13 VirtualMachineSizeTypes = "Standard_DS13"
+ // VirtualMachineSizeTypesStandardDS132V2 ...
+ VirtualMachineSizeTypesStandardDS132V2 VirtualMachineSizeTypes = "Standard_DS13-2_v2"
+ // VirtualMachineSizeTypesStandardDS134V2 ...
+ VirtualMachineSizeTypesStandardDS134V2 VirtualMachineSizeTypes = "Standard_DS13-4_v2"
+ // VirtualMachineSizeTypesStandardDS13V2 ...
+ VirtualMachineSizeTypesStandardDS13V2 VirtualMachineSizeTypes = "Standard_DS13_v2"
+ // VirtualMachineSizeTypesStandardDS14 ...
+ VirtualMachineSizeTypesStandardDS14 VirtualMachineSizeTypes = "Standard_DS14"
+ // VirtualMachineSizeTypesStandardDS144V2 ...
+ VirtualMachineSizeTypesStandardDS144V2 VirtualMachineSizeTypes = "Standard_DS14-4_v2"
+ // VirtualMachineSizeTypesStandardDS148V2 ...
+ VirtualMachineSizeTypesStandardDS148V2 VirtualMachineSizeTypes = "Standard_DS14-8_v2"
+ // VirtualMachineSizeTypesStandardDS14V2 ...
+ VirtualMachineSizeTypesStandardDS14V2 VirtualMachineSizeTypes = "Standard_DS14_v2"
+ // VirtualMachineSizeTypesStandardDS15V2 ...
+ VirtualMachineSizeTypesStandardDS15V2 VirtualMachineSizeTypes = "Standard_DS15_v2"
+ // VirtualMachineSizeTypesStandardDS1V2 ...
+ VirtualMachineSizeTypesStandardDS1V2 VirtualMachineSizeTypes = "Standard_DS1_v2"
+ // VirtualMachineSizeTypesStandardDS2 ...
+ VirtualMachineSizeTypesStandardDS2 VirtualMachineSizeTypes = "Standard_DS2"
+ // VirtualMachineSizeTypesStandardDS2V2 ...
+ VirtualMachineSizeTypesStandardDS2V2 VirtualMachineSizeTypes = "Standard_DS2_v2"
+ // VirtualMachineSizeTypesStandardDS3 ...
+ VirtualMachineSizeTypesStandardDS3 VirtualMachineSizeTypes = "Standard_DS3"
+ // VirtualMachineSizeTypesStandardDS3V2 ...
+ VirtualMachineSizeTypesStandardDS3V2 VirtualMachineSizeTypes = "Standard_DS3_v2"
+ // VirtualMachineSizeTypesStandardDS4 ...
+ VirtualMachineSizeTypesStandardDS4 VirtualMachineSizeTypes = "Standard_DS4"
+ // VirtualMachineSizeTypesStandardDS4V2 ...
+ VirtualMachineSizeTypesStandardDS4V2 VirtualMachineSizeTypes = "Standard_DS4_v2"
+ // VirtualMachineSizeTypesStandardDS5V2 ...
+ VirtualMachineSizeTypesStandardDS5V2 VirtualMachineSizeTypes = "Standard_DS5_v2"
+ // VirtualMachineSizeTypesStandardE16sV3 ...
+ VirtualMachineSizeTypesStandardE16sV3 VirtualMachineSizeTypes = "Standard_E16s_v3"
+ // VirtualMachineSizeTypesStandardE16V3 ...
+ VirtualMachineSizeTypesStandardE16V3 VirtualMachineSizeTypes = "Standard_E16_v3"
+ // VirtualMachineSizeTypesStandardE2sV3 ...
+ VirtualMachineSizeTypesStandardE2sV3 VirtualMachineSizeTypes = "Standard_E2s_v3"
+ // VirtualMachineSizeTypesStandardE2V3 ...
+ VirtualMachineSizeTypesStandardE2V3 VirtualMachineSizeTypes = "Standard_E2_v3"
+ // VirtualMachineSizeTypesStandardE3216V3 ...
+ VirtualMachineSizeTypesStandardE3216V3 VirtualMachineSizeTypes = "Standard_E32-16_v3"
+ // VirtualMachineSizeTypesStandardE328sV3 ...
+ VirtualMachineSizeTypesStandardE328sV3 VirtualMachineSizeTypes = "Standard_E32-8s_v3"
+ // VirtualMachineSizeTypesStandardE32sV3 ...
+ VirtualMachineSizeTypesStandardE32sV3 VirtualMachineSizeTypes = "Standard_E32s_v3"
+ // VirtualMachineSizeTypesStandardE32V3 ...
+ VirtualMachineSizeTypesStandardE32V3 VirtualMachineSizeTypes = "Standard_E32_v3"
+ // VirtualMachineSizeTypesStandardE4sV3 ...
+ VirtualMachineSizeTypesStandardE4sV3 VirtualMachineSizeTypes = "Standard_E4s_v3"
+ // VirtualMachineSizeTypesStandardE4V3 ...
+ VirtualMachineSizeTypesStandardE4V3 VirtualMachineSizeTypes = "Standard_E4_v3"
+ // VirtualMachineSizeTypesStandardE6416sV3 ...
+ VirtualMachineSizeTypesStandardE6416sV3 VirtualMachineSizeTypes = "Standard_E64-16s_v3"
+ // VirtualMachineSizeTypesStandardE6432sV3 ...
+ VirtualMachineSizeTypesStandardE6432sV3 VirtualMachineSizeTypes = "Standard_E64-32s_v3"
+ // VirtualMachineSizeTypesStandardE64sV3 ...
+ VirtualMachineSizeTypesStandardE64sV3 VirtualMachineSizeTypes = "Standard_E64s_v3"
+ // VirtualMachineSizeTypesStandardE64V3 ...
+ VirtualMachineSizeTypesStandardE64V3 VirtualMachineSizeTypes = "Standard_E64_v3"
+ // VirtualMachineSizeTypesStandardE8sV3 ...
+ VirtualMachineSizeTypesStandardE8sV3 VirtualMachineSizeTypes = "Standard_E8s_v3"
+ // VirtualMachineSizeTypesStandardE8V3 ...
+ VirtualMachineSizeTypesStandardE8V3 VirtualMachineSizeTypes = "Standard_E8_v3"
+ // VirtualMachineSizeTypesStandardF1 ...
+ VirtualMachineSizeTypesStandardF1 VirtualMachineSizeTypes = "Standard_F1"
+ // VirtualMachineSizeTypesStandardF16 ...
+ VirtualMachineSizeTypesStandardF16 VirtualMachineSizeTypes = "Standard_F16"
+ // VirtualMachineSizeTypesStandardF16s ...
+ VirtualMachineSizeTypesStandardF16s VirtualMachineSizeTypes = "Standard_F16s"
+ // VirtualMachineSizeTypesStandardF16sV2 ...
+ VirtualMachineSizeTypesStandardF16sV2 VirtualMachineSizeTypes = "Standard_F16s_v2"
+ // VirtualMachineSizeTypesStandardF1s ...
+ VirtualMachineSizeTypesStandardF1s VirtualMachineSizeTypes = "Standard_F1s"
+ // VirtualMachineSizeTypesStandardF2 ...
+ VirtualMachineSizeTypesStandardF2 VirtualMachineSizeTypes = "Standard_F2"
+ // VirtualMachineSizeTypesStandardF2s ...
+ VirtualMachineSizeTypesStandardF2s VirtualMachineSizeTypes = "Standard_F2s"
+ // VirtualMachineSizeTypesStandardF2sV2 ...
+ VirtualMachineSizeTypesStandardF2sV2 VirtualMachineSizeTypes = "Standard_F2s_v2"
+ // VirtualMachineSizeTypesStandardF32sV2 ...
+ VirtualMachineSizeTypesStandardF32sV2 VirtualMachineSizeTypes = "Standard_F32s_v2"
+ // VirtualMachineSizeTypesStandardF4 ...
+ VirtualMachineSizeTypesStandardF4 VirtualMachineSizeTypes = "Standard_F4"
+ // VirtualMachineSizeTypesStandardF4s ...
+ VirtualMachineSizeTypesStandardF4s VirtualMachineSizeTypes = "Standard_F4s"
+ // VirtualMachineSizeTypesStandardF4sV2 ...
+ VirtualMachineSizeTypesStandardF4sV2 VirtualMachineSizeTypes = "Standard_F4s_v2"
+ // VirtualMachineSizeTypesStandardF64sV2 ...
+ VirtualMachineSizeTypesStandardF64sV2 VirtualMachineSizeTypes = "Standard_F64s_v2"
+ // VirtualMachineSizeTypesStandardF72sV2 ...
+ VirtualMachineSizeTypesStandardF72sV2 VirtualMachineSizeTypes = "Standard_F72s_v2"
+ // VirtualMachineSizeTypesStandardF8 ...
+ VirtualMachineSizeTypesStandardF8 VirtualMachineSizeTypes = "Standard_F8"
+ // VirtualMachineSizeTypesStandardF8s ...
+ VirtualMachineSizeTypesStandardF8s VirtualMachineSizeTypes = "Standard_F8s"
+ // VirtualMachineSizeTypesStandardF8sV2 ...
+ VirtualMachineSizeTypesStandardF8sV2 VirtualMachineSizeTypes = "Standard_F8s_v2"
+ // VirtualMachineSizeTypesStandardG1 ...
+ VirtualMachineSizeTypesStandardG1 VirtualMachineSizeTypes = "Standard_G1"
+ // VirtualMachineSizeTypesStandardG2 ...
+ VirtualMachineSizeTypesStandardG2 VirtualMachineSizeTypes = "Standard_G2"
+ // VirtualMachineSizeTypesStandardG3 ...
+ VirtualMachineSizeTypesStandardG3 VirtualMachineSizeTypes = "Standard_G3"
+ // VirtualMachineSizeTypesStandardG4 ...
+ VirtualMachineSizeTypesStandardG4 VirtualMachineSizeTypes = "Standard_G4"
+ // VirtualMachineSizeTypesStandardG5 ...
+ VirtualMachineSizeTypesStandardG5 VirtualMachineSizeTypes = "Standard_G5"
+ // VirtualMachineSizeTypesStandardGS1 ...
+ VirtualMachineSizeTypesStandardGS1 VirtualMachineSizeTypes = "Standard_GS1"
+ // VirtualMachineSizeTypesStandardGS2 ...
+ VirtualMachineSizeTypesStandardGS2 VirtualMachineSizeTypes = "Standard_GS2"
+ // VirtualMachineSizeTypesStandardGS3 ...
+ VirtualMachineSizeTypesStandardGS3 VirtualMachineSizeTypes = "Standard_GS3"
+ // VirtualMachineSizeTypesStandardGS4 ...
+ VirtualMachineSizeTypesStandardGS4 VirtualMachineSizeTypes = "Standard_GS4"
+ // VirtualMachineSizeTypesStandardGS44 ...
+ VirtualMachineSizeTypesStandardGS44 VirtualMachineSizeTypes = "Standard_GS4-4"
+ // VirtualMachineSizeTypesStandardGS48 ...
+ VirtualMachineSizeTypesStandardGS48 VirtualMachineSizeTypes = "Standard_GS4-8"
+ // VirtualMachineSizeTypesStandardGS5 ...
+ VirtualMachineSizeTypesStandardGS5 VirtualMachineSizeTypes = "Standard_GS5"
+ // VirtualMachineSizeTypesStandardGS516 ...
+ VirtualMachineSizeTypesStandardGS516 VirtualMachineSizeTypes = "Standard_GS5-16"
+ // VirtualMachineSizeTypesStandardGS58 ...
+ VirtualMachineSizeTypesStandardGS58 VirtualMachineSizeTypes = "Standard_GS5-8"
+ // VirtualMachineSizeTypesStandardH16 ...
+ VirtualMachineSizeTypesStandardH16 VirtualMachineSizeTypes = "Standard_H16"
+ // VirtualMachineSizeTypesStandardH16m ...
+ VirtualMachineSizeTypesStandardH16m VirtualMachineSizeTypes = "Standard_H16m"
+ // VirtualMachineSizeTypesStandardH16mr ...
+ VirtualMachineSizeTypesStandardH16mr VirtualMachineSizeTypes = "Standard_H16mr"
+ // VirtualMachineSizeTypesStandardH16r ...
+ VirtualMachineSizeTypesStandardH16r VirtualMachineSizeTypes = "Standard_H16r"
+ // VirtualMachineSizeTypesStandardH8 ...
+ VirtualMachineSizeTypesStandardH8 VirtualMachineSizeTypes = "Standard_H8"
+ // VirtualMachineSizeTypesStandardH8m ...
+ VirtualMachineSizeTypesStandardH8m VirtualMachineSizeTypes = "Standard_H8m"
+ // VirtualMachineSizeTypesStandardL16s ...
+ VirtualMachineSizeTypesStandardL16s VirtualMachineSizeTypes = "Standard_L16s"
+ // VirtualMachineSizeTypesStandardL32s ...
+ VirtualMachineSizeTypesStandardL32s VirtualMachineSizeTypes = "Standard_L32s"
+ // VirtualMachineSizeTypesStandardL4s ...
+ VirtualMachineSizeTypesStandardL4s VirtualMachineSizeTypes = "Standard_L4s"
+ // VirtualMachineSizeTypesStandardL8s ...
+ VirtualMachineSizeTypesStandardL8s VirtualMachineSizeTypes = "Standard_L8s"
+ // VirtualMachineSizeTypesStandardM12832ms ...
+ VirtualMachineSizeTypesStandardM12832ms VirtualMachineSizeTypes = "Standard_M128-32ms"
+ // VirtualMachineSizeTypesStandardM12864ms ...
+ VirtualMachineSizeTypesStandardM12864ms VirtualMachineSizeTypes = "Standard_M128-64ms"
+ // VirtualMachineSizeTypesStandardM128ms ...
+ VirtualMachineSizeTypesStandardM128ms VirtualMachineSizeTypes = "Standard_M128ms"
+ // VirtualMachineSizeTypesStandardM128s ...
+ VirtualMachineSizeTypesStandardM128s VirtualMachineSizeTypes = "Standard_M128s"
+ // VirtualMachineSizeTypesStandardM6416ms ...
+ VirtualMachineSizeTypesStandardM6416ms VirtualMachineSizeTypes = "Standard_M64-16ms"
+ // VirtualMachineSizeTypesStandardM6432ms ...
+ VirtualMachineSizeTypesStandardM6432ms VirtualMachineSizeTypes = "Standard_M64-32ms"
+ // VirtualMachineSizeTypesStandardM64ms ...
+ VirtualMachineSizeTypesStandardM64ms VirtualMachineSizeTypes = "Standard_M64ms"
+ // VirtualMachineSizeTypesStandardM64s ...
+ VirtualMachineSizeTypesStandardM64s VirtualMachineSizeTypes = "Standard_M64s"
+ // VirtualMachineSizeTypesStandardNC12 ...
+ VirtualMachineSizeTypesStandardNC12 VirtualMachineSizeTypes = "Standard_NC12"
+ // VirtualMachineSizeTypesStandardNC12sV2 ...
+ VirtualMachineSizeTypesStandardNC12sV2 VirtualMachineSizeTypes = "Standard_NC12s_v2"
+ // VirtualMachineSizeTypesStandardNC12sV3 ...
+ VirtualMachineSizeTypesStandardNC12sV3 VirtualMachineSizeTypes = "Standard_NC12s_v3"
+ // VirtualMachineSizeTypesStandardNC24 ...
+ VirtualMachineSizeTypesStandardNC24 VirtualMachineSizeTypes = "Standard_NC24"
+ // VirtualMachineSizeTypesStandardNC24r ...
+ VirtualMachineSizeTypesStandardNC24r VirtualMachineSizeTypes = "Standard_NC24r"
+ // VirtualMachineSizeTypesStandardNC24rsV2 ...
+ VirtualMachineSizeTypesStandardNC24rsV2 VirtualMachineSizeTypes = "Standard_NC24rs_v2"
+ // VirtualMachineSizeTypesStandardNC24rsV3 ...
+ VirtualMachineSizeTypesStandardNC24rsV3 VirtualMachineSizeTypes = "Standard_NC24rs_v3"
+ // VirtualMachineSizeTypesStandardNC24sV2 ...
+ VirtualMachineSizeTypesStandardNC24sV2 VirtualMachineSizeTypes = "Standard_NC24s_v2"
+ // VirtualMachineSizeTypesStandardNC24sV3 ...
+ VirtualMachineSizeTypesStandardNC24sV3 VirtualMachineSizeTypes = "Standard_NC24s_v3"
+ // VirtualMachineSizeTypesStandardNC6 ...
+ VirtualMachineSizeTypesStandardNC6 VirtualMachineSizeTypes = "Standard_NC6"
+ // VirtualMachineSizeTypesStandardNC6sV2 ...
+ VirtualMachineSizeTypesStandardNC6sV2 VirtualMachineSizeTypes = "Standard_NC6s_v2"
+ // VirtualMachineSizeTypesStandardNC6sV3 ...
+ VirtualMachineSizeTypesStandardNC6sV3 VirtualMachineSizeTypes = "Standard_NC6s_v3"
+ // VirtualMachineSizeTypesStandardND12s ...
+ VirtualMachineSizeTypesStandardND12s VirtualMachineSizeTypes = "Standard_ND12s"
+ // VirtualMachineSizeTypesStandardND24rs ...
+ VirtualMachineSizeTypesStandardND24rs VirtualMachineSizeTypes = "Standard_ND24rs"
+ // VirtualMachineSizeTypesStandardND24s ...
+ VirtualMachineSizeTypesStandardND24s VirtualMachineSizeTypes = "Standard_ND24s"
+ // VirtualMachineSizeTypesStandardND6s ...
+ VirtualMachineSizeTypesStandardND6s VirtualMachineSizeTypes = "Standard_ND6s"
+ // VirtualMachineSizeTypesStandardNV12 ...
+ VirtualMachineSizeTypesStandardNV12 VirtualMachineSizeTypes = "Standard_NV12"
+ // VirtualMachineSizeTypesStandardNV24 ...
+ VirtualMachineSizeTypesStandardNV24 VirtualMachineSizeTypes = "Standard_NV24"
+ // VirtualMachineSizeTypesStandardNV6 ...
+ VirtualMachineSizeTypesStandardNV6 VirtualMachineSizeTypes = "Standard_NV6"
+)
+
+// PossibleVirtualMachineSizeTypesValues returns an array of possible values for the VirtualMachineSizeTypes const type.
+func PossibleVirtualMachineSizeTypesValues() []VirtualMachineSizeTypes {
+ return []VirtualMachineSizeTypes{VirtualMachineSizeTypesBasicA0, VirtualMachineSizeTypesBasicA1, VirtualMachineSizeTypesBasicA2, VirtualMachineSizeTypesBasicA3, VirtualMachineSizeTypesBasicA4, VirtualMachineSizeTypesStandardA0, VirtualMachineSizeTypesStandardA1, VirtualMachineSizeTypesStandardA10, VirtualMachineSizeTypesStandardA11, VirtualMachineSizeTypesStandardA1V2, VirtualMachineSizeTypesStandardA2, VirtualMachineSizeTypesStandardA2mV2, VirtualMachineSizeTypesStandardA2V2, VirtualMachineSizeTypesStandardA3, VirtualMachineSizeTypesStandardA4, VirtualMachineSizeTypesStandardA4mV2, VirtualMachineSizeTypesStandardA4V2, VirtualMachineSizeTypesStandardA5, VirtualMachineSizeTypesStandardA6, VirtualMachineSizeTypesStandardA7, VirtualMachineSizeTypesStandardA8, VirtualMachineSizeTypesStandardA8mV2, VirtualMachineSizeTypesStandardA8V2, VirtualMachineSizeTypesStandardA9, VirtualMachineSizeTypesStandardB1ms, VirtualMachineSizeTypesStandardB1s, VirtualMachineSizeTypesStandardB2ms, VirtualMachineSizeTypesStandardB2s, VirtualMachineSizeTypesStandardB4ms, VirtualMachineSizeTypesStandardB8ms, VirtualMachineSizeTypesStandardD1, VirtualMachineSizeTypesStandardD11, VirtualMachineSizeTypesStandardD11V2, VirtualMachineSizeTypesStandardD12, VirtualMachineSizeTypesStandardD12V2, VirtualMachineSizeTypesStandardD13, VirtualMachineSizeTypesStandardD13V2, VirtualMachineSizeTypesStandardD14, VirtualMachineSizeTypesStandardD14V2, VirtualMachineSizeTypesStandardD15V2, VirtualMachineSizeTypesStandardD16sV3, VirtualMachineSizeTypesStandardD16V3, VirtualMachineSizeTypesStandardD1V2, VirtualMachineSizeTypesStandardD2, VirtualMachineSizeTypesStandardD2sV3, VirtualMachineSizeTypesStandardD2V2, VirtualMachineSizeTypesStandardD2V3, VirtualMachineSizeTypesStandardD3, VirtualMachineSizeTypesStandardD32sV3, VirtualMachineSizeTypesStandardD32V3, VirtualMachineSizeTypesStandardD3V2, VirtualMachineSizeTypesStandardD4, VirtualMachineSizeTypesStandardD4sV3, VirtualMachineSizeTypesStandardD4V2, VirtualMachineSizeTypesStandardD4V3, VirtualMachineSizeTypesStandardD5V2, VirtualMachineSizeTypesStandardD64sV3, VirtualMachineSizeTypesStandardD64V3, VirtualMachineSizeTypesStandardD8sV3, VirtualMachineSizeTypesStandardD8V3, VirtualMachineSizeTypesStandardDS1, VirtualMachineSizeTypesStandardDS11, VirtualMachineSizeTypesStandardDS11V2, VirtualMachineSizeTypesStandardDS12, VirtualMachineSizeTypesStandardDS12V2, VirtualMachineSizeTypesStandardDS13, VirtualMachineSizeTypesStandardDS132V2, VirtualMachineSizeTypesStandardDS134V2, VirtualMachineSizeTypesStandardDS13V2, VirtualMachineSizeTypesStandardDS14, VirtualMachineSizeTypesStandardDS144V2, VirtualMachineSizeTypesStandardDS148V2, VirtualMachineSizeTypesStandardDS14V2, VirtualMachineSizeTypesStandardDS15V2, VirtualMachineSizeTypesStandardDS1V2, VirtualMachineSizeTypesStandardDS2, VirtualMachineSizeTypesStandardDS2V2, VirtualMachineSizeTypesStandardDS3, VirtualMachineSizeTypesStandardDS3V2, VirtualMachineSizeTypesStandardDS4, VirtualMachineSizeTypesStandardDS4V2, VirtualMachineSizeTypesStandardDS5V2, VirtualMachineSizeTypesStandardE16sV3, VirtualMachineSizeTypesStandardE16V3, VirtualMachineSizeTypesStandardE2sV3, VirtualMachineSizeTypesStandardE2V3, VirtualMachineSizeTypesStandardE3216V3, VirtualMachineSizeTypesStandardE328sV3, VirtualMachineSizeTypesStandardE32sV3, VirtualMachineSizeTypesStandardE32V3, VirtualMachineSizeTypesStandardE4sV3, VirtualMachineSizeTypesStandardE4V3, VirtualMachineSizeTypesStandardE6416sV3, VirtualMachineSizeTypesStandardE6432sV3, VirtualMachineSizeTypesStandardE64sV3, VirtualMachineSizeTypesStandardE64V3, VirtualMachineSizeTypesStandardE8sV3, VirtualMachineSizeTypesStandardE8V3, VirtualMachineSizeTypesStandardF1, VirtualMachineSizeTypesStandardF16, VirtualMachineSizeTypesStandardF16s, VirtualMachineSizeTypesStandardF16sV2, VirtualMachineSizeTypesStandardF1s, VirtualMachineSizeTypesStandardF2, VirtualMachineSizeTypesStandardF2s, VirtualMachineSizeTypesStandardF2sV2, VirtualMachineSizeTypesStandardF32sV2, VirtualMachineSizeTypesStandardF4, VirtualMachineSizeTypesStandardF4s, VirtualMachineSizeTypesStandardF4sV2, VirtualMachineSizeTypesStandardF64sV2, VirtualMachineSizeTypesStandardF72sV2, VirtualMachineSizeTypesStandardF8, VirtualMachineSizeTypesStandardF8s, VirtualMachineSizeTypesStandardF8sV2, VirtualMachineSizeTypesStandardG1, VirtualMachineSizeTypesStandardG2, VirtualMachineSizeTypesStandardG3, VirtualMachineSizeTypesStandardG4, VirtualMachineSizeTypesStandardG5, VirtualMachineSizeTypesStandardGS1, VirtualMachineSizeTypesStandardGS2, VirtualMachineSizeTypesStandardGS3, VirtualMachineSizeTypesStandardGS4, VirtualMachineSizeTypesStandardGS44, VirtualMachineSizeTypesStandardGS48, VirtualMachineSizeTypesStandardGS5, VirtualMachineSizeTypesStandardGS516, VirtualMachineSizeTypesStandardGS58, VirtualMachineSizeTypesStandardH16, VirtualMachineSizeTypesStandardH16m, VirtualMachineSizeTypesStandardH16mr, VirtualMachineSizeTypesStandardH16r, VirtualMachineSizeTypesStandardH8, VirtualMachineSizeTypesStandardH8m, VirtualMachineSizeTypesStandardL16s, VirtualMachineSizeTypesStandardL32s, VirtualMachineSizeTypesStandardL4s, VirtualMachineSizeTypesStandardL8s, VirtualMachineSizeTypesStandardM12832ms, VirtualMachineSizeTypesStandardM12864ms, VirtualMachineSizeTypesStandardM128ms, VirtualMachineSizeTypesStandardM128s, VirtualMachineSizeTypesStandardM6416ms, VirtualMachineSizeTypesStandardM6432ms, VirtualMachineSizeTypesStandardM64ms, VirtualMachineSizeTypesStandardM64s, VirtualMachineSizeTypesStandardNC12, VirtualMachineSizeTypesStandardNC12sV2, VirtualMachineSizeTypesStandardNC12sV3, VirtualMachineSizeTypesStandardNC24, VirtualMachineSizeTypesStandardNC24r, VirtualMachineSizeTypesStandardNC24rsV2, VirtualMachineSizeTypesStandardNC24rsV3, VirtualMachineSizeTypesStandardNC24sV2, VirtualMachineSizeTypesStandardNC24sV3, VirtualMachineSizeTypesStandardNC6, VirtualMachineSizeTypesStandardNC6sV2, VirtualMachineSizeTypesStandardNC6sV3, VirtualMachineSizeTypesStandardND12s, VirtualMachineSizeTypesStandardND24rs, VirtualMachineSizeTypesStandardND24s, VirtualMachineSizeTypesStandardND6s, VirtualMachineSizeTypesStandardNV12, VirtualMachineSizeTypesStandardNV24, VirtualMachineSizeTypesStandardNV6}
+}
+
+// AccessURI a disk access SAS uri.
+type AccessURI struct {
+ autorest.Response `json:"-"`
+ // AccessSAS - READ-ONLY; A SAS uri for accessing a disk.
+ AccessSAS *string `json:"accessSAS,omitempty"`
+}
+
+// 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.
+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"`
+}
+
+// AutomaticOSUpgradePolicy the configuration parameters used for performing automatic OS upgrade.
+type AutomaticOSUpgradePolicy struct {
+ // EnableAutomaticOSUpgrade - Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. Default value is false.
If this is set to true for Windows based scale sets, [enableAutomaticUpdates](https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet) is automatically set to false and cannot be set to true.
+ EnableAutomaticOSUpgrade *bool `json:"enableAutomaticOSUpgrade,omitempty"`
+ // DisableAutomaticRollback - Whether OS image rollback feature should be disabled. Default value is false.
+ DisableAutomaticRollback *bool `json:"disableAutomaticRollback,omitempty"`
+}
+
+// AutomaticOSUpgradeProperties describes automatic OS upgrade properties on the image.
+type AutomaticOSUpgradeProperties struct {
+ // AutomaticOSUpgradeSupported - Specifies whether automatic OS upgrade is supported on the image.
+ AutomaticOSUpgradeSupported *bool `json:"automaticOSUpgradeSupported,omitempty"`
+}
+
+// AutomaticRepairsPolicy specifies the configuration parameters for automatic repairs on the virtual
+// machine scale set.
+type AutomaticRepairsPolicy struct {
+ // Enabled - Specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false.
+ Enabled *bool `json:"enabled,omitempty"`
+ // GracePeriod - The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 30 minutes (PT30M), which is also the default value. The maximum allowed grace period is 90 minutes (PT90M).
+ GracePeriod *string `json:"gracePeriod,omitempty"`
+}
+
+// AvailabilitySet specifies information about the availability set that the virtual machine should be
+// assigned to. Virtual machines specified in the same availability set are allocated to different nodes to
+// maximize availability. For more information about availability sets, see [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, only name is required to be set. See AvailabilitySetSkuTypes for possible set of values. Use 'Aligned' for virtual machines with managed disks and 'Classic' for virtual machines with unmanaged disks. Default value is 'Classic'.
+ Sku *Sku `json:"sku,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for AvailabilitySet.
+func (as AvailabilitySet) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if as.AvailabilitySetProperties != nil {
+ objectMap["properties"] = as.AvailabilitySetProperties
+ }
+ if as.Sku != nil {
+ objectMap["sku"] = as.Sku
+ }
+ if as.Location != nil {
+ objectMap["location"] = as.Location
+ }
+ if as.Tags != nil {
+ objectMap["tags"] = as.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for AvailabilitySet struct.
+func (as *AvailabilitySet) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var availabilitySetProperties AvailabilitySetProperties
+ err = json.Unmarshal(*v, &availabilitySetProperties)
+ if err != nil {
+ return err
+ }
+ as.AvailabilitySetProperties = &availabilitySetProperties
+ }
+ case "sku":
+ if v != nil {
+ var sku Sku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ as.Sku = &sku
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ as.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ as.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ as.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ as.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ as.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// AvailabilitySetListResult the List Availability Set operation response.
+type AvailabilitySetListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of availability sets
+ Value *[]AvailabilitySet `json:"value,omitempty"`
+ // NextLink - The URI to fetch the next page of AvailabilitySets. Call ListNext() with this URI to fetch the next page of AvailabilitySets.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// AvailabilitySetListResultIterator provides access to a complete listing of AvailabilitySet values.
+type AvailabilitySetListResultIterator struct {
+ i int
+ page AvailabilitySetListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *AvailabilitySetListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *AvailabilitySetListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter AvailabilitySetListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter AvailabilitySetListResultIterator) Response() AvailabilitySetListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter AvailabilitySetListResultIterator) Value() AvailabilitySet {
+ if !iter.page.NotDone() {
+ return AvailabilitySet{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the AvailabilitySetListResultIterator type.
+func NewAvailabilitySetListResultIterator(page AvailabilitySetListResultPage) AvailabilitySetListResultIterator {
+ return AvailabilitySetListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (aslr AvailabilitySetListResult) IsEmpty() bool {
+ return aslr.Value == nil || len(*aslr.Value) == 0
+}
+
+// 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.NextLink == nil || len(to.String(aslr.NextLink)) < 1 {
+ 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)
+ }()
+ }
+ next, err := page.fn(ctx, page.aslr)
+ if err != nil {
+ return err
+ }
+ page.aslr = next
+ 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(getNextPage func(context.Context, AvailabilitySetListResult) (AvailabilitySetListResult, error)) AvailabilitySetListResultPage {
+ return AvailabilitySetListResultPage{fn: getNextPage}
+}
+
+// AvailabilitySetProperties the instance view of a resource.
+type AvailabilitySetProperties struct {
+ // PlatformUpdateDomainCount - Update Domain count.
+ PlatformUpdateDomainCount *int32 `json:"platformUpdateDomainCount,omitempty"`
+ // PlatformFaultDomainCount - Fault Domain count.
+ PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"`
+ // VirtualMachines - A list of references to all virtual machines in the availability set.
+ VirtualMachines *[]SubResource `json:"virtualMachines,omitempty"`
+ // ProximityPlacementGroup - Specifies information about the proximity placement group that the availability set should be assigned to.
Minimum api-version: 2018-04-01.
+ ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"`
+ // Statuses - READ-ONLY; The resource status information.
+ Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
+}
+
+// AvailabilitySetUpdate specifies information about the availability set that the virtual machine should
+// be assigned to. Only tags may be updated.
+type AvailabilitySetUpdate struct {
+ *AvailabilitySetProperties `json:"properties,omitempty"`
+ // Sku - Sku of the availability set
+ Sku *Sku `json:"sku,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for AvailabilitySetUpdate.
+func (asu AvailabilitySetUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if asu.AvailabilitySetProperties != nil {
+ objectMap["properties"] = asu.AvailabilitySetProperties
+ }
+ if asu.Sku != nil {
+ objectMap["sku"] = asu.Sku
+ }
+ if asu.Tags != nil {
+ objectMap["tags"] = asu.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for AvailabilitySetUpdate struct.
+func (asu *AvailabilitySetUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var availabilitySetProperties AvailabilitySetProperties
+ err = json.Unmarshal(*v, &availabilitySetProperties)
+ if err != nil {
+ return err
+ }
+ asu.AvailabilitySetProperties = &availabilitySetProperties
+ }
+ case "sku":
+ if v != nil {
+ var sku Sku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ asu.Sku = &sku
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ asu.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// BillingProfile specifies the billing related details of a Azure Spot VM or VMSS.
Minimum
+// api-version: 2019-03-01.
+type BillingProfile struct {
+ // MaxPrice - Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars.
This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if the maxPrice is greater than the current Azure Spot price.
The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS.
Possible values are:
- Any decimal value greater than zero. Example: 0.01538
-1 – indicates default price to be up-to on-demand.
You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you.
Minimum api-version: 2019-03-01.
+ MaxPrice *float64 `json:"maxPrice,omitempty"`
+}
+
+// BootDiagnostics boot Diagnostics is a debugging feature which allows you to view Console Output and
+// Screenshot to diagnose VM status.
You can easily view the output of your console log.
+// Azure also enables you to see a screenshot of the VM from the hypervisor.
+type BootDiagnostics struct {
+ // Enabled - Whether boot diagnostics should be enabled on the Virtual Machine.
+ Enabled *bool `json:"enabled,omitempty"`
+ // StorageURI - Uri of the storage account to use for placing the console output and screenshot.
+ 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"`
+ // Status - READ-ONLY; The boot diagnostics status information for the VM.
NOTE: It will be set only if there are errors encountered in enabling boot diagnostics.
+ Status *InstanceViewStatus `json:"status,omitempty"`
+}
+
+// CloudError an error response from the Compute service.
+type CloudError struct {
+ Error *APIError `json:"error,omitempty"`
+}
+
+// ContainerService container service.
+type ContainerService struct {
+ autorest.Response `json:"-"`
+ *ContainerServiceProperties `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 ContainerService.
+func (cs ContainerService) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if cs.ContainerServiceProperties != nil {
+ objectMap["properties"] = cs.ContainerServiceProperties
+ }
+ if cs.Location != nil {
+ objectMap["location"] = cs.Location
+ }
+ if cs.Tags != nil {
+ objectMap["tags"] = cs.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ContainerService struct.
+func (cs *ContainerService) UnmarshalJSON(body []byte) error {
+ 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 containerServiceProperties ContainerServiceProperties
+ err = json.Unmarshal(*v, &containerServiceProperties)
+ if err != nil {
+ return err
+ }
+ cs.ContainerServiceProperties = &containerServiceProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ cs.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ cs.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ cs.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ cs.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ cs.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// ContainerServiceAgentPoolProfile profile for the container service agent pool.
+type ContainerServiceAgentPoolProfile struct {
+ // Name - Unique name of the agent pool profile in the context of the subscription and resource group.
+ Name *string `json:"name,omitempty"`
+ // Count - Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1.
+ Count *int32 `json:"count,omitempty"`
+ // VMSize - Size of agent VMs. Possible values include: 'StandardA0', 'StandardA1', 'StandardA2', 'StandardA3', 'StandardA4', 'StandardA5', 'StandardA6', 'StandardA7', 'StandardA8', 'StandardA9', 'StandardA10', 'StandardA11', 'StandardD1', 'StandardD2', 'StandardD3', 'StandardD4', 'StandardD11', 'StandardD12', 'StandardD13', 'StandardD14', 'StandardD1V2', 'StandardD2V2', 'StandardD3V2', 'StandardD4V2', 'StandardD5V2', 'StandardD11V2', 'StandardD12V2', 'StandardD13V2', 'StandardD14V2', 'StandardG1', 'StandardG2', 'StandardG3', 'StandardG4', 'StandardG5', 'StandardDS1', 'StandardDS2', 'StandardDS3', 'StandardDS4', 'StandardDS11', 'StandardDS12', 'StandardDS13', 'StandardDS14', 'StandardGS1', 'StandardGS2', 'StandardGS3', 'StandardGS4', 'StandardGS5'
+ VMSize ContainerServiceVMSizeTypes `json:"vmSize,omitempty"`
+ // DNSPrefix - DNS prefix to be used to create the FQDN for the agent pool.
+ DNSPrefix *string `json:"dnsPrefix,omitempty"`
+ // Fqdn - READ-ONLY; FQDN for the agent pool.
+ Fqdn *string `json:"fqdn,omitempty"`
+}
+
+// ContainerServiceCustomProfile properties to configure a custom container service cluster.
+type ContainerServiceCustomProfile struct {
+ // Orchestrator - The name of the custom orchestrator to use.
+ Orchestrator *string `json:"orchestrator,omitempty"`
+}
+
+// ContainerServiceDiagnosticsProfile ...
+type ContainerServiceDiagnosticsProfile struct {
+ // VMDiagnostics - Profile for the container service VM diagnostic agent.
+ VMDiagnostics *ContainerServiceVMDiagnostics `json:"vmDiagnostics,omitempty"`
+}
+
+// ContainerServiceLinuxProfile profile for Linux VMs in the container service cluster.
+type ContainerServiceLinuxProfile struct {
+ // AdminUsername - The administrator username to use for Linux VMs.
+ AdminUsername *string `json:"adminUsername,omitempty"`
+ // SSH - The ssh key configuration for Linux VMs.
+ SSH *ContainerServiceSSHConfiguration `json:"ssh,omitempty"`
+}
+
+// ContainerServiceListResult the response from the List Container Services operation.
+type ContainerServiceListResult struct {
+ autorest.Response `json:"-"`
+ // Value - the list of container services.
+ Value *[]ContainerService `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of container service results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ContainerServiceListResultIterator provides access to a complete listing of ContainerService values.
+type ContainerServiceListResultIterator struct {
+ i int
+ page ContainerServiceListResultPage
+}
+
+// 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 *ContainerServiceListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServiceListResultIterator.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 *ContainerServiceListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ContainerServiceListResultIterator) 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 ContainerServiceListResultIterator) Response() ContainerServiceListResult {
+ 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 ContainerServiceListResultIterator) Value() ContainerService {
+ if !iter.page.NotDone() {
+ return ContainerService{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the ContainerServiceListResultIterator type.
+func NewContainerServiceListResultIterator(page ContainerServiceListResultPage) ContainerServiceListResultIterator {
+ return ContainerServiceListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (cslr ContainerServiceListResult) IsEmpty() bool {
+ return cslr.Value == nil || len(*cslr.Value) == 0
+}
+
+// containerServiceListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (cslr ContainerServiceListResult) containerServiceListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if cslr.NextLink == nil || len(to.String(cslr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(cslr.NextLink)))
+}
+
+// ContainerServiceListResultPage contains a page of ContainerService values.
+type ContainerServiceListResultPage struct {
+ fn func(context.Context, ContainerServiceListResult) (ContainerServiceListResult, error)
+ cslr ContainerServiceListResult
+}
+
+// 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 *ContainerServiceListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServiceListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.cslr)
+ if err != nil {
+ return err
+ }
+ page.cslr = next
+ 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 *ContainerServiceListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ContainerServiceListResultPage) NotDone() bool {
+ return !page.cslr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ContainerServiceListResultPage) Response() ContainerServiceListResult {
+ return page.cslr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ContainerServiceListResultPage) Values() []ContainerService {
+ if page.cslr.IsEmpty() {
+ return nil
+ }
+ return *page.cslr.Value
+}
+
+// Creates a new instance of the ContainerServiceListResultPage type.
+func NewContainerServiceListResultPage(getNextPage func(context.Context, ContainerServiceListResult) (ContainerServiceListResult, error)) ContainerServiceListResultPage {
+ return ContainerServiceListResultPage{fn: getNextPage}
+}
+
+// ContainerServiceMasterProfile profile for the container service master.
+type ContainerServiceMasterProfile struct {
+ // Count - Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1.
+ Count *int32 `json:"count,omitempty"`
+ // DNSPrefix - DNS prefix to be used to create the FQDN for master.
+ DNSPrefix *string `json:"dnsPrefix,omitempty"`
+ // Fqdn - READ-ONLY; FQDN for the master.
+ Fqdn *string `json:"fqdn,omitempty"`
+}
+
+// ContainerServiceOrchestratorProfile profile for the container service orchestrator.
+type ContainerServiceOrchestratorProfile struct {
+ // OrchestratorType - The orchestrator to use to manage container service cluster resources. Valid values are Swarm, DCOS, and Custom. Possible values include: 'Swarm', 'DCOS', 'Custom', 'Kubernetes'
+ OrchestratorType ContainerServiceOrchestratorTypes `json:"orchestratorType,omitempty"`
+}
+
+// ContainerServiceProperties properties of the container service.
+type ContainerServiceProperties struct {
+ // ProvisioningState - READ-ONLY; the current deployment or provisioning state, which only appears in the response.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // OrchestratorProfile - Properties of the orchestrator.
+ OrchestratorProfile *ContainerServiceOrchestratorProfile `json:"orchestratorProfile,omitempty"`
+ // CustomProfile - Properties for custom clusters.
+ CustomProfile *ContainerServiceCustomProfile `json:"customProfile,omitempty"`
+ // ServicePrincipalProfile - Properties for cluster service principals.
+ ServicePrincipalProfile *ContainerServiceServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"`
+ // MasterProfile - Properties of master agents.
+ MasterProfile *ContainerServiceMasterProfile `json:"masterProfile,omitempty"`
+ // AgentPoolProfiles - Properties of the agent pool.
+ AgentPoolProfiles *[]ContainerServiceAgentPoolProfile `json:"agentPoolProfiles,omitempty"`
+ // WindowsProfile - Properties of Windows VMs.
+ WindowsProfile *ContainerServiceWindowsProfile `json:"windowsProfile,omitempty"`
+ // LinuxProfile - Properties of Linux VMs.
+ LinuxProfile *ContainerServiceLinuxProfile `json:"linuxProfile,omitempty"`
+ // DiagnosticsProfile - Properties of the diagnostic agent.
+ DiagnosticsProfile *ContainerServiceDiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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"`
+ // Secret - The secret password associated with the service principal.
+ Secret *string `json:"secret,omitempty"`
+}
+
+// ContainerServiceSSHConfiguration SSH configuration for Linux-based VMs running on Azure.
+type ContainerServiceSSHConfiguration struct {
+ // PublicKeys - the list of SSH public keys used to authenticate with Linux-based VMs.
+ PublicKeys *[]ContainerServiceSSHPublicKey `json:"publicKeys,omitempty"`
+}
+
+// ContainerServiceSSHPublicKey contains information about SSH certificate public key data.
+type ContainerServiceSSHPublicKey struct {
+ // KeyData - Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers.
+ KeyData *string `json:"keyData,omitempty"`
+}
+
+// ContainerServiceVMDiagnostics profile for diagnostics on the container service VMs.
+type ContainerServiceVMDiagnostics struct {
+ // Enabled - Whether the VM diagnostic agent is provisioned on the VM.
+ Enabled *bool `json:"enabled,omitempty"`
+ // StorageURI - READ-ONLY; The URI of the storage account where diagnostics are stored.
+ StorageURI *string `json:"storageUri,omitempty"`
+}
+
+// ContainerServiceWindowsProfile profile for Windows VMs in the container service cluster.
+type ContainerServiceWindowsProfile struct {
+ // AdminUsername - The administrator username to use for Windows VMs.
+ AdminUsername *string `json:"adminUsername,omitempty"`
+ // AdminPassword - The administrator password to use for Windows VMs.
+ AdminPassword *string `json:"adminPassword,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', 'Restore', 'Upload'
+ CreateOption DiskCreateOption `json:"createOption,omitempty"`
+ // StorageAccountID - Required if createOption is Import. The Azure Resource Manager identifier of the storage account containing the blob to import as a disk.
+ StorageAccountID *string `json:"storageAccountId,omitempty"`
+ // ImageReference - Disk source information.
+ ImageReference *ImageDiskReference `json:"imageReference,omitempty"`
+ // GalleryImageReference - Required if creating from a Gallery Image. The id of the ImageDiskReference will be the ARM id of the shared galley image version from which to create a disk.
+ GalleryImageReference *ImageDiskReference `json:"galleryImageReference,omitempty"`
+ // SourceURI - If createOption is Import, this is the URI of a blob to be imported into a managed disk.
+ SourceURI *string `json:"sourceUri,omitempty"`
+ // SourceResourceID - If createOption is Copy, this is the ARM id of the source snapshot or disk.
+ SourceResourceID *string `json:"sourceResourceId,omitempty"`
+ // SourceUniqueID - READ-ONLY; If this field is set, this is the unique id identifying the source of this resource.
+ SourceUniqueID *string `json:"sourceUniqueId,omitempty"`
+ // UploadSizeBytes - If createOption is Upload, this is the size of the contents of the upload including the VHD footer. This value should be between 20972032 (20 MiB + 512 bytes for the VHD footer) and 35183298347520 bytes (32 TiB + 512 bytes for the VHD footer).
+ UploadSizeBytes *int64 `json:"uploadSizeBytes,omitempty"`
+}
+
+// DataDisk describes a data disk.
+type DataDisk struct {
+ // Lun - Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.
+ Lun *int32 `json:"lun,omitempty"`
+ // Name - The disk name.
+ Name *string `json:"name,omitempty"`
+ // Vhd - The virtual hard disk.
+ Vhd *VirtualHardDisk `json:"vhd,omitempty"`
+ // Image - The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.
+ Image *VirtualHardDisk `json:"image,omitempty"`
+ // Caching - Specifies the caching requirements.
Possible values are:
**None**
**ReadOnly**
**ReadWrite**
Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite'
+ Caching CachingTypes `json:"caching,omitempty"`
+ // WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
+ WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
+ // CreateOption - Specifies how the virtual machine should be created.
Possible values are:
**Attach** \u2013 This value is used when you are using a specialized disk to create the virtual machine.
**FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'DiskCreateOptionTypesFromImage', 'DiskCreateOptionTypesEmpty', 'DiskCreateOptionTypesAttach'
+ CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
+ // DiskSizeGB - Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image.
This value cannot be larger than 1023 GB
+ DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
+ // ManagedDisk - The managed disk parameters.
+ ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"`
+ // ToBeDetached - Specifies whether the data disk is in process of detachment from the VirtualMachine/VirtualMachineScaleset
+ ToBeDetached *bool `json:"toBeDetached,omitempty"`
+ // DiskIOPSReadWrite - READ-ONLY; Specifies the Read-Write IOPS for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set.
+ DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"`
+ // DiskMBpsReadWrite - READ-ONLY; Specifies the bandwidth in MB per second for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set.
+ DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"`
+}
+
+// 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"`
+}
+
+// DataDiskImageEncryption contains encryption settings for a data disk image.
+type DataDiskImageEncryption struct {
+ // Lun - This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine.
+ Lun *int32 `json:"lun,omitempty"`
+ // DiskEncryptionSetID - A relative URI containing the resource ID of the disk encryption set.
+ DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
+}
+
+// DedicatedHost specifies information about the Dedicated host.
+type DedicatedHost struct {
+ autorest.Response `json:"-"`
+ *DedicatedHostProperties `json:"properties,omitempty"`
+ // Sku - SKU of the dedicated host for Hardware Generation and VM family. Only name is required to be set. List Microsoft.Compute SKUs for a list of possible values.
+ Sku *Sku `json:"sku,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for DedicatedHost.
+func (dh DedicatedHost) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if dh.DedicatedHostProperties != nil {
+ objectMap["properties"] = dh.DedicatedHostProperties
+ }
+ if dh.Sku != nil {
+ objectMap["sku"] = dh.Sku
+ }
+ if dh.Location != nil {
+ objectMap["location"] = dh.Location
+ }
+ if dh.Tags != nil {
+ objectMap["tags"] = dh.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for DedicatedHost struct.
+func (dh *DedicatedHost) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var dedicatedHostProperties DedicatedHostProperties
+ err = json.Unmarshal(*v, &dedicatedHostProperties)
+ if err != nil {
+ return err
+ }
+ dh.DedicatedHostProperties = &dedicatedHostProperties
+ }
+ case "sku":
+ if v != nil {
+ var sku Sku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ dh.Sku = &sku
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ dh.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ dh.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ dh.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ dh.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ dh.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// DedicatedHostAllocatableVM represents the dedicated host unutilized capacity in terms of a specific VM
+// size.
+type DedicatedHostAllocatableVM struct {
+ // VMSize - VM size in terms of which the unutilized capacity is represented.
+ VMSize *string `json:"vmSize,omitempty"`
+ // Count - Maximum number of VMs of size vmSize that can fit in the dedicated host's remaining capacity.
+ Count *float64 `json:"count,omitempty"`
+}
+
+// DedicatedHostAvailableCapacity dedicated host unutilized capacity.
+type DedicatedHostAvailableCapacity struct {
+ // AllocatableVMs - The unutilized capacity of the dedicated host represented in terms of each VM size that is allowed to be deployed to the dedicated host.
+ AllocatableVMs *[]DedicatedHostAllocatableVM `json:"allocatableVMs,omitempty"`
+}
+
+// DedicatedHostGroup specifies information about the dedicated host group that the dedicated hosts should
+// be assigned to.
Currently, a dedicated host can only be added to a dedicated host group at
+// creation time. An existing dedicated host cannot be added to another dedicated host group.
+type DedicatedHostGroup struct {
+ autorest.Response `json:"-"`
+ *DedicatedHostGroupProperties `json:"properties,omitempty"`
+ // Zones - Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone.
+ Zones *[]string `json:"zones,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for DedicatedHostGroup.
+func (dhg DedicatedHostGroup) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if dhg.DedicatedHostGroupProperties != nil {
+ objectMap["properties"] = dhg.DedicatedHostGroupProperties
+ }
+ if dhg.Zones != nil {
+ objectMap["zones"] = dhg.Zones
+ }
+ if dhg.Location != nil {
+ objectMap["location"] = dhg.Location
+ }
+ if dhg.Tags != nil {
+ objectMap["tags"] = dhg.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for DedicatedHostGroup struct.
+func (dhg *DedicatedHostGroup) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var dedicatedHostGroupProperties DedicatedHostGroupProperties
+ err = json.Unmarshal(*v, &dedicatedHostGroupProperties)
+ if err != nil {
+ return err
+ }
+ dhg.DedicatedHostGroupProperties = &dedicatedHostGroupProperties
+ }
+ case "zones":
+ if v != nil {
+ var zones []string
+ err = json.Unmarshal(*v, &zones)
+ if err != nil {
+ return err
+ }
+ dhg.Zones = &zones
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ dhg.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ dhg.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ dhg.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ dhg.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ dhg.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// DedicatedHostGroupListResult the List Dedicated Host Group with resource group response.
+type DedicatedHostGroupListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of dedicated host groups
+ Value *[]DedicatedHostGroup `json:"value,omitempty"`
+ // NextLink - The URI to fetch the next page of Dedicated Host Groups. Call ListNext() with this URI to fetch the next page of Dedicated Host Groups.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// DedicatedHostGroupListResultIterator provides access to a complete listing of DedicatedHostGroup values.
+type DedicatedHostGroupListResultIterator struct {
+ i int
+ page DedicatedHostGroupListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *DedicatedHostGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *DedicatedHostGroupListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter DedicatedHostGroupListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter DedicatedHostGroupListResultIterator) Response() DedicatedHostGroupListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter DedicatedHostGroupListResultIterator) Value() DedicatedHostGroup {
+ if !iter.page.NotDone() {
+ return DedicatedHostGroup{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the DedicatedHostGroupListResultIterator type.
+func NewDedicatedHostGroupListResultIterator(page DedicatedHostGroupListResultPage) DedicatedHostGroupListResultIterator {
+ return DedicatedHostGroupListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (dhglr DedicatedHostGroupListResult) IsEmpty() bool {
+ return dhglr.Value == nil || len(*dhglr.Value) == 0
+}
+
+// dedicatedHostGroupListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (dhglr DedicatedHostGroupListResult) dedicatedHostGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if dhglr.NextLink == nil || len(to.String(dhglr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(dhglr.NextLink)))
+}
+
+// DedicatedHostGroupListResultPage contains a page of DedicatedHostGroup values.
+type DedicatedHostGroupListResultPage struct {
+ fn func(context.Context, DedicatedHostGroupListResult) (DedicatedHostGroupListResult, error)
+ dhglr DedicatedHostGroupListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *DedicatedHostGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.dhglr)
+ if err != nil {
+ return err
+ }
+ page.dhglr = next
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *DedicatedHostGroupListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page DedicatedHostGroupListResultPage) NotDone() bool {
+ return !page.dhglr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page DedicatedHostGroupListResultPage) Response() DedicatedHostGroupListResult {
+ return page.dhglr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page DedicatedHostGroupListResultPage) Values() []DedicatedHostGroup {
+ if page.dhglr.IsEmpty() {
+ return nil
+ }
+ return *page.dhglr.Value
+}
+
+// Creates a new instance of the DedicatedHostGroupListResultPage type.
+func NewDedicatedHostGroupListResultPage(getNextPage func(context.Context, DedicatedHostGroupListResult) (DedicatedHostGroupListResult, error)) DedicatedHostGroupListResultPage {
+ return DedicatedHostGroupListResultPage{fn: getNextPage}
+}
+
+// DedicatedHostGroupProperties dedicated Host Group Properties.
+type DedicatedHostGroupProperties struct {
+ // PlatformFaultDomainCount - Number of fault domains that the host group can span.
+ PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"`
+ // Hosts - READ-ONLY; A list of references to all dedicated hosts in the dedicated host group.
+ Hosts *[]SubResourceReadOnly `json:"hosts,omitempty"`
+}
+
+// DedicatedHostGroupUpdate specifies information about the dedicated host group that the dedicated host
+// should be assigned to. Only tags may be updated.
+type DedicatedHostGroupUpdate struct {
+ *DedicatedHostGroupProperties `json:"properties,omitempty"`
+ // Zones - Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone.
+ Zones *[]string `json:"zones,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for DedicatedHostGroupUpdate.
+func (dhgu DedicatedHostGroupUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if dhgu.DedicatedHostGroupProperties != nil {
+ objectMap["properties"] = dhgu.DedicatedHostGroupProperties
+ }
+ if dhgu.Zones != nil {
+ objectMap["zones"] = dhgu.Zones
+ }
+ if dhgu.Tags != nil {
+ objectMap["tags"] = dhgu.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for DedicatedHostGroupUpdate struct.
+func (dhgu *DedicatedHostGroupUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var dedicatedHostGroupProperties DedicatedHostGroupProperties
+ err = json.Unmarshal(*v, &dedicatedHostGroupProperties)
+ if err != nil {
+ return err
+ }
+ dhgu.DedicatedHostGroupProperties = &dedicatedHostGroupProperties
+ }
+ case "zones":
+ if v != nil {
+ var zones []string
+ err = json.Unmarshal(*v, &zones)
+ if err != nil {
+ return err
+ }
+ dhgu.Zones = &zones
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ dhgu.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// DedicatedHostInstanceView the instance view of a dedicated host.
+type DedicatedHostInstanceView struct {
+ // AssetID - READ-ONLY; Specifies the unique id of the dedicated physical machine on which the dedicated host resides.
+ AssetID *string `json:"assetId,omitempty"`
+ // AvailableCapacity - Unutilized capacity of the dedicated host.
+ AvailableCapacity *DedicatedHostAvailableCapacity `json:"availableCapacity,omitempty"`
+ // Statuses - The resource status information.
+ Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
+}
+
+// DedicatedHostListResult the list dedicated host operation response.
+type DedicatedHostListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of dedicated hosts
+ Value *[]DedicatedHost `json:"value,omitempty"`
+ // NextLink - The URI to fetch the next page of dedicated hosts. Call ListNext() with this URI to fetch the next page of dedicated hosts.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// DedicatedHostListResultIterator provides access to a complete listing of DedicatedHost values.
+type DedicatedHostListResultIterator struct {
+ i int
+ page DedicatedHostListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *DedicatedHostListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *DedicatedHostListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter DedicatedHostListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter DedicatedHostListResultIterator) Response() DedicatedHostListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter DedicatedHostListResultIterator) Value() DedicatedHost {
+ if !iter.page.NotDone() {
+ return DedicatedHost{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the DedicatedHostListResultIterator type.
+func NewDedicatedHostListResultIterator(page DedicatedHostListResultPage) DedicatedHostListResultIterator {
+ return DedicatedHostListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (dhlr DedicatedHostListResult) IsEmpty() bool {
+ return dhlr.Value == nil || len(*dhlr.Value) == 0
+}
+
+// dedicatedHostListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (dhlr DedicatedHostListResult) dedicatedHostListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if dhlr.NextLink == nil || len(to.String(dhlr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(dhlr.NextLink)))
+}
+
+// DedicatedHostListResultPage contains a page of DedicatedHost values.
+type DedicatedHostListResultPage struct {
+ fn func(context.Context, DedicatedHostListResult) (DedicatedHostListResult, error)
+ dhlr DedicatedHostListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *DedicatedHostListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.dhlr)
+ if err != nil {
+ return err
+ }
+ page.dhlr = next
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *DedicatedHostListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page DedicatedHostListResultPage) NotDone() bool {
+ return !page.dhlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page DedicatedHostListResultPage) Response() DedicatedHostListResult {
+ return page.dhlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page DedicatedHostListResultPage) Values() []DedicatedHost {
+ if page.dhlr.IsEmpty() {
+ return nil
+ }
+ return *page.dhlr.Value
+}
+
+// Creates a new instance of the DedicatedHostListResultPage type.
+func NewDedicatedHostListResultPage(getNextPage func(context.Context, DedicatedHostListResult) (DedicatedHostListResult, error)) DedicatedHostListResultPage {
+ return DedicatedHostListResultPage{fn: getNextPage}
+}
+
+// DedicatedHostProperties properties of the dedicated host.
+type DedicatedHostProperties struct {
+ // PlatformFaultDomain - Fault domain of the dedicated host within a dedicated host group.
+ PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"`
+ // AutoReplaceOnFailure - Specifies whether the dedicated host should be replaced automatically in case of a failure. The value is defaulted to 'true' when not provided.
+ AutoReplaceOnFailure *bool `json:"autoReplaceOnFailure,omitempty"`
+ // HostID - READ-ONLY; A unique id generated and assigned to the dedicated host by the platform.
Does not change throughout the lifetime of the host.
+ HostID *string `json:"hostId,omitempty"`
+ // VirtualMachines - READ-ONLY; A list of references to all virtual machines in the Dedicated Host.
+ VirtualMachines *[]SubResourceReadOnly `json:"virtualMachines,omitempty"`
+ // LicenseType - Specifies the software license type that will be applied to the VMs deployed on the dedicated host.
Possible values are:
**None**
**Windows_Server_Hybrid**
**Windows_Server_Perpetual**
Default: **None**. Possible values include: 'DedicatedHostLicenseTypesNone', 'DedicatedHostLicenseTypesWindowsServerHybrid', 'DedicatedHostLicenseTypesWindowsServerPerpetual'
+ LicenseType DedicatedHostLicenseTypes `json:"licenseType,omitempty"`
+ // ProvisioningTime - READ-ONLY; The date when the host was first provisioned.
+ ProvisioningTime *date.Time `json:"provisioningTime,omitempty"`
+ // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // InstanceView - READ-ONLY; The dedicated host instance view.
+ InstanceView *DedicatedHostInstanceView `json:"instanceView,omitempty"`
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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
+}
+
+// DedicatedHostUpdate specifies information about the dedicated host. Only tags, autoReplaceOnFailure and
+// licenseType may be updated.
+type DedicatedHostUpdate struct {
+ *DedicatedHostProperties `json:"properties,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for DedicatedHostUpdate.
+func (dhu DedicatedHostUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if dhu.DedicatedHostProperties != nil {
+ objectMap["properties"] = dhu.DedicatedHostProperties
+ }
+ if dhu.Tags != nil {
+ objectMap["tags"] = dhu.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for DedicatedHostUpdate struct.
+func (dhu *DedicatedHostUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var dedicatedHostProperties DedicatedHostProperties
+ err = json.Unmarshal(*v, &dedicatedHostProperties)
+ if err != nil {
+ return err
+ }
+ dhu.DedicatedHostProperties = &dedicatedHostProperties
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ dhu.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// DiagnosticsProfile specifies the boot diagnostic settings state.
Minimum api-version:
+// 2015-06-15.
+type DiagnosticsProfile struct {
+ // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
You can easily view the output of your console log.
Azure also enables you to see a screenshot of the VM from the hypervisor.
+ BootDiagnostics *BootDiagnostics `json:"bootDiagnostics,omitempty"`
+}
+
+// DiffDiskSettings describes the parameters of ephemeral disk settings that can be specified for operating
+// system disk.
NOTE: The ephemeral disk settings can only be specified for managed disk.
+type DiffDiskSettings struct {
+ // Option - Specifies the ephemeral disk settings for operating system disk. Possible values include: 'Local'
+ Option DiffDiskOptions `json:"option,omitempty"`
+ // Placement - Specifies the ephemeral disk placement for operating system disk.
Possible values are:
**CacheDisk**
**ResourceDisk**
Default: **CacheDisk** if one is configured for the VM size otherwise **ResourceDisk** is used.
Refer to VM size documentation for Windows VM at https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/en-us/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. Possible values include: 'CacheDisk', 'ResourceDisk'
+ Placement DiffDiskPlacement `json:"placement,omitempty"`
+}
+
+// Disallowed describes the disallowed disk types.
+type Disallowed struct {
+ // DiskTypes - A list of disk types.
+ DiskTypes *[]string `json:"diskTypes,omitempty"`
+}
+
+// Disk disk resource.
+type Disk struct {
+ autorest.Response `json:"-"`
+ // ManagedBy - READ-ONLY; A relative URI containing the ID of the VM that has the disk attached.
+ ManagedBy *string `json:"managedBy,omitempty"`
+ // ManagedByExtended - READ-ONLY; List of relative URIs containing the IDs of the VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching them to multiple VMs.
+ ManagedByExtended *[]string `json:"managedByExtended,omitempty"`
+ Sku *DiskSku `json:"sku,omitempty"`
+ // Zones - The Logical zone list for Disk.
+ Zones *[]string `json:"zones,omitempty"`
+ *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 "managedByExtended":
+ if v != nil {
+ var managedByExtended []string
+ err = json.Unmarshal(*v, &managedByExtended)
+ if err != nil {
+ return err
+ }
+ d.ManagedByExtended = &managedByExtended
+ }
+ case "sku":
+ if v != nil {
+ var sku DiskSku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ d.Sku = &sku
+ }
+ case "zones":
+ if v != nil {
+ var zones []string
+ err = json.Unmarshal(*v, &zones)
+ if err != nil {
+ return err
+ }
+ d.Zones = &zones
+ }
+ case "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
+}
+
+// DiskEncryptionSet disk encryption set resource.
+type DiskEncryptionSet struct {
+ autorest.Response `json:"-"`
+ Identity *EncryptionSetIdentity `json:"identity,omitempty"`
+ *EncryptionSetProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for DiskEncryptionSet.
+func (desVar DiskEncryptionSet) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if desVar.Identity != nil {
+ objectMap["identity"] = desVar.Identity
+ }
+ if desVar.EncryptionSetProperties != nil {
+ objectMap["properties"] = desVar.EncryptionSetProperties
+ }
+ if desVar.Location != nil {
+ objectMap["location"] = desVar.Location
+ }
+ if desVar.Tags != nil {
+ objectMap["tags"] = desVar.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for DiskEncryptionSet struct.
+func (desVar *DiskEncryptionSet) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "identity":
+ if v != nil {
+ var identity EncryptionSetIdentity
+ err = json.Unmarshal(*v, &identity)
+ if err != nil {
+ return err
+ }
+ desVar.Identity = &identity
+ }
+ case "properties":
+ if v != nil {
+ var encryptionSetProperties EncryptionSetProperties
+ err = json.Unmarshal(*v, &encryptionSetProperties)
+ if err != nil {
+ return err
+ }
+ desVar.EncryptionSetProperties = &encryptionSetProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ desVar.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ desVar.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ desVar.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ desVar.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ desVar.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// DiskEncryptionSetList the List disk encryption set operation response.
+type DiskEncryptionSetList struct {
+ autorest.Response `json:"-"`
+ // Value - A list of disk encryption sets.
+ Value *[]DiskEncryptionSet `json:"value,omitempty"`
+ // NextLink - The uri to fetch the next page of disk encryption sets. Call ListNext() with this to fetch the next page of disk encryption sets.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// DiskEncryptionSetListIterator provides access to a complete listing of DiskEncryptionSet values.
+type DiskEncryptionSetListIterator struct {
+ i int
+ page DiskEncryptionSetListPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *DiskEncryptionSetListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *DiskEncryptionSetListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter DiskEncryptionSetListIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter DiskEncryptionSetListIterator) Response() DiskEncryptionSetList {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter DiskEncryptionSetListIterator) Value() DiskEncryptionSet {
+ if !iter.page.NotDone() {
+ return DiskEncryptionSet{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the DiskEncryptionSetListIterator type.
+func NewDiskEncryptionSetListIterator(page DiskEncryptionSetListPage) DiskEncryptionSetListIterator {
+ return DiskEncryptionSetListIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (desl DiskEncryptionSetList) IsEmpty() bool {
+ return desl.Value == nil || len(*desl.Value) == 0
+}
+
+// diskEncryptionSetListPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (desl DiskEncryptionSetList) diskEncryptionSetListPreparer(ctx context.Context) (*http.Request, error) {
+ if desl.NextLink == nil || len(to.String(desl.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(desl.NextLink)))
+}
+
+// DiskEncryptionSetListPage contains a page of DiskEncryptionSet values.
+type DiskEncryptionSetListPage struct {
+ fn func(context.Context, DiskEncryptionSetList) (DiskEncryptionSetList, error)
+ desl DiskEncryptionSetList
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *DiskEncryptionSetListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.desl)
+ if err != nil {
+ return err
+ }
+ page.desl = next
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *DiskEncryptionSetListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page DiskEncryptionSetListPage) NotDone() bool {
+ return !page.desl.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page DiskEncryptionSetListPage) Response() DiskEncryptionSetList {
+ return page.desl
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page DiskEncryptionSetListPage) Values() []DiskEncryptionSet {
+ if page.desl.IsEmpty() {
+ return nil
+ }
+ return *page.desl.Value
+}
+
+// Creates a new instance of the DiskEncryptionSetListPage type.
+func NewDiskEncryptionSetListPage(getNextPage func(context.Context, DiskEncryptionSetList) (DiskEncryptionSetList, error)) DiskEncryptionSetListPage {
+ return DiskEncryptionSetListPage{fn: getNextPage}
+}
+
+// DiskEncryptionSetParameters describes the parameter of customer managed disk encryption set resource id
+// that can be specified for disk.
NOTE: The disk encryption set resource id can only be specified
+// for managed disk. Please refer https://aka.ms/mdssewithcmkoverview for more details.
+type DiskEncryptionSetParameters struct {
+ // ID - Resource Id
+ ID *string `json:"id,omitempty"`
+}
+
+// DiskEncryptionSetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type DiskEncryptionSetsCreateOrUpdateFuture struct {
+ azure.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
+}
+
+// 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
+}
+
+// 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
+}
+
+// DiskEncryptionSettings describes a Encryption Settings for a Disk
+type DiskEncryptionSettings struct {
+ // DiskEncryptionKey - Specifies the location of the disk encryption key, which is a Key Vault Secret.
+ DiskEncryptionKey *KeyVaultSecretReference `json:"diskEncryptionKey,omitempty"`
+ // KeyEncryptionKey - Specifies the location of the key encryption key in Key Vault.
+ KeyEncryptionKey *KeyVaultKeyReference `json:"keyEncryptionKey,omitempty"`
+ // Enabled - Specifies whether disk encryption should be enabled on the virtual machine.
+ Enabled *bool `json:"enabled,omitempty"`
+}
+
+// DiskEncryptionSetUpdate disk encryption set update resource.
+type DiskEncryptionSetUpdate struct {
+ *DiskEncryptionSetUpdateProperties `json:"properties,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for DiskEncryptionSetUpdate.
+func (desu DiskEncryptionSetUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if desu.DiskEncryptionSetUpdateProperties != nil {
+ objectMap["properties"] = desu.DiskEncryptionSetUpdateProperties
+ }
+ if desu.Tags != nil {
+ objectMap["tags"] = desu.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for DiskEncryptionSetUpdate struct.
+func (desu *DiskEncryptionSetUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var diskEncryptionSetUpdateProperties DiskEncryptionSetUpdateProperties
+ err = json.Unmarshal(*v, &diskEncryptionSetUpdateProperties)
+ if err != nil {
+ return err
+ }
+ desu.DiskEncryptionSetUpdateProperties = &diskEncryptionSetUpdateProperties
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ desu.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// DiskEncryptionSetUpdateProperties disk encryption set resource update properties.
+type DiskEncryptionSetUpdateProperties struct {
+ ActiveKey *KeyVaultAndKeyReference `json:"activeKey,omitempty"`
+}
+
+// DiskImageEncryption this is the disk image encryption base class.
+type DiskImageEncryption struct {
+ // DiskEncryptionSetID - A relative URI containing the resource ID of the disk encryption set.
+ DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
+}
+
+// DiskInstanceView the instance view of the disk.
+type DiskInstanceView struct {
+ // Name - The disk name.
+ Name *string `json:"name,omitempty"`
+ // EncryptionSettings - Specifies the encryption settings for the OS Disk.
Minimum api-version: 2015-06-15
+ EncryptionSettings *[]DiskEncryptionSettings `json:"encryptionSettings,omitempty"`
+ // Statuses - The resource status information.
+ Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
+}
+
+// DiskList the List Disks operation response.
+type DiskList struct {
+ autorest.Response `json:"-"`
+ // Value - A list of disks.
+ Value *[]Disk `json:"value,omitempty"`
+ // NextLink - The uri to fetch the next page of disks. Call ListNext() with this to fetch the next page of disks.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// DiskListIterator provides access to a complete listing of Disk values.
+type DiskListIterator struct {
+ i int
+ page DiskListPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *DiskListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *DiskListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter DiskListIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter DiskListIterator) Response() DiskList {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter DiskListIterator) Value() Disk {
+ if !iter.page.NotDone() {
+ return Disk{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the DiskListIterator type.
+func NewDiskListIterator(page DiskListPage) DiskListIterator {
+ return DiskListIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (dl DiskList) IsEmpty() bool {
+ return dl.Value == nil || len(*dl.Value) == 0
+}
+
+// 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.NextLink == nil || len(to.String(dl.NextLink)) < 1 {
+ 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)
+ }()
+ }
+ next, err := page.fn(ctx, page.dl)
+ if err != nil {
+ return err
+ }
+ page.dl = next
+ 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(getNextPage func(context.Context, DiskList) (DiskList, error)) DiskListPage {
+ return DiskListPage{fn: getNextPage}
+}
+
+// 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"`
+ // HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2'
+ HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"`
+ // CreationData - Disk source information. CreationData information cannot be changed after the disk has been created.
+ CreationData *CreationData `json:"creationData,omitempty"`
+ // DiskSizeGB - If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.
+ DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
+ // DiskSizeBytes - READ-ONLY; The size of the disk in bytes. This field is read only.
+ DiskSizeBytes *int64 `json:"diskSizeBytes,omitempty"`
+ // UniqueID - READ-ONLY; Unique Guid identifying the resource.
+ UniqueID *string `json:"uniqueId,omitempty"`
+ // EncryptionSettingsCollection - Encryption settings collection used for Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
+ EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"`
+ // ProvisioningState - READ-ONLY; The disk provisioning state.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // DiskIOPSReadWrite - The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes.
+ DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"`
+ // DiskMBpsReadWrite - The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.
+ DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"`
+ // DiskIOPSReadOnly - The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes.
+ DiskIOPSReadOnly *int64 `json:"diskIOPSReadOnly,omitempty"`
+ // DiskMBpsReadOnly - The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.
+ DiskMBpsReadOnly *int64 `json:"diskMBpsReadOnly,omitempty"`
+ // DiskState - READ-ONLY; The state of the disk. Possible values include: 'Unattached', 'Attached', 'Reserved', 'ActiveSAS', 'ReadyToUpload', 'ActiveUpload'
+ DiskState DiskState `json:"diskState,omitempty"`
+ // Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
+ Encryption *Encryption `json:"encryption,omitempty"`
+ // MaxShares - The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time.
+ MaxShares *int32 `json:"maxShares,omitempty"`
+ // ShareInfo - READ-ONLY; Details of the list of all VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching them to multiple VMs.
+ ShareInfo *[]ShareInfoElement `json:"shareInfo,omitempty"`
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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
+}
+
+// DiskSku the disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, or UltraSSD_LRS.
+type DiskSku struct {
+ // Name - The sku name. Possible values include: 'StandardLRS', 'PremiumLRS', 'StandardSSDLRS', 'UltraSSDLRS'
+ Name DiskStorageAccountTypes `json:"name,omitempty"`
+ // Tier - READ-ONLY; The sku tier.
+ Tier *string `json:"tier,omitempty"`
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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 disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.
+ DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
+ // EncryptionSettingsCollection - Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
+ EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"`
+ // DiskIOPSReadWrite - The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes.
+ DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"`
+ // DiskMBpsReadWrite - The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.
+ DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"`
+ // DiskIOPSReadOnly - The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes.
+ DiskIOPSReadOnly *int64 `json:"diskIOPSReadOnly,omitempty"`
+ // DiskMBpsReadOnly - The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.
+ DiskMBpsReadOnly *int64 `json:"diskMBpsReadOnly,omitempty"`
+ // MaxShares - The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time.
+ MaxShares *int32 `json:"maxShares,omitempty"`
+ // Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
+ Encryption *Encryption `json:"encryption,omitempty"`
+}
+
+// Encryption encryption at rest settings for disk or snapshot
+type Encryption struct {
+ // DiskEncryptionSetID - ResourceId of the disk encryption set to use for enabling encryption at rest.
+ DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
+ // Type - The type of key used to encrypt the data of the disk. Possible values include: 'EncryptionAtRestWithPlatformKey', 'EncryptionAtRestWithCustomerKey'
+ Type EncryptionType `json:"type,omitempty"`
+}
+
+// EncryptionImages optional. Allows users to provide customer managed keys for encrypting the OS and data
+// disks in the gallery artifact.
+type EncryptionImages struct {
+ OsDiskImage *OSDiskImageEncryption `json:"osDiskImage,omitempty"`
+ // DataDiskImages - A list of encryption specifications for data disk images.
+ DataDiskImages *[]DataDiskImageEncryption `json:"dataDiskImages,omitempty"`
+}
+
+// EncryptionSetIdentity the managed identity for the disk encryption set. It should be given permission on
+// the key vault before it can be used to encrypt disks.
+type EncryptionSetIdentity struct {
+ // Type - The type of Managed Identity used by the DiskEncryptionSet. Only SystemAssigned is supported. Possible values include: 'SystemAssigned'
+ Type DiskEncryptionSetIdentityType `json:"type,omitempty"`
+ // PrincipalID - READ-ONLY; The object id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-identity-principal-id header in the PUT request if the resource has a systemAssigned(implicit) identity
+ PrincipalID *string `json:"principalId,omitempty"`
+ // TenantID - READ-ONLY; The tenant id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-client-tenant-id header in the PUT request if the resource has a systemAssigned(implicit) identity
+ TenantID *string `json:"tenantId,omitempty"`
+}
+
+// EncryptionSetProperties ...
+type EncryptionSetProperties struct {
+ // ActiveKey - The key vault key which is currently used by this disk encryption set.
+ ActiveKey *KeyVaultAndKeyReference `json:"activeKey,omitempty"`
+ // PreviousKeys - READ-ONLY; A readonly collection of key vault keys previously used by this disk encryption set while a key rotation is in progress. It will be empty if there is no ongoing key rotation.
+ PreviousKeys *[]KeyVaultAndKeyReference `json:"previousKeys,omitempty"`
+ // ProvisioningState - READ-ONLY; The disk encryption set provisioning state.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// EncryptionSettingsCollection encryption settings for disk or snapshot
+type EncryptionSettingsCollection struct {
+ // Enabled - Set this flag to true and provide DiskEncryptionKey and optional KeyEncryptionKey to enable encryption. Set this flag to false and remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If EncryptionSettings is null in the request object, the existing settings remain unchanged.
+ Enabled *bool `json:"enabled,omitempty"`
+ // EncryptionSettings - A collection of encryption settings, one for each disk volume.
+ EncryptionSettings *[]EncryptionSettingsElement `json:"encryptionSettings,omitempty"`
+ // EncryptionSettingsVersion - Describes what type of encryption is used for the disks. Once this field is set, it cannot be overwritten. '1.0' corresponds to Azure Disk Encryption with AAD app.'1.1' corresponds to Azure Disk Encryption.
+ EncryptionSettingsVersion *string `json:"encryptionSettingsVersion,omitempty"`
+}
+
+// EncryptionSettingsElement encryption settings for one disk volume.
+type EncryptionSettingsElement struct {
+ // DiskEncryptionKey - Key Vault Secret Url and vault id of the disk encryption key
+ DiskEncryptionKey *KeyVaultAndSecretReference `json:"diskEncryptionKey,omitempty"`
+ // KeyEncryptionKey - Key Vault Key Url and vault id of the key encryption key. KeyEncryptionKey is optional and when provided is used to unwrap the disk encryption key.
+ KeyEncryptionKey *KeyVaultAndKeyReference `json:"keyEncryptionKey,omitempty"`
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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
+}
+
+// Gallery specifies information about the Shared Image Gallery that you want to create or update.
+type Gallery struct {
+ autorest.Response `json:"-"`
+ *GalleryProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for Gallery.
+func (g Gallery) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if g.GalleryProperties != nil {
+ objectMap["properties"] = g.GalleryProperties
+ }
+ if g.Location != nil {
+ objectMap["location"] = g.Location
+ }
+ if g.Tags != nil {
+ objectMap["tags"] = g.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Gallery struct.
+func (g *Gallery) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var galleryProperties GalleryProperties
+ err = json.Unmarshal(*v, &galleryProperties)
+ if err != nil {
+ return err
+ }
+ g.GalleryProperties = &galleryProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ g.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ g.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ g.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ g.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ g.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// GalleryApplication specifies information about the gallery Application Definition that you want to
+// create or update.
+type GalleryApplication struct {
+ autorest.Response `json:"-"`
+ *GalleryApplicationProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for GalleryApplication.
+func (ga GalleryApplication) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ga.GalleryApplicationProperties != nil {
+ objectMap["properties"] = ga.GalleryApplicationProperties
+ }
+ if ga.Location != nil {
+ objectMap["location"] = ga.Location
+ }
+ if ga.Tags != nil {
+ objectMap["tags"] = ga.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for GalleryApplication struct.
+func (ga *GalleryApplication) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var galleryApplicationProperties GalleryApplicationProperties
+ err = json.Unmarshal(*v, &galleryApplicationProperties)
+ if err != nil {
+ return err
+ }
+ ga.GalleryApplicationProperties = &galleryApplicationProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ ga.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ ga.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ ga.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ ga.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ ga.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// GalleryApplicationList the List Gallery Applications operation response.
+type GalleryApplicationList struct {
+ autorest.Response `json:"-"`
+ // Value - A list of Gallery Applications.
+ Value *[]GalleryApplication `json:"value,omitempty"`
+ // NextLink - The uri to fetch the next page of Application Definitions in the Application Gallery. Call ListNext() with this to fetch the next page of gallery Application Definitions.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// GalleryApplicationListIterator provides access to a complete listing of GalleryApplication values.
+type GalleryApplicationListIterator struct {
+ i int
+ page GalleryApplicationListPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *GalleryApplicationListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *GalleryApplicationListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter GalleryApplicationListIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter GalleryApplicationListIterator) Response() GalleryApplicationList {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter GalleryApplicationListIterator) Value() GalleryApplication {
+ if !iter.page.NotDone() {
+ return GalleryApplication{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the GalleryApplicationListIterator type.
+func NewGalleryApplicationListIterator(page GalleryApplicationListPage) GalleryApplicationListIterator {
+ return GalleryApplicationListIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (gal GalleryApplicationList) IsEmpty() bool {
+ return gal.Value == nil || len(*gal.Value) == 0
+}
+
+// galleryApplicationListPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (gal GalleryApplicationList) galleryApplicationListPreparer(ctx context.Context) (*http.Request, error) {
+ if gal.NextLink == nil || len(to.String(gal.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(gal.NextLink)))
+}
+
+// GalleryApplicationListPage contains a page of GalleryApplication values.
+type GalleryApplicationListPage struct {
+ fn func(context.Context, GalleryApplicationList) (GalleryApplicationList, error)
+ gal GalleryApplicationList
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *GalleryApplicationListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.gal)
+ if err != nil {
+ return err
+ }
+ page.gal = next
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *GalleryApplicationListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page GalleryApplicationListPage) NotDone() bool {
+ return !page.gal.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page GalleryApplicationListPage) Response() GalleryApplicationList {
+ return page.gal
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page GalleryApplicationListPage) Values() []GalleryApplication {
+ if page.gal.IsEmpty() {
+ return nil
+ }
+ return *page.gal.Value
+}
+
+// Creates a new instance of the GalleryApplicationListPage type.
+func NewGalleryApplicationListPage(getNextPage func(context.Context, GalleryApplicationList) (GalleryApplicationList, error)) GalleryApplicationListPage {
+ return GalleryApplicationListPage{fn: getNextPage}
+}
+
+// GalleryApplicationProperties describes the properties of a gallery Application Definition.
+type GalleryApplicationProperties struct {
+ // Description - The description of this gallery Application Definition resource. This property is updatable.
+ Description *string `json:"description,omitempty"`
+ // Eula - The Eula agreement for the gallery Application Definition.
+ Eula *string `json:"eula,omitempty"`
+ // PrivacyStatementURI - The privacy statement uri.
+ PrivacyStatementURI *string `json:"privacyStatementUri,omitempty"`
+ // ReleaseNoteURI - The release note uri.
+ ReleaseNoteURI *string `json:"releaseNoteUri,omitempty"`
+ // EndOfLifeDate - The end of life date of the gallery Application Definition. This property can be used for decommissioning purposes. This property is updatable.
+ EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
+ // SupportedOSType - This property allows you to specify the supported type of the OS that application is built for.
Possible values are:
**Windows**
**Linux**. Possible values include: 'Windows', 'Linux'
+ SupportedOSType OperatingSystemTypes `json:"supportedOSType,omitempty"`
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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
+}
+
+// GalleryApplicationUpdate specifies information about the gallery Application Definition that you want to
+// update.
+type GalleryApplicationUpdate struct {
+ *GalleryApplicationProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for GalleryApplicationUpdate.
+func (gau GalleryApplicationUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if gau.GalleryApplicationProperties != nil {
+ objectMap["properties"] = gau.GalleryApplicationProperties
+ }
+ if gau.Tags != nil {
+ objectMap["tags"] = gau.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for GalleryApplicationUpdate struct.
+func (gau *GalleryApplicationUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var galleryApplicationProperties GalleryApplicationProperties
+ err = json.Unmarshal(*v, &galleryApplicationProperties)
+ if err != nil {
+ return err
+ }
+ gau.GalleryApplicationProperties = &galleryApplicationProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ gau.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ gau.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ gau.Type = &typeVar
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ gau.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// GalleryApplicationVersion specifies information about the gallery Application Version that you want to
+// create or update.
+type GalleryApplicationVersion struct {
+ autorest.Response `json:"-"`
+ *GalleryApplicationVersionProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for GalleryApplicationVersion.
+func (gav GalleryApplicationVersion) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if gav.GalleryApplicationVersionProperties != nil {
+ objectMap["properties"] = gav.GalleryApplicationVersionProperties
+ }
+ if gav.Location != nil {
+ objectMap["location"] = gav.Location
+ }
+ if gav.Tags != nil {
+ objectMap["tags"] = gav.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for GalleryApplicationVersion struct.
+func (gav *GalleryApplicationVersion) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var galleryApplicationVersionProperties GalleryApplicationVersionProperties
+ err = json.Unmarshal(*v, &galleryApplicationVersionProperties)
+ if err != nil {
+ return err
+ }
+ gav.GalleryApplicationVersionProperties = &galleryApplicationVersionProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ gav.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ gav.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ gav.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ gav.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ gav.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// GalleryApplicationVersionList the List Gallery Application version operation response.
+type GalleryApplicationVersionList struct {
+ autorest.Response `json:"-"`
+ // Value - A list of gallery Application Versions.
+ Value *[]GalleryApplicationVersion `json:"value,omitempty"`
+ // NextLink - The uri to fetch the next page of gallery Application Versions. Call ListNext() with this to fetch the next page of gallery Application Versions.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// GalleryApplicationVersionListIterator provides access to a complete listing of GalleryApplicationVersion
+// values.
+type GalleryApplicationVersionListIterator struct {
+ i int
+ page GalleryApplicationVersionListPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *GalleryApplicationVersionListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *GalleryApplicationVersionListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter GalleryApplicationVersionListIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter GalleryApplicationVersionListIterator) Response() GalleryApplicationVersionList {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter GalleryApplicationVersionListIterator) Value() GalleryApplicationVersion {
+ if !iter.page.NotDone() {
+ return GalleryApplicationVersion{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the GalleryApplicationVersionListIterator type.
+func NewGalleryApplicationVersionListIterator(page GalleryApplicationVersionListPage) GalleryApplicationVersionListIterator {
+ return GalleryApplicationVersionListIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (gavl GalleryApplicationVersionList) IsEmpty() bool {
+ return gavl.Value == nil || len(*gavl.Value) == 0
+}
+
+// galleryApplicationVersionListPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (gavl GalleryApplicationVersionList) galleryApplicationVersionListPreparer(ctx context.Context) (*http.Request, error) {
+ if gavl.NextLink == nil || len(to.String(gavl.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(gavl.NextLink)))
+}
+
+// GalleryApplicationVersionListPage contains a page of GalleryApplicationVersion values.
+type GalleryApplicationVersionListPage struct {
+ fn func(context.Context, GalleryApplicationVersionList) (GalleryApplicationVersionList, error)
+ gavl GalleryApplicationVersionList
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *GalleryApplicationVersionListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.gavl)
+ if err != nil {
+ return err
+ }
+ page.gavl = next
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *GalleryApplicationVersionListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page GalleryApplicationVersionListPage) NotDone() bool {
+ return !page.gavl.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page GalleryApplicationVersionListPage) Response() GalleryApplicationVersionList {
+ return page.gavl
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page GalleryApplicationVersionListPage) Values() []GalleryApplicationVersion {
+ if page.gavl.IsEmpty() {
+ return nil
+ }
+ return *page.gavl.Value
+}
+
+// Creates a new instance of the GalleryApplicationVersionListPage type.
+func NewGalleryApplicationVersionListPage(getNextPage func(context.Context, GalleryApplicationVersionList) (GalleryApplicationVersionList, error)) GalleryApplicationVersionListPage {
+ return GalleryApplicationVersionListPage{fn: getNextPage}
+}
+
+// GalleryApplicationVersionProperties describes the properties of a gallery Image Version.
+type GalleryApplicationVersionProperties struct {
+ PublishingProfile *GalleryApplicationVersionPublishingProfile `json:"publishingProfile,omitempty"`
+ // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningState1Creating', 'ProvisioningState1Updating', 'ProvisioningState1Failed', 'ProvisioningState1Succeeded', 'ProvisioningState1Deleting', 'ProvisioningState1Migrating'
+ ProvisioningState ProvisioningState1 `json:"provisioningState,omitempty"`
+ // ReplicationStatus - READ-ONLY
+ ReplicationStatus *ReplicationStatus `json:"replicationStatus,omitempty"`
+}
+
+// GalleryApplicationVersionPublishingProfile the publishing profile of a gallery Image Version.
+type GalleryApplicationVersionPublishingProfile struct {
+ Source *UserArtifactSource `json:"source,omitempty"`
+ // ContentType - Optional. May be used to help process this file. The type of file contained in the source, e.g. zip, json, etc.
+ ContentType *string `json:"contentType,omitempty"`
+ // EnableHealthCheck - Optional. Whether or not this application reports health.
+ EnableHealthCheck *bool `json:"enableHealthCheck,omitempty"`
+ // TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updatable.
+ TargetRegions *[]TargetRegion `json:"targetRegions,omitempty"`
+ // ReplicaCount - The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable.
+ ReplicaCount *int32 `json:"replicaCount,omitempty"`
+ // ExcludeFromLatest - If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
+ ExcludeFromLatest *bool `json:"excludeFromLatest,omitempty"`
+ // PublishedDate - READ-ONLY; The timestamp for when the gallery Image Version is published.
+ PublishedDate *date.Time `json:"publishedDate,omitempty"`
+ // EndOfLifeDate - The end of life date of the gallery Image Version. This property can be used for decommissioning purposes. This property is updatable.
+ EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
+ // StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS'
+ StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"`
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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
+}
+
+// GalleryApplicationVersionUpdate specifies information about the gallery Application Version that you
+// want to update.
+type GalleryApplicationVersionUpdate struct {
+ *GalleryApplicationVersionProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for GalleryApplicationVersionUpdate.
+func (gavu GalleryApplicationVersionUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if gavu.GalleryApplicationVersionProperties != nil {
+ objectMap["properties"] = gavu.GalleryApplicationVersionProperties
+ }
+ if gavu.Tags != nil {
+ objectMap["tags"] = gavu.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for GalleryApplicationVersionUpdate struct.
+func (gavu *GalleryApplicationVersionUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var galleryApplicationVersionProperties GalleryApplicationVersionProperties
+ err = json.Unmarshal(*v, &galleryApplicationVersionProperties)
+ if err != nil {
+ return err
+ }
+ gavu.GalleryApplicationVersionProperties = &galleryApplicationVersionProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ gavu.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ gavu.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ gavu.Type = &typeVar
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ gavu.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// GalleryArtifactPublishingProfileBase describes the basic gallery artifact publishing profile.
+type GalleryArtifactPublishingProfileBase struct {
+ // TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updatable.
+ TargetRegions *[]TargetRegion `json:"targetRegions,omitempty"`
+ // ReplicaCount - The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable.
+ ReplicaCount *int32 `json:"replicaCount,omitempty"`
+ // ExcludeFromLatest - If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
+ ExcludeFromLatest *bool `json:"excludeFromLatest,omitempty"`
+ // PublishedDate - READ-ONLY; The timestamp for when the gallery Image Version is published.
+ PublishedDate *date.Time `json:"publishedDate,omitempty"`
+ // EndOfLifeDate - The end of life date of the gallery Image Version. This property can be used for decommissioning purposes. This property is updatable.
+ EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
+ // StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS'
+ StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"`
+}
+
+// GalleryArtifactSource the source image from which the Image Version is going to be created.
+type GalleryArtifactSource struct {
+ ManagedImage *ManagedArtifact `json:"managedImage,omitempty"`
+}
+
+// GalleryArtifactVersionSource the gallery artifact version source.
+type GalleryArtifactVersionSource struct {
+ // ID - The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, or user image.
+ ID *string `json:"id,omitempty"`
+}
+
+// GalleryDataDiskImage this is the data disk image.
+type GalleryDataDiskImage struct {
+ // Lun - This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine.
+ Lun *int32 `json:"lun,omitempty"`
+ // SizeInGB - READ-ONLY; This property indicates the size of the VHD to be created.
+ SizeInGB *int32 `json:"sizeInGB,omitempty"`
+ // HostCaching - The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'HostCachingNone', 'HostCachingReadOnly', 'HostCachingReadWrite'
+ HostCaching HostCaching `json:"hostCaching,omitempty"`
+ Source *GalleryArtifactVersionSource `json:"source,omitempty"`
+}
+
+// GalleryDiskImage this is the disk image base class.
+type GalleryDiskImage struct {
+ // SizeInGB - READ-ONLY; This property indicates the size of the VHD to be created.
+ SizeInGB *int32 `json:"sizeInGB,omitempty"`
+ // HostCaching - The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'HostCachingNone', 'HostCachingReadOnly', 'HostCachingReadWrite'
+ HostCaching HostCaching `json:"hostCaching,omitempty"`
+ Source *GalleryArtifactVersionSource `json:"source,omitempty"`
+}
+
+// GalleryIdentifier describes the gallery unique name.
+type GalleryIdentifier struct {
+ // UniqueName - READ-ONLY; The unique name of the Shared Image Gallery. This name is generated automatically by Azure.
+ UniqueName *string `json:"uniqueName,omitempty"`
+}
+
+// GalleryImage specifies information about the gallery Image Definition that you want to create or update.
+type GalleryImage struct {
+ autorest.Response `json:"-"`
+ *GalleryImageProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for GalleryImage.
+func (gi GalleryImage) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if gi.GalleryImageProperties != nil {
+ objectMap["properties"] = gi.GalleryImageProperties
+ }
+ if gi.Location != nil {
+ objectMap["location"] = gi.Location
+ }
+ if gi.Tags != nil {
+ objectMap["tags"] = gi.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for GalleryImage struct.
+func (gi *GalleryImage) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var galleryImageProperties GalleryImageProperties
+ err = json.Unmarshal(*v, &galleryImageProperties)
+ if err != nil {
+ return err
+ }
+ gi.GalleryImageProperties = &galleryImageProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ gi.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ gi.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ gi.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ gi.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ gi.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// GalleryImageIdentifier this is the gallery Image Definition identifier.
+type GalleryImageIdentifier struct {
+ // Publisher - The name of the gallery Image Definition publisher.
+ Publisher *string `json:"publisher,omitempty"`
+ // Offer - The name of the gallery Image Definition offer.
+ Offer *string `json:"offer,omitempty"`
+ // Sku - The name of the gallery Image Definition SKU.
+ Sku *string `json:"sku,omitempty"`
+}
+
+// GalleryImageList the List Gallery Images operation response.
+type GalleryImageList struct {
+ autorest.Response `json:"-"`
+ // Value - A list of Shared Image Gallery images.
+ Value *[]GalleryImage `json:"value,omitempty"`
+ // NextLink - The uri to fetch the next page of Image Definitions in the Shared Image Gallery. Call ListNext() with this to fetch the next page of gallery Image Definitions.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// GalleryImageListIterator provides access to a complete listing of GalleryImage values.
+type GalleryImageListIterator struct {
+ i int
+ page GalleryImageListPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *GalleryImageListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *GalleryImageListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter GalleryImageListIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter GalleryImageListIterator) Response() GalleryImageList {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter GalleryImageListIterator) Value() GalleryImage {
+ if !iter.page.NotDone() {
+ return GalleryImage{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the GalleryImageListIterator type.
+func NewGalleryImageListIterator(page GalleryImageListPage) GalleryImageListIterator {
+ return GalleryImageListIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (gil GalleryImageList) IsEmpty() bool {
+ return gil.Value == nil || len(*gil.Value) == 0
+}
+
+// galleryImageListPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (gil GalleryImageList) galleryImageListPreparer(ctx context.Context) (*http.Request, error) {
+ if gil.NextLink == nil || len(to.String(gil.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(gil.NextLink)))
+}
+
+// GalleryImageListPage contains a page of GalleryImage values.
+type GalleryImageListPage struct {
+ fn func(context.Context, GalleryImageList) (GalleryImageList, error)
+ gil GalleryImageList
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *GalleryImageListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.gil)
+ if err != nil {
+ return err
+ }
+ page.gil = next
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *GalleryImageListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page GalleryImageListPage) NotDone() bool {
+ return !page.gil.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page GalleryImageListPage) Response() GalleryImageList {
+ return page.gil
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page GalleryImageListPage) Values() []GalleryImage {
+ if page.gil.IsEmpty() {
+ return nil
+ }
+ return *page.gil.Value
+}
+
+// Creates a new instance of the GalleryImageListPage type.
+func NewGalleryImageListPage(getNextPage func(context.Context, GalleryImageList) (GalleryImageList, error)) GalleryImageListPage {
+ return GalleryImageListPage{fn: getNextPage}
+}
+
+// GalleryImageProperties describes the properties of a gallery Image Definition.
+type GalleryImageProperties struct {
+ // Description - The description of this gallery Image Definition resource. This property is updatable.
+ Description *string `json:"description,omitempty"`
+ // Eula - The Eula agreement for the gallery Image Definition.
+ Eula *string `json:"eula,omitempty"`
+ // PrivacyStatementURI - The privacy statement uri.
+ PrivacyStatementURI *string `json:"privacyStatementUri,omitempty"`
+ // ReleaseNoteURI - The release note uri.
+ ReleaseNoteURI *string `json:"releaseNoteUri,omitempty"`
+ // OsType - This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image.
Possible values are:
**Windows**
**Linux**. Possible values include: 'Windows', 'Linux'
+ OsType OperatingSystemTypes `json:"osType,omitempty"`
+ // OsState - This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'. Possible values include: 'Generalized', 'Specialized'
+ OsState OperatingSystemStateTypes `json:"osState,omitempty"`
+ // HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2'
+ HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"`
+ // EndOfLifeDate - The end of life date of the gallery Image Definition. This property can be used for decommissioning purposes. This property is updatable.
+ EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
+ Identifier *GalleryImageIdentifier `json:"identifier,omitempty"`
+ Recommended *RecommendedMachineConfiguration `json:"recommended,omitempty"`
+ Disallowed *Disallowed `json:"disallowed,omitempty"`
+ PurchasePlan *ImagePurchasePlan `json:"purchasePlan,omitempty"`
+ // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningState2Creating', 'ProvisioningState2Updating', 'ProvisioningState2Failed', 'ProvisioningState2Succeeded', 'ProvisioningState2Deleting', 'ProvisioningState2Migrating'
+ ProvisioningState ProvisioningState2 `json:"provisioningState,omitempty"`
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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
+}
+
+// GalleryImageUpdate specifies information about the gallery Image Definition that you want to update.
+type GalleryImageUpdate struct {
+ *GalleryImageProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for GalleryImageUpdate.
+func (giu GalleryImageUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if giu.GalleryImageProperties != nil {
+ objectMap["properties"] = giu.GalleryImageProperties
+ }
+ if giu.Tags != nil {
+ objectMap["tags"] = giu.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for GalleryImageUpdate struct.
+func (giu *GalleryImageUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var galleryImageProperties GalleryImageProperties
+ err = json.Unmarshal(*v, &galleryImageProperties)
+ if err != nil {
+ return err
+ }
+ giu.GalleryImageProperties = &galleryImageProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ giu.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ giu.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ giu.Type = &typeVar
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ giu.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// GalleryImageVersion specifies information about the gallery Image Version that you want to create or
+// update.
+type GalleryImageVersion struct {
+ autorest.Response `json:"-"`
+ *GalleryImageVersionProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for GalleryImageVersion.
+func (giv GalleryImageVersion) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if giv.GalleryImageVersionProperties != nil {
+ objectMap["properties"] = giv.GalleryImageVersionProperties
+ }
+ if giv.Location != nil {
+ objectMap["location"] = giv.Location
+ }
+ if giv.Tags != nil {
+ objectMap["tags"] = giv.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for GalleryImageVersion struct.
+func (giv *GalleryImageVersion) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var galleryImageVersionProperties GalleryImageVersionProperties
+ err = json.Unmarshal(*v, &galleryImageVersionProperties)
+ if err != nil {
+ return err
+ }
+ giv.GalleryImageVersionProperties = &galleryImageVersionProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ giv.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ giv.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ giv.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ giv.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ giv.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// GalleryImageVersionList the List Gallery Image version operation response.
+type GalleryImageVersionList struct {
+ autorest.Response `json:"-"`
+ // Value - A list of gallery Image Versions.
+ Value *[]GalleryImageVersion `json:"value,omitempty"`
+ // NextLink - The uri to fetch the next page of gallery Image Versions. Call ListNext() with this to fetch the next page of gallery Image Versions.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// GalleryImageVersionListIterator provides access to a complete listing of GalleryImageVersion values.
+type GalleryImageVersionListIterator struct {
+ i int
+ page GalleryImageVersionListPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *GalleryImageVersionListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *GalleryImageVersionListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter GalleryImageVersionListIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter GalleryImageVersionListIterator) Response() GalleryImageVersionList {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter GalleryImageVersionListIterator) Value() GalleryImageVersion {
+ if !iter.page.NotDone() {
+ return GalleryImageVersion{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the GalleryImageVersionListIterator type.
+func NewGalleryImageVersionListIterator(page GalleryImageVersionListPage) GalleryImageVersionListIterator {
+ return GalleryImageVersionListIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (givl GalleryImageVersionList) IsEmpty() bool {
+ return givl.Value == nil || len(*givl.Value) == 0
+}
+
+// galleryImageVersionListPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (givl GalleryImageVersionList) galleryImageVersionListPreparer(ctx context.Context) (*http.Request, error) {
+ if givl.NextLink == nil || len(to.String(givl.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(givl.NextLink)))
+}
+
+// GalleryImageVersionListPage contains a page of GalleryImageVersion values.
+type GalleryImageVersionListPage struct {
+ fn func(context.Context, GalleryImageVersionList) (GalleryImageVersionList, error)
+ givl GalleryImageVersionList
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *GalleryImageVersionListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.givl)
+ if err != nil {
+ return err
+ }
+ page.givl = next
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *GalleryImageVersionListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page GalleryImageVersionListPage) NotDone() bool {
+ return !page.givl.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page GalleryImageVersionListPage) Response() GalleryImageVersionList {
+ return page.givl
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page GalleryImageVersionListPage) Values() []GalleryImageVersion {
+ if page.givl.IsEmpty() {
+ return nil
+ }
+ return *page.givl.Value
+}
+
+// Creates a new instance of the GalleryImageVersionListPage type.
+func NewGalleryImageVersionListPage(getNextPage func(context.Context, GalleryImageVersionList) (GalleryImageVersionList, error)) GalleryImageVersionListPage {
+ return GalleryImageVersionListPage{fn: getNextPage}
+}
+
+// GalleryImageVersionProperties describes the properties of a gallery Image Version.
+type GalleryImageVersionProperties struct {
+ PublishingProfile *GalleryImageVersionPublishingProfile `json:"publishingProfile,omitempty"`
+ // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningState3Creating', 'ProvisioningState3Updating', 'ProvisioningState3Failed', 'ProvisioningState3Succeeded', 'ProvisioningState3Deleting', 'ProvisioningState3Migrating'
+ ProvisioningState ProvisioningState3 `json:"provisioningState,omitempty"`
+ StorageProfile *GalleryImageVersionStorageProfile `json:"storageProfile,omitempty"`
+ // ReplicationStatus - READ-ONLY
+ ReplicationStatus *ReplicationStatus `json:"replicationStatus,omitempty"`
+}
+
+// GalleryImageVersionPublishingProfile the publishing profile of a gallery Image Version.
+type GalleryImageVersionPublishingProfile struct {
+ // TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updatable.
+ TargetRegions *[]TargetRegion `json:"targetRegions,omitempty"`
+ // ReplicaCount - The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable.
+ ReplicaCount *int32 `json:"replicaCount,omitempty"`
+ // ExcludeFromLatest - If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
+ ExcludeFromLatest *bool `json:"excludeFromLatest,omitempty"`
+ // PublishedDate - READ-ONLY; The timestamp for when the gallery Image Version is published.
+ PublishedDate *date.Time `json:"publishedDate,omitempty"`
+ // EndOfLifeDate - The end of life date of the gallery Image Version. This property can be used for decommissioning purposes. This property is updatable.
+ EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
+ // StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS'
+ StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"`
+}
+
+// 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
+}
+
+// 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
+}
+
+// GalleryImageVersionStorageProfile this is the storage profile of a Gallery Image Version.
+type GalleryImageVersionStorageProfile struct {
+ Source *GalleryArtifactVersionSource `json:"source,omitempty"`
+ OsDiskImage *GalleryOSDiskImage `json:"osDiskImage,omitempty"`
+ // DataDiskImages - A list of data disk images.
+ DataDiskImages *[]GalleryDataDiskImage `json:"dataDiskImages,omitempty"`
+}
+
+// GalleryImageVersionsUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type GalleryImageVersionsUpdateFuture struct {
+ azure.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
+}
+
+// GalleryImageVersionUpdate specifies information about the gallery Image Version that you want to update.
+type GalleryImageVersionUpdate struct {
+ *GalleryImageVersionProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for GalleryImageVersionUpdate.
+func (givu GalleryImageVersionUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if givu.GalleryImageVersionProperties != nil {
+ objectMap["properties"] = givu.GalleryImageVersionProperties
+ }
+ if givu.Tags != nil {
+ objectMap["tags"] = givu.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for GalleryImageVersionUpdate struct.
+func (givu *GalleryImageVersionUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var galleryImageVersionProperties GalleryImageVersionProperties
+ err = json.Unmarshal(*v, &galleryImageVersionProperties)
+ if err != nil {
+ return err
+ }
+ givu.GalleryImageVersionProperties = &galleryImageVersionProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ givu.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ givu.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ givu.Type = &typeVar
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ givu.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// GalleryList the List Galleries operation response.
+type GalleryList struct {
+ autorest.Response `json:"-"`
+ // Value - A list of galleries.
+ Value *[]Gallery `json:"value,omitempty"`
+ // NextLink - The uri to fetch the next page of galleries. Call ListNext() with this to fetch the next page of galleries.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// GalleryListIterator provides access to a complete listing of Gallery values.
+type GalleryListIterator struct {
+ i int
+ page GalleryListPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *GalleryListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *GalleryListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter GalleryListIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter GalleryListIterator) Response() GalleryList {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter GalleryListIterator) Value() Gallery {
+ if !iter.page.NotDone() {
+ return Gallery{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the GalleryListIterator type.
+func NewGalleryListIterator(page GalleryListPage) GalleryListIterator {
+ return GalleryListIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (gl GalleryList) IsEmpty() bool {
+ return gl.Value == nil || len(*gl.Value) == 0
+}
+
+// galleryListPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (gl GalleryList) galleryListPreparer(ctx context.Context) (*http.Request, error) {
+ if gl.NextLink == nil || len(to.String(gl.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(gl.NextLink)))
+}
+
+// GalleryListPage contains a page of Gallery values.
+type GalleryListPage struct {
+ fn func(context.Context, GalleryList) (GalleryList, error)
+ gl GalleryList
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *GalleryListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.gl)
+ if err != nil {
+ return err
+ }
+ page.gl = next
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *GalleryListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page GalleryListPage) NotDone() bool {
+ return !page.gl.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page GalleryListPage) Response() GalleryList {
+ return page.gl
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page GalleryListPage) Values() []Gallery {
+ if page.gl.IsEmpty() {
+ return nil
+ }
+ return *page.gl.Value
+}
+
+// Creates a new instance of the GalleryListPage type.
+func NewGalleryListPage(getNextPage func(context.Context, GalleryList) (GalleryList, error)) GalleryListPage {
+ return GalleryListPage{fn: getNextPage}
+}
+
+// GalleryOSDiskImage this is the OS disk image.
+type GalleryOSDiskImage struct {
+ // SizeInGB - READ-ONLY; This property indicates the size of the VHD to be created.
+ SizeInGB *int32 `json:"sizeInGB,omitempty"`
+ // HostCaching - The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'HostCachingNone', 'HostCachingReadOnly', 'HostCachingReadWrite'
+ HostCaching HostCaching `json:"hostCaching,omitempty"`
+ Source *GalleryArtifactVersionSource `json:"source,omitempty"`
+}
+
+// GalleryProperties describes the properties of a Shared Image Gallery.
+type GalleryProperties struct {
+ // Description - The description of this Shared Image Gallery resource. This property is updatable.
+ Description *string `json:"description,omitempty"`
+ Identifier *GalleryIdentifier `json:"identifier,omitempty"`
+ // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningStateCreating', 'ProvisioningStateUpdating', 'ProvisioningStateFailed', 'ProvisioningStateSucceeded', 'ProvisioningStateDeleting', 'ProvisioningStateMigrating'
+ ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
+}
+
+// GalleryUpdate specifies information about the Shared Image Gallery that you want to update.
+type GalleryUpdate struct {
+ *GalleryProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for GalleryUpdate.
+func (gu GalleryUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if gu.GalleryProperties != nil {
+ objectMap["properties"] = gu.GalleryProperties
+ }
+ if gu.Tags != nil {
+ objectMap["tags"] = gu.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for GalleryUpdate struct.
+func (gu *GalleryUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var galleryProperties GalleryProperties
+ err = json.Unmarshal(*v, &galleryProperties)
+ if err != nil {
+ return err
+ }
+ gu.GalleryProperties = &galleryProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ gu.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ gu.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ gu.Type = &typeVar
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ gu.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// GrantAccessData data used for requesting a SAS.
+type GrantAccessData struct {
+ // Access - Possible values include: 'None', 'Read', 'Write'
+ 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: 'VirtualMachineSizeTypesBasicA0', 'VirtualMachineSizeTypesBasicA1', 'VirtualMachineSizeTypesBasicA2', 'VirtualMachineSizeTypesBasicA3', 'VirtualMachineSizeTypesBasicA4', 'VirtualMachineSizeTypesStandardA0', 'VirtualMachineSizeTypesStandardA1', 'VirtualMachineSizeTypesStandardA2', 'VirtualMachineSizeTypesStandardA3', 'VirtualMachineSizeTypesStandardA4', 'VirtualMachineSizeTypesStandardA5', 'VirtualMachineSizeTypesStandardA6', 'VirtualMachineSizeTypesStandardA7', 'VirtualMachineSizeTypesStandardA8', 'VirtualMachineSizeTypesStandardA9', 'VirtualMachineSizeTypesStandardA10', 'VirtualMachineSizeTypesStandardA11', 'VirtualMachineSizeTypesStandardA1V2', 'VirtualMachineSizeTypesStandardA2V2', 'VirtualMachineSizeTypesStandardA4V2', 'VirtualMachineSizeTypesStandardA8V2', 'VirtualMachineSizeTypesStandardA2mV2', 'VirtualMachineSizeTypesStandardA4mV2', 'VirtualMachineSizeTypesStandardA8mV2', 'VirtualMachineSizeTypesStandardB1s', 'VirtualMachineSizeTypesStandardB1ms', 'VirtualMachineSizeTypesStandardB2s', 'VirtualMachineSizeTypesStandardB2ms', 'VirtualMachineSizeTypesStandardB4ms', 'VirtualMachineSizeTypesStandardB8ms', 'VirtualMachineSizeTypesStandardD1', 'VirtualMachineSizeTypesStandardD2', 'VirtualMachineSizeTypesStandardD3', 'VirtualMachineSizeTypesStandardD4', 'VirtualMachineSizeTypesStandardD11', 'VirtualMachineSizeTypesStandardD12', 'VirtualMachineSizeTypesStandardD13', 'VirtualMachineSizeTypesStandardD14', 'VirtualMachineSizeTypesStandardD1V2', 'VirtualMachineSizeTypesStandardD2V2', 'VirtualMachineSizeTypesStandardD3V2', 'VirtualMachineSizeTypesStandardD4V2', 'VirtualMachineSizeTypesStandardD5V2', 'VirtualMachineSizeTypesStandardD2V3', 'VirtualMachineSizeTypesStandardD4V3', 'VirtualMachineSizeTypesStandardD8V3', 'VirtualMachineSizeTypesStandardD16V3', 'VirtualMachineSizeTypesStandardD32V3', 'VirtualMachineSizeTypesStandardD64V3', 'VirtualMachineSizeTypesStandardD2sV3', 'VirtualMachineSizeTypesStandardD4sV3', 'VirtualMachineSizeTypesStandardD8sV3', 'VirtualMachineSizeTypesStandardD16sV3', 'VirtualMachineSizeTypesStandardD32sV3', 'VirtualMachineSizeTypesStandardD64sV3', 'VirtualMachineSizeTypesStandardD11V2', 'VirtualMachineSizeTypesStandardD12V2', 'VirtualMachineSizeTypesStandardD13V2', 'VirtualMachineSizeTypesStandardD14V2', 'VirtualMachineSizeTypesStandardD15V2', 'VirtualMachineSizeTypesStandardDS1', 'VirtualMachineSizeTypesStandardDS2', 'VirtualMachineSizeTypesStandardDS3', 'VirtualMachineSizeTypesStandardDS4', 'VirtualMachineSizeTypesStandardDS11', 'VirtualMachineSizeTypesStandardDS12', 'VirtualMachineSizeTypesStandardDS13', 'VirtualMachineSizeTypesStandardDS14', 'VirtualMachineSizeTypesStandardDS1V2', 'VirtualMachineSizeTypesStandardDS2V2', 'VirtualMachineSizeTypesStandardDS3V2', 'VirtualMachineSizeTypesStandardDS4V2', 'VirtualMachineSizeTypesStandardDS5V2', 'VirtualMachineSizeTypesStandardDS11V2', 'VirtualMachineSizeTypesStandardDS12V2', 'VirtualMachineSizeTypesStandardDS13V2', 'VirtualMachineSizeTypesStandardDS14V2', 'VirtualMachineSizeTypesStandardDS15V2', 'VirtualMachineSizeTypesStandardDS134V2', 'VirtualMachineSizeTypesStandardDS132V2', 'VirtualMachineSizeTypesStandardDS148V2', 'VirtualMachineSizeTypesStandardDS144V2', 'VirtualMachineSizeTypesStandardE2V3', 'VirtualMachineSizeTypesStandardE4V3', 'VirtualMachineSizeTypesStandardE8V3', 'VirtualMachineSizeTypesStandardE16V3', 'VirtualMachineSizeTypesStandardE32V3', 'VirtualMachineSizeTypesStandardE64V3', 'VirtualMachineSizeTypesStandardE2sV3', 'VirtualMachineSizeTypesStandardE4sV3', 'VirtualMachineSizeTypesStandardE8sV3', 'VirtualMachineSizeTypesStandardE16sV3', 'VirtualMachineSizeTypesStandardE32sV3', 'VirtualMachineSizeTypesStandardE64sV3', 'VirtualMachineSizeTypesStandardE3216V3', 'VirtualMachineSizeTypesStandardE328sV3', 'VirtualMachineSizeTypesStandardE6432sV3', 'VirtualMachineSizeTypesStandardE6416sV3', 'VirtualMachineSizeTypesStandardF1', 'VirtualMachineSizeTypesStandardF2', 'VirtualMachineSizeTypesStandardF4', 'VirtualMachineSizeTypesStandardF8', 'VirtualMachineSizeTypesStandardF16', 'VirtualMachineSizeTypesStandardF1s', 'VirtualMachineSizeTypesStandardF2s', 'VirtualMachineSizeTypesStandardF4s', 'VirtualMachineSizeTypesStandardF8s', 'VirtualMachineSizeTypesStandardF16s', 'VirtualMachineSizeTypesStandardF2sV2', 'VirtualMachineSizeTypesStandardF4sV2', 'VirtualMachineSizeTypesStandardF8sV2', 'VirtualMachineSizeTypesStandardF16sV2', 'VirtualMachineSizeTypesStandardF32sV2', 'VirtualMachineSizeTypesStandardF64sV2', 'VirtualMachineSizeTypesStandardF72sV2', 'VirtualMachineSizeTypesStandardG1', 'VirtualMachineSizeTypesStandardG2', 'VirtualMachineSizeTypesStandardG3', 'VirtualMachineSizeTypesStandardG4', 'VirtualMachineSizeTypesStandardG5', 'VirtualMachineSizeTypesStandardGS1', 'VirtualMachineSizeTypesStandardGS2', 'VirtualMachineSizeTypesStandardGS3', 'VirtualMachineSizeTypesStandardGS4', 'VirtualMachineSizeTypesStandardGS5', 'VirtualMachineSizeTypesStandardGS48', 'VirtualMachineSizeTypesStandardGS44', 'VirtualMachineSizeTypesStandardGS516', 'VirtualMachineSizeTypesStandardGS58', 'VirtualMachineSizeTypesStandardH8', 'VirtualMachineSizeTypesStandardH16', 'VirtualMachineSizeTypesStandardH8m', 'VirtualMachineSizeTypesStandardH16m', 'VirtualMachineSizeTypesStandardH16r', 'VirtualMachineSizeTypesStandardH16mr', 'VirtualMachineSizeTypesStandardL4s', 'VirtualMachineSizeTypesStandardL8s', 'VirtualMachineSizeTypesStandardL16s', 'VirtualMachineSizeTypesStandardL32s', 'VirtualMachineSizeTypesStandardM64s', 'VirtualMachineSizeTypesStandardM64ms', 'VirtualMachineSizeTypesStandardM128s', 'VirtualMachineSizeTypesStandardM128ms', 'VirtualMachineSizeTypesStandardM6432ms', 'VirtualMachineSizeTypesStandardM6416ms', 'VirtualMachineSizeTypesStandardM12864ms', 'VirtualMachineSizeTypesStandardM12832ms', 'VirtualMachineSizeTypesStandardNC6', 'VirtualMachineSizeTypesStandardNC12', 'VirtualMachineSizeTypesStandardNC24', 'VirtualMachineSizeTypesStandardNC24r', 'VirtualMachineSizeTypesStandardNC6sV2', 'VirtualMachineSizeTypesStandardNC12sV2', 'VirtualMachineSizeTypesStandardNC24sV2', 'VirtualMachineSizeTypesStandardNC24rsV2', 'VirtualMachineSizeTypesStandardNC6sV3', 'VirtualMachineSizeTypesStandardNC12sV3', 'VirtualMachineSizeTypesStandardNC24sV3', 'VirtualMachineSizeTypesStandardNC24rsV3', 'VirtualMachineSizeTypesStandardND6s', 'VirtualMachineSizeTypesStandardND12s', 'VirtualMachineSizeTypesStandardND24s', 'VirtualMachineSizeTypesStandardND24rs', 'VirtualMachineSizeTypesStandardNV6', 'VirtualMachineSizeTypesStandardNV12', 'VirtualMachineSizeTypesStandardNV24'
+ VMSize VirtualMachineSizeTypes `json:"vmSize,omitempty"`
+}
+
+// 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. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS'
+ StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
+ // DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed image disk.
+ DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`
+}
+
+// ImageDisk describes a image disk.
+type ImageDisk struct {
+ // Snapshot - The snapshot.
+ Snapshot *SubResource `json:"snapshot,omitempty"`
+ // ManagedDisk - The managedDisk.
+ ManagedDisk *SubResource `json:"managedDisk,omitempty"`
+ // BlobURI - The Virtual Hard Disk.
+ BlobURI *string `json:"blobUri,omitempty"`
+ // Caching - Specifies the caching requirements.
Possible values are:
**None**
**ReadOnly**
**ReadWrite**
Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite'
+ Caching CachingTypes `json:"caching,omitempty"`
+ // DiskSizeGB - Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image.
This value cannot be larger than 1023 GB
+ DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
+ // StorageAccountType - Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS'
+ StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
+ // DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed image disk.
+ DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`
+}
+
+// ImageDiskReference the source image used for creating the disk.
+type ImageDiskReference struct {
+ // ID - A relative uri containing either a Platform Image Repository or user image reference.
+ ID *string `json:"id,omitempty"`
+ // Lun - If the disk is created from an image's data disk, this is an index that indicates which of the data disks in the image to use. For OS disks, this field is null.
+ Lun *int32 `json:"lun,omitempty"`
+}
+
+// ImageListResult the List Image operation response.
+type ImageListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of Images.
+ Value *[]Image `json:"value,omitempty"`
+ // NextLink - The uri to fetch the next page of Images. Call ListNext() with this to fetch the next page of Images.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ImageListResultIterator provides access to a complete listing of Image values.
+type ImageListResultIterator struct {
+ i int
+ page ImageListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *ImageListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ImageListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ImageListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ImageListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter ImageListResultIterator) Response() ImageListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter ImageListResultIterator) Value() Image {
+ if !iter.page.NotDone() {
+ return Image{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the ImageListResultIterator type.
+func NewImageListResultIterator(page ImageListResultPage) ImageListResultIterator {
+ return ImageListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (ilr ImageListResult) IsEmpty() bool {
+ return ilr.Value == nil || len(*ilr.Value) == 0
+}
+
+// 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.NextLink == nil || len(to.String(ilr.NextLink)) < 1 {
+ 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)
+ }()
+ }
+ next, err := page.fn(ctx, page.ilr)
+ if err != nil {
+ return err
+ }
+ page.ilr = next
+ 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(getNextPage func(context.Context, ImageListResult) (ImageListResult, error)) ImageListResultPage {
+ return ImageListResultPage{fn: getNextPage}
+}
+
+// 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. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS'
+ StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
+ // DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed image disk.
+ DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`
+}
+
+// ImageProperties describes the properties of an Image.
+type ImageProperties struct {
+ // SourceVirtualMachine - The source virtual machine from which Image is created.
+ SourceVirtualMachine *SubResource `json:"sourceVirtualMachine,omitempty"`
+ // StorageProfile - Specifies the storage settings for the virtual machine disks.
+ StorageProfile *ImageStorageProfile `json:"storageProfile,omitempty"`
+ // ProvisioningState - READ-ONLY; The provisioning state.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // HyperVGeneration - Gets the HyperVGenerationType of the VirtualMachine created from the image. Possible values include: 'HyperVGenerationTypesV1', 'HyperVGenerationTypesV2'
+ HyperVGeneration HyperVGenerationTypes `json:"hyperVGeneration,omitempty"`
+}
+
+// ImagePurchasePlan describes the gallery Image Definition purchase plan. This is used by marketplace
+// images.
+type ImagePurchasePlan struct {
+ // Name - The plan ID.
+ Name *string `json:"name,omitempty"`
+ // Publisher - The publisher ID.
+ Publisher *string `json:"publisher,omitempty"`
+ // Product - The product ID.
+ Product *string `json:"product,omitempty"`
+}
+
+// ImageReference specifies information about the image to use. You can specify information about platform
+// images, marketplace images, or virtual machine images. This element is required when you want to use a
+// platform image, marketplace image, or virtual machine image, but is not used in other creation
+// operations. NOTE: Image reference publisher and offer can only be set when you create the scale set.
+type ImageReference struct {
+ // Publisher - The image publisher.
+ Publisher *string `json:"publisher,omitempty"`
+ // Offer - Specifies the offer of the platform image or marketplace image used to create the virtual machine.
+ Offer *string `json:"offer,omitempty"`
+ // Sku - The image SKU.
+ Sku *string `json:"sku,omitempty"`
+ // Version - Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available.
+ Version *string `json:"version,omitempty"`
+ // ExactVersion - READ-ONLY; Specifies in decimal numbers, the version of platform image or marketplace image used to create the virtual machine. This readonly field differs from 'version', only if the value specified in 'version' field is 'latest'.
+ ExactVersion *string `json:"exactVersion,omitempty"`
+ // 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.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
+}
+
+// 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
+}
+
+// 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"`
+ // ZoneResilient - Specifies whether an image is zone resilient or not. Default is false. Zone resilient images can be created only in regions that provide Zone Redundant Storage (ZRS).
+ ZoneResilient *bool `json:"zoneResilient,omitempty"`
+}
+
+// ImagesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type ImagesUpdateFuture struct {
+ azure.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
+}
+
+// ImageUpdate the source user image virtual hard disk. Only tags may be updated.
+type ImageUpdate struct {
+ *ImageProperties `json:"properties,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for ImageUpdate.
+func (iu ImageUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if iu.ImageProperties != nil {
+ objectMap["properties"] = iu.ImageProperties
+ }
+ if iu.Tags != nil {
+ objectMap["tags"] = iu.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ImageUpdate struct.
+func (iu *ImageUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var imageProperties ImageProperties
+ err = json.Unmarshal(*v, &imageProperties)
+ if err != nil {
+ return err
+ }
+ iu.ImageProperties = &imageProperties
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ iu.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// InnerError inner error details.
+type InnerError struct {
+ // Exceptiontype - The exception type.
+ Exceptiontype *string `json:"exceptiontype,omitempty"`
+ // Errordetail - The internal error message or exception dump.
+ Errordetail *string `json:"errordetail,omitempty"`
+}
+
+// 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"`
+ // 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"`
+}
+
+// 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
+}
+
+// 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.NextLink == nil || len(to.String(lur.NextLink)) < 1 {
+ 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)
+ }()
+ }
+ next, err := page.fn(ctx, page.lur)
+ if err != nil {
+ return err
+ }
+ page.lur = next
+ 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(getNextPage func(context.Context, ListUsagesResult) (ListUsagesResult, error)) ListUsagesResultPage {
+ return ListUsagesResultPage{fn: getNextPage}
+}
+
+// ListVirtualMachineExtensionImage ...
+type ListVirtualMachineExtensionImage struct {
+ autorest.Response `json:"-"`
+ Value *[]VirtualMachineExtensionImage `json:"value,omitempty"`
+}
+
+// ListVirtualMachineImageResource ...
+type ListVirtualMachineImageResource struct {
+ autorest.Response `json:"-"`
+ Value *[]VirtualMachineImageResource `json:"value,omitempty"`
+}
+
+// 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
+}
+
+// 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
+}
+
+// LogAnalyticsInputBase api input base class for LogAnalytics Api.
+type LogAnalyticsInputBase struct {
+ // BlobContainerSasURI - SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to.
+ BlobContainerSasURI *string `json:"blobContainerSasUri,omitempty"`
+ // FromTime - From time of the query
+ FromTime *date.Time `json:"fromTime,omitempty"`
+ // ToTime - To time of the query
+ ToTime *date.Time `json:"toTime,omitempty"`
+ // GroupByThrottlePolicy - Group query result by Throttle Policy applied.
+ GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"`
+ // GroupByOperationName - Group query result by Operation Name.
+ GroupByOperationName *bool `json:"groupByOperationName,omitempty"`
+ // GroupByResourceName - Group query result by Resource Name.
+ GroupByResourceName *bool `json:"groupByResourceName,omitempty"`
+}
+
+// LogAnalyticsOperationResult logAnalytics operation status response
+type LogAnalyticsOperationResult struct {
+ autorest.Response `json:"-"`
+ // Properties - READ-ONLY; LogAnalyticsOutput
+ Properties *LogAnalyticsOutput `json:"properties,omitempty"`
+}
+
+// LogAnalyticsOutput logAnalytics output properties
+type LogAnalyticsOutput struct {
+ // Output - READ-ONLY; Output file Uri path to blob container.
+ Output *string `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"`
+}
+
+// ManagedArtifact the managed artifact.
+type ManagedArtifact struct {
+ // ID - The managed artifact id.
+ ID *string `json:"id,omitempty"`
+}
+
+// ManagedDiskParameters the parameters of a managed disk.
+type ManagedDiskParameters struct {
+ // StorageAccountType - Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS'
+ StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
+ // DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed disk.
+ DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`
+ // ID - Resource Id
+ ID *string `json:"id,omitempty"`
+}
+
+// NetworkInterfaceReference describes a network interface reference.
+type NetworkInterfaceReference struct {
+ *NetworkInterfaceReferenceProperties `json:"properties,omitempty"`
+ // ID - Resource Id
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for NetworkInterfaceReference.
+func (nir NetworkInterfaceReference) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if nir.NetworkInterfaceReferenceProperties != nil {
+ objectMap["properties"] = nir.NetworkInterfaceReferenceProperties
+ }
+ if nir.ID != nil {
+ objectMap["id"] = nir.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for NetworkInterfaceReference struct.
+func (nir *NetworkInterfaceReference) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var networkInterfaceReferenceProperties NetworkInterfaceReferenceProperties
+ err = json.Unmarshal(*v, &networkInterfaceReferenceProperties)
+ if err != nil {
+ return err
+ }
+ nir.NetworkInterfaceReferenceProperties = &networkInterfaceReferenceProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ nir.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// NetworkInterfaceReferenceProperties describes a network interface reference properties.
+type NetworkInterfaceReferenceProperties struct {
+ // Primary - Specifies the primary network interface in case the virtual machine has more than 1 network interface.
+ Primary *bool `json:"primary,omitempty"`
+}
+
+// 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"`
+}
+
+// OperationListResult the List Compute Operation operation response.
+type OperationListResult struct {
+ autorest.Response `json:"-"`
+ // Value - READ-ONLY; The list of compute operations
+ Value *[]OperationValue `json:"value,omitempty"`
+}
+
+// OperationValue describes the properties of a Compute Operation value.
+type OperationValue struct {
+ // Origin - READ-ONLY; The origin of the compute operation.
+ Origin *string `json:"origin,omitempty"`
+ // Name - READ-ONLY; The name of the compute operation.
+ Name *string `json:"name,omitempty"`
+ *OperationValueDisplay `json:"display,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for OperationValue.
+func (ov OperationValue) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ov.OperationValueDisplay != nil {
+ objectMap["display"] = ov.OperationValueDisplay
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for OperationValue struct.
+func (ov *OperationValue) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "origin":
+ if v != nil {
+ var origin string
+ err = json.Unmarshal(*v, &origin)
+ if err != nil {
+ return err
+ }
+ ov.Origin = &origin
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ ov.Name = &name
+ }
+ case "display":
+ if v != nil {
+ var operationValueDisplay OperationValueDisplay
+ err = json.Unmarshal(*v, &operationValueDisplay)
+ if err != nil {
+ return err
+ }
+ ov.OperationValueDisplay = &operationValueDisplay
+ }
+ }
+ }
+
+ return nil
+}
+
+// OperationValueDisplay describes the properties of a Compute Operation Value Display.
+type OperationValueDisplay struct {
+ // Operation - READ-ONLY; The display name of the compute operation.
+ Operation *string `json:"operation,omitempty"`
+ // Resource - READ-ONLY; The display name of the resource the operation applies to.
+ Resource *string `json:"resource,omitempty"`
+ // Description - READ-ONLY; The description of the operation.
+ Description *string `json:"description,omitempty"`
+ // Provider - READ-ONLY; The resource provider for the operation.
+ Provider *string `json:"provider,omitempty"`
+}
+
+// OrchestrationServiceStateInput the input for OrchestrationServiceState
+type OrchestrationServiceStateInput struct {
+ // ServiceName - The name of the service. Possible values include: 'AutomaticRepairs'
+ ServiceName OrchestrationServiceNames `json:"serviceName,omitempty"`
+ // Action - The action to be performed. Possible values include: 'Resume', 'Suspend'
+ Action OrchestrationServiceStateAction `json:"action,omitempty"`
+}
+
+// OrchestrationServiceSummary summary for an orchestration service of a virtual machine scale set.
+type OrchestrationServiceSummary struct {
+ // ServiceName - READ-ONLY; The name of the service. Possible values include: 'AutomaticRepairs', 'DummyOrchestrationServiceName'
+ ServiceName OrchestrationServiceNames `json:"serviceName,omitempty"`
+ // ServiceState - READ-ONLY; The current state of the service. Possible values include: 'NotRunning', 'Running', 'Suspended'
+ 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
+// 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"`
+ // WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
+ WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
+ // DiffDiskSettings - Specifies the ephemeral Disk Settings for the operating system disk used by the virtual machine.
+ DiffDiskSettings *DiffDiskSettings `json:"diffDiskSettings,omitempty"`
+ // CreateOption - Specifies how the virtual machine should be created.
Possible values are:
**Attach** \u2013 This value is used when you are using a specialized disk to create the virtual machine.
**FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'DiskCreateOptionTypesFromImage', 'DiskCreateOptionTypesEmpty', 'DiskCreateOptionTypesAttach'
+ CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
+ // DiskSizeGB - Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image.
This value cannot be larger than 1023 GB
+ DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
+ // ManagedDisk - The managed disk parameters.
+ ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"`
+}
+
+// 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"`
+}
+
+// OSDiskImageEncryption contains encryption settings for an OS disk image.
+type OSDiskImageEncryption struct {
+ // DiskEncryptionSetID - A relative URI containing the resource ID of the disk encryption set.
+ DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
+}
+
+// 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"`
+ // AdminUsername - Specifies the name of the administrator account.
This property cannot be updated after the VM is created.
**Windows-only restriction:** Cannot end in "."
**Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".
**Minimum-length (Linux):** 1 character
**Max-length (Linux):** 64 characters
**Max-length (Windows):** 20 characters
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_])
**Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"
For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/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.
**Note: Do not pass any secrets or passwords in customData property**
This property cannot be updated after the VM is created.
customData is passed to the VM to be saved as a file, for more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/)
For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/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"`
+ // AllowExtensionOperations - Specifies whether extension operations should be allowed on the virtual machine.
This may only be set to False when no extensions are present on the virtual machine.
+ AllowExtensionOperations *bool `json:"allowExtensionOperations,omitempty"`
+ // RequireGuestProvisionSignal - Specifies whether the guest provision signal is required to infer provision success of the virtual machine.
+ 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**.
+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"`
+}
+
+// ProximityPlacementGroup specifies information about the proximity placement group.
+type ProximityPlacementGroup struct {
+ autorest.Response `json:"-"`
+ // ProximityPlacementGroupProperties - Describes the properties of a Proximity Placement Group.
+ *ProximityPlacementGroupProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for ProximityPlacementGroup.
+func (ppg ProximityPlacementGroup) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ppg.ProximityPlacementGroupProperties != nil {
+ objectMap["properties"] = ppg.ProximityPlacementGroupProperties
+ }
+ if ppg.Location != nil {
+ objectMap["location"] = ppg.Location
+ }
+ if ppg.Tags != nil {
+ objectMap["tags"] = ppg.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ProximityPlacementGroup struct.
+func (ppg *ProximityPlacementGroup) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var proximityPlacementGroupProperties ProximityPlacementGroupProperties
+ err = json.Unmarshal(*v, &proximityPlacementGroupProperties)
+ if err != nil {
+ return err
+ }
+ ppg.ProximityPlacementGroupProperties = &proximityPlacementGroupProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ ppg.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ ppg.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ ppg.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ ppg.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ ppg.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// ProximityPlacementGroupListResult the List Proximity Placement Group operation response.
+type ProximityPlacementGroupListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of proximity placement groups
+ Value *[]ProximityPlacementGroup `json:"value,omitempty"`
+ // NextLink - The URI to fetch the next page of proximity placement groups.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ProximityPlacementGroupListResultIterator provides access to a complete listing of
+// ProximityPlacementGroup values.
+type ProximityPlacementGroupListResultIterator struct {
+ i int
+ page ProximityPlacementGroupListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *ProximityPlacementGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ProximityPlacementGroupListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ProximityPlacementGroupListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter ProximityPlacementGroupListResultIterator) Response() ProximityPlacementGroupListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter ProximityPlacementGroupListResultIterator) Value() ProximityPlacementGroup {
+ if !iter.page.NotDone() {
+ return ProximityPlacementGroup{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the ProximityPlacementGroupListResultIterator type.
+func NewProximityPlacementGroupListResultIterator(page ProximityPlacementGroupListResultPage) ProximityPlacementGroupListResultIterator {
+ return ProximityPlacementGroupListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (ppglr ProximityPlacementGroupListResult) IsEmpty() bool {
+ return ppglr.Value == nil || len(*ppglr.Value) == 0
+}
+
+// proximityPlacementGroupListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (ppglr ProximityPlacementGroupListResult) proximityPlacementGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if ppglr.NextLink == nil || len(to.String(ppglr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(ppglr.NextLink)))
+}
+
+// ProximityPlacementGroupListResultPage contains a page of ProximityPlacementGroup values.
+type ProximityPlacementGroupListResultPage struct {
+ fn func(context.Context, ProximityPlacementGroupListResult) (ProximityPlacementGroupListResult, error)
+ ppglr ProximityPlacementGroupListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *ProximityPlacementGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.ppglr)
+ if err != nil {
+ return err
+ }
+ page.ppglr = next
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ProximityPlacementGroupListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ProximityPlacementGroupListResultPage) NotDone() bool {
+ return !page.ppglr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ProximityPlacementGroupListResultPage) Response() ProximityPlacementGroupListResult {
+ return page.ppglr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ProximityPlacementGroupListResultPage) Values() []ProximityPlacementGroup {
+ if page.ppglr.IsEmpty() {
+ return nil
+ }
+ return *page.ppglr.Value
+}
+
+// Creates a new instance of the ProximityPlacementGroupListResultPage type.
+func NewProximityPlacementGroupListResultPage(getNextPage func(context.Context, ProximityPlacementGroupListResult) (ProximityPlacementGroupListResult, error)) ProximityPlacementGroupListResultPage {
+ return ProximityPlacementGroupListResultPage{fn: getNextPage}
+}
+
+// ProximityPlacementGroupProperties describes the properties of a Proximity Placement Group.
+type ProximityPlacementGroupProperties struct {
+ // ProximityPlacementGroupType - Specifies the type of the proximity placement group.
Possible values are:
**Standard** : Co-locate resources within an Azure region or Availability Zone.
**Ultra** : For future use. Possible values include: 'Standard', 'Ultra'
+ ProximityPlacementGroupType ProximityPlacementGroupType `json:"proximityPlacementGroupType,omitempty"`
+ // VirtualMachines - READ-ONLY; A list of references to all virtual machines in the proximity placement group.
+ VirtualMachines *[]SubResourceWithColocationStatus `json:"virtualMachines,omitempty"`
+ // VirtualMachineScaleSets - READ-ONLY; A list of references to all virtual machine scale sets in the proximity placement group.
+ VirtualMachineScaleSets *[]SubResourceWithColocationStatus `json:"virtualMachineScaleSets,omitempty"`
+ // AvailabilitySets - READ-ONLY; A list of references to all availability sets in the proximity placement group.
+ AvailabilitySets *[]SubResourceWithColocationStatus `json:"availabilitySets,omitempty"`
+ // ColocationStatus - Describes colocation status of the Proximity Placement Group.
+ ColocationStatus *InstanceViewStatus `json:"colocationStatus,omitempty"`
+}
+
+// ProximityPlacementGroupUpdate specifies information about the proximity placement group.
+type ProximityPlacementGroupUpdate struct {
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for ProximityPlacementGroupUpdate.
+func (ppgu ProximityPlacementGroupUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ppgu.Tags != nil {
+ objectMap["tags"] = ppgu.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// 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"`
+}
+
+// RecommendedMachineConfiguration the properties describe the recommended machine configuration for this
+// Image Definition. These properties are updatable.
+type RecommendedMachineConfiguration struct {
+ VCPUs *ResourceRange `json:"vCPUs,omitempty"`
+ Memory *ResourceRange `json:"memory,omitempty"`
+}
+
+// RecoveryWalkResponse response after calling a manual recovery walk
+type RecoveryWalkResponse struct {
+ autorest.Response `json:"-"`
+ // WalkPerformed - READ-ONLY; Whether the recovery walk was performed
+ WalkPerformed *bool `json:"walkPerformed,omitempty"`
+ // NextPlatformUpdateDomain - READ-ONLY; The next update domain that needs to be walked. Null means walk spanning all update domains has been completed
+ NextPlatformUpdateDomain *int32 `json:"nextPlatformUpdateDomain,omitempty"`
+}
+
+// RegionalReplicationStatus this is the regional replication status.
+type RegionalReplicationStatus struct {
+ // Region - READ-ONLY; The region to which the gallery Image Version is being replicated to.
+ Region *string `json:"region,omitempty"`
+ // State - READ-ONLY; This is the regional replication state. Possible values include: 'ReplicationStateUnknown', 'ReplicationStateReplicating', 'ReplicationStateCompleted', 'ReplicationStateFailed'
+ State ReplicationState `json:"state,omitempty"`
+ // Details - READ-ONLY; The details of the replication status.
+ Details *string `json:"details,omitempty"`
+ // Progress - READ-ONLY; It indicates progress of the replication job.
+ Progress *int32 `json:"progress,omitempty"`
+}
+
+// ReplicationStatus this is the replication status of the gallery Image Version.
+type ReplicationStatus struct {
+ // AggregatedState - READ-ONLY; This is the aggregated replication status based on all the regional replication status flags. Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed'
+ AggregatedState AggregatedReplicationState `json:"aggregatedState,omitempty"`
+ // Summary - READ-ONLY; This is a summary of replication status for each region.
+ Summary *[]RegionalReplicationStatus `json:"summary,omitempty"`
+}
+
+// RequestRateByIntervalInput api request input for LogAnalytics getRequestRateByInterval Api.
+type RequestRateByIntervalInput struct {
+ // IntervalLength - Interval value in minutes used to create LogAnalytics call rate logs. Possible values include: 'ThreeMins', 'FiveMins', 'ThirtyMins', 'SixtyMins'
+ IntervalLength IntervalInMins `json:"intervalLength,omitempty"`
+ // BlobContainerSasURI - SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to.
+ BlobContainerSasURI *string `json:"blobContainerSasUri,omitempty"`
+ // FromTime - From time of the query
+ FromTime *date.Time `json:"fromTime,omitempty"`
+ // ToTime - To time of the query
+ ToTime *date.Time `json:"toTime,omitempty"`
+ // GroupByThrottlePolicy - Group query result by Throttle Policy applied.
+ GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"`
+ // GroupByOperationName - Group query result by Operation Name.
+ GroupByOperationName *bool `json:"groupByOperationName,omitempty"`
+ // GroupByResourceName - Group query result by Resource Name.
+ GroupByResourceName *bool `json:"groupByResourceName,omitempty"`
+}
+
+// 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)
+}
+
+// ResourceRange describes the resource range.
+type ResourceRange struct {
+ // Min - The minimum number of the resource.
+ Min *int32 `json:"min,omitempty"`
+ // Max - The maximum number of the resource.
+ Max *int32 `json:"max,omitempty"`
+}
+
+// ResourceSku describes an available Compute SKU.
+type ResourceSku struct {
+ // ResourceType - READ-ONLY; The type of resource the SKU applies to.
+ ResourceType *string `json:"resourceType,omitempty"`
+ // Name - READ-ONLY; The name of SKU.
+ Name *string `json:"name,omitempty"`
+ // Tier - READ-ONLY; Specifies the tier of virtual machines in a scale set.
Possible Values:
**Standard**
**Basic**
+ Tier *string `json:"tier,omitempty"`
+ // Size - READ-ONLY; The Size of the SKU.
+ Size *string `json:"size,omitempty"`
+ // Family - READ-ONLY; The Family of this particular SKU.
+ Family *string `json:"family,omitempty"`
+ // Kind - READ-ONLY; The Kind of resources that are supported in this SKU.
+ Kind *string `json:"kind,omitempty"`
+ // Capacity - READ-ONLY; Specifies the number of virtual machines in the scale set.
+ Capacity *ResourceSkuCapacity `json:"capacity,omitempty"`
+ // Locations - READ-ONLY; The set of locations that the SKU is available.
+ Locations *[]string `json:"locations,omitempty"`
+ // LocationInfo - READ-ONLY; A list of locations and availability zones in those locations where the SKU is available.
+ LocationInfo *[]ResourceSkuLocationInfo `json:"locationInfo,omitempty"`
+ // APIVersions - READ-ONLY; The api versions that support this SKU.
+ APIVersions *[]string `json:"apiVersions,omitempty"`
+ // Costs - READ-ONLY; Metadata for retrieving price info.
+ Costs *[]ResourceSkuCosts `json:"costs,omitempty"`
+ // Capabilities - READ-ONLY; A name value pair to describe the capability.
+ Capabilities *[]ResourceSkuCapabilities `json:"capabilities,omitempty"`
+ // Restrictions - READ-ONLY; The restrictions because of which SKU cannot be used. This is empty if there are no restrictions.
+ Restrictions *[]ResourceSkuRestrictions `json:"restrictions,omitempty"`
+}
+
+// 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"`
+}
+
+// ResourceSkuLocationInfo ...
+type ResourceSkuLocationInfo struct {
+ // Location - READ-ONLY; Location of the SKU
+ Location *string `json:"location,omitempty"`
+ // Zones - READ-ONLY; List of availability zones where the SKU is supported.
+ Zones *[]string `json:"zones,omitempty"`
+ // ZoneDetails - READ-ONLY; Details of capabilities available to a SKU in specific zones.
+ ZoneDetails *[]ResourceSkuZoneDetails `json:"zoneDetails,omitempty"`
+}
+
+// ResourceSkuRestrictionInfo ...
+type ResourceSkuRestrictionInfo struct {
+ // Locations - READ-ONLY; Locations where the SKU is restricted
+ Locations *[]string `json:"locations,omitempty"`
+ // Zones - READ-ONLY; List of availability zones where the SKU is restricted.
+ Zones *[]string `json:"zones,omitempty"`
+}
+
+// ResourceSkuRestrictions describes scaling information of a SKU.
+type ResourceSkuRestrictions struct {
+ // Type - READ-ONLY; The type of restrictions. Possible values include: 'Location', 'Zone'
+ Type ResourceSkuRestrictionsType `json:"type,omitempty"`
+ // Values - READ-ONLY; The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted.
+ Values *[]string `json:"values,omitempty"`
+ // RestrictionInfo - READ-ONLY; The information about the restriction where the SKU cannot be used.
+ RestrictionInfo *ResourceSkuRestrictionInfo `json:"restrictionInfo,omitempty"`
+ // ReasonCode - READ-ONLY; The reason for restriction. Possible values include: 'QuotaID', 'NotAvailableForSubscription'
+ ReasonCode ResourceSkuRestrictionsReasonCode `json:"reasonCode,omitempty"`
+}
+
+// ResourceSkusResult the List Resource Skus operation response.
+type ResourceSkusResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of skus available for the subscription.
+ Value *[]ResourceSku `json:"value,omitempty"`
+ // NextLink - The URI to fetch the next page of Resource Skus. Call ListNext() with this URI to fetch the next page of Resource Skus
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ResourceSkusResultIterator provides access to a complete listing of ResourceSku values.
+type ResourceSkusResultIterator struct {
+ i int
+ page ResourceSkusResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *ResourceSkusResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ResourceSkusResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ResourceSkusResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter ResourceSkusResultIterator) Response() ResourceSkusResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter ResourceSkusResultIterator) Value() ResourceSku {
+ if !iter.page.NotDone() {
+ return ResourceSku{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the ResourceSkusResultIterator type.
+func NewResourceSkusResultIterator(page ResourceSkusResultPage) ResourceSkusResultIterator {
+ return ResourceSkusResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (rsr ResourceSkusResult) IsEmpty() bool {
+ return rsr.Value == nil || len(*rsr.Value) == 0
+}
+
+// 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.NextLink == nil || len(to.String(rsr.NextLink)) < 1 {
+ 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)
+ }()
+ }
+ next, err := page.fn(ctx, page.rsr)
+ if err != nil {
+ return err
+ }
+ page.rsr = next
+ 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(getNextPage func(context.Context, ResourceSkusResult) (ResourceSkusResult, error)) ResourceSkusResultPage {
+ return ResourceSkusResultPage{fn: getNextPage}
+}
+
+// ResourceSkuZoneDetails describes The zonal capabilities of a SKU.
+type ResourceSkuZoneDetails struct {
+ // Name - READ-ONLY; The set of zones that the SKU is available in with the specified capabilities.
+ Name *[]string `json:"name,omitempty"`
+ // Capabilities - READ-ONLY; A list of capabilities that are available for the SKU in the specified list of zones.
+ Capabilities *[]ResourceSkuCapabilities `json:"capabilities,omitempty"`
+}
+
+// RollbackStatusInfo information about rollback on failed VM instances after a OS Upgrade operation.
+type RollbackStatusInfo struct {
+ // SuccessfullyRolledbackInstanceCount - READ-ONLY; The number of instances which have been successfully rolled back.
+ SuccessfullyRolledbackInstanceCount *int32 `json:"successfullyRolledbackInstanceCount,omitempty"`
+ // FailedRolledbackInstanceCount - READ-ONLY; The number of instances which failed to rollback.
+ FailedRolledbackInstanceCount *int32 `json:"failedRolledbackInstanceCount,omitempty"`
+ // RollbackError - READ-ONLY; Error details if OS rollback failed.
+ RollbackError *APIError `json:"rollbackError,omitempty"`
+}
+
+// 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: 'RollingUpgradeStatusCodeRollingForward', 'RollingUpgradeStatusCodeCancelled', 'RollingUpgradeStatusCodeCompleted', 'RollingUpgradeStatusCodeFaulted'
+ Code RollingUpgradeStatusCode `json:"code,omitempty"`
+ // StartTime - READ-ONLY; Start time of the upgrade.
+ StartTime *date.Time `json:"startTime,omitempty"`
+ // LastAction - READ-ONLY; The last action performed on the rolling upgrade. Possible values include: '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
+}
+
+// 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.NextLink == nil || len(to.String(rclr.NextLink)) < 1 {
+ 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)
+ }()
+ }
+ next, err := page.fn(ctx, page.rclr)
+ if err != nil {
+ return err
+ }
+ page.rclr = next
+ 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(getNextPage func(context.Context, RunCommandListResult) (RunCommandListResult, error)) RunCommandListResultPage {
+ return RunCommandListResultPage{fn: getNextPage}
+}
+
+// RunCommandParameterDefinition describes the properties of a run command parameter.
+type RunCommandParameterDefinition struct {
+ // Name - The run command parameter name.
+ Name *string `json:"name,omitempty"`
+ // Type - The run command parameter type.
+ Type *string `json:"type,omitempty"`
+ // DefaultValue - The run command parameter default value.
+ DefaultValue *string `json:"defaultValue,omitempty"`
+ // Required - The run command parameter required.
+ Required *bool `json:"required,omitempty"`
+}
+
+// RunCommandResult ...
+type RunCommandResult struct {
+ autorest.Response `json:"-"`
+ // Value - Run command operation response.
+ Value *[]InstanceViewStatus `json:"value,omitempty"`
+}
+
+// ScaleInPolicy describes a scale-in policy for a virtual machine scale set.
+type ScaleInPolicy struct {
+ // Rules - The rules to be followed when scaling-in a virtual machine scale set.
Possible values are:
**Default** When a virtual machine scale set is scaled in, the scale set will first be balanced across zones if it is a zonal scale set. Then, it will be balanced across Fault Domains as far as possible. Within each Fault Domain, the virtual machines chosen for removal will be the newest ones that are not protected from scale-in.
**OldestVM** When a virtual machine scale set is being scaled-in, the oldest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the oldest virtual machines that are not protected will be chosen for removal.
**NewestVM** When a virtual machine scale set is being scaled-in, the newest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the newest virtual machines that are not protected will be chosen for removal.
+ Rules *[]VirtualMachineScaleSetScaleInRules `json:"rules,omitempty"`
+}
+
+// ScheduledEventsProfile ...
+type ScheduledEventsProfile struct {
+ // TerminateNotificationProfile - Specifies Terminate Scheduled Event related configurations.
+ TerminateNotificationProfile *TerminateNotificationProfile `json:"terminateNotificationProfile,omitempty"`
+}
+
+// ShareInfoElement ...
+type ShareInfoElement struct {
+ // VMURI - READ-ONLY; A relative URI containing the ID of the VM that has the disk attached.
+ VMURI *string `json:"vmUri,omitempty"`
+}
+
+// Sku describes a virtual machine scale set sku. NOTE: If the new VM SKU is not supported on the hardware
+// the scale set is currently on, you need to deallocate the VMs in the scale set before you modify the SKU
+// name.
+type Sku struct {
+ // Name - The sku name.
+ Name *string `json:"name,omitempty"`
+ // Tier - Specifies the tier of virtual machines in a scale set.
Possible Values:
**Standard**
**Basic**
+ Tier *string `json:"tier,omitempty"`
+ // Capacity - Specifies the number of virtual machines in the scale set.
+ Capacity *int64 `json:"capacity,omitempty"`
+}
+
+// Snapshot snapshot resource.
+type Snapshot struct {
+ autorest.Response `json:"-"`
+ // ManagedBy - READ-ONLY; Unused. Always Null.
+ ManagedBy *string `json:"managedBy,omitempty"`
+ Sku *SnapshotSku `json:"sku,omitempty"`
+ *SnapshotProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for Snapshot.
+func (s Snapshot) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if s.Sku != nil {
+ objectMap["sku"] = s.Sku
+ }
+ if s.SnapshotProperties != nil {
+ objectMap["properties"] = s.SnapshotProperties
+ }
+ if s.Location != nil {
+ objectMap["location"] = s.Location
+ }
+ if s.Tags != nil {
+ objectMap["tags"] = s.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Snapshot struct.
+func (s *Snapshot) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "managedBy":
+ if v != nil {
+ var managedBy string
+ err = json.Unmarshal(*v, &managedBy)
+ if err != nil {
+ return err
+ }
+ s.ManagedBy = &managedBy
+ }
+ case "sku":
+ if v != nil {
+ var sku SnapshotSku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ s.Sku = &sku
+ }
+ case "properties":
+ if v != nil {
+ var snapshotProperties SnapshotProperties
+ err = json.Unmarshal(*v, &snapshotProperties)
+ if err != nil {
+ return err
+ }
+ s.SnapshotProperties = &snapshotProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ s.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ s.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ s.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ s.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ s.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// SnapshotList the List Snapshots operation response.
+type SnapshotList struct {
+ autorest.Response `json:"-"`
+ // Value - A list of snapshots.
+ Value *[]Snapshot `json:"value,omitempty"`
+ // NextLink - The uri to fetch the next page of snapshots. Call ListNext() with this to fetch the next page of snapshots.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// SnapshotListIterator provides access to a complete listing of Snapshot values.
+type SnapshotListIterator struct {
+ i int
+ page SnapshotListPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *SnapshotListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *SnapshotListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter SnapshotListIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter SnapshotListIterator) Response() SnapshotList {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter SnapshotListIterator) Value() Snapshot {
+ if !iter.page.NotDone() {
+ return Snapshot{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the SnapshotListIterator type.
+func NewSnapshotListIterator(page SnapshotListPage) SnapshotListIterator {
+ return SnapshotListIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (sl SnapshotList) IsEmpty() bool {
+ return sl.Value == nil || len(*sl.Value) == 0
+}
+
+// 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.NextLink == nil || len(to.String(sl.NextLink)) < 1 {
+ 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)
+ }()
+ }
+ next, err := page.fn(ctx, page.sl)
+ if err != nil {
+ return err
+ }
+ page.sl = next
+ 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(getNextPage func(context.Context, SnapshotList) (SnapshotList, error)) SnapshotListPage {
+ return SnapshotListPage{fn: getNextPage}
+}
+
+// SnapshotProperties snapshot resource properties.
+type SnapshotProperties 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"`
+ // HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2'
+ HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"`
+ // CreationData - Disk source information. CreationData information cannot be changed after the disk has been created.
+ CreationData *CreationData `json:"creationData,omitempty"`
+ // DiskSizeGB - If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.
+ DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
+ // DiskSizeBytes - READ-ONLY; The size of the disk in bytes. This field is read only.
+ DiskSizeBytes *int64 `json:"diskSizeBytes,omitempty"`
+ // UniqueID - READ-ONLY; Unique Guid identifying the resource.
+ UniqueID *string `json:"uniqueId,omitempty"`
+ // EncryptionSettingsCollection - Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
+ EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"`
+ // ProvisioningState - READ-ONLY; The disk provisioning state.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // Incremental - Whether a snapshot is incremental. Incremental snapshots on the same disk occupy less space than full snapshots and can be diffed.
+ Incremental *bool `json:"incremental,omitempty"`
+ // Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
+ Encryption *Encryption `json:"encryption,omitempty"`
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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
+}
+
+// SnapshotSku the snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS.
+type SnapshotSku struct {
+ // Name - The sku name. Possible values include: 'SnapshotStorageAccountTypesStandardLRS', 'SnapshotStorageAccountTypesPremiumLRS', 'SnapshotStorageAccountTypesStandardZRS'
+ Name SnapshotStorageAccountTypes `json:"name,omitempty"`
+ // Tier - READ-ONLY; The sku tier.
+ Tier *string `json:"tier,omitempty"`
+}
+
+// SnapshotsRevokeAccessFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type SnapshotsRevokeAccessFuture struct {
+ azure.Future
+}
+
+// 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.
+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
+}
+
+// SnapshotUpdate snapshot update resource.
+type SnapshotUpdate struct {
+ *SnapshotUpdateProperties `json:"properties,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+ Sku *SnapshotSku `json:"sku,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for SnapshotUpdate.
+func (su SnapshotUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if su.SnapshotUpdateProperties != nil {
+ objectMap["properties"] = su.SnapshotUpdateProperties
+ }
+ if su.Tags != nil {
+ objectMap["tags"] = su.Tags
+ }
+ if su.Sku != nil {
+ objectMap["sku"] = su.Sku
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for SnapshotUpdate struct.
+func (su *SnapshotUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var snapshotUpdateProperties SnapshotUpdateProperties
+ err = json.Unmarshal(*v, &snapshotUpdateProperties)
+ if err != nil {
+ return err
+ }
+ su.SnapshotUpdateProperties = &snapshotUpdateProperties
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ su.Tags = tags
+ }
+ case "sku":
+ if v != nil {
+ var sku SnapshotSku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ su.Sku = &sku
+ }
+ }
+ }
+
+ return nil
+}
+
+// SnapshotUpdateProperties snapshot resource update properties.
+type SnapshotUpdateProperties struct {
+ // OsType - the Operating System type. Possible values include: 'Windows', 'Linux'
+ OsType OperatingSystemTypes `json:"osType,omitempty"`
+ // DiskSizeGB - If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.
+ DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
+ // EncryptionSettingsCollection - Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
+ EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"`
+ // Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
+ Encryption *Encryption `json:"encryption,omitempty"`
+}
+
+// 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"`
+}
+
+// SSHPublicKeyGenerateKeyPairResult response from generation of an SSH key pair.
+type SSHPublicKeyGenerateKeyPairResult struct {
+ autorest.Response `json:"-"`
+ // PrivateKey - Private key portion of the key pair used to authenticate to a virtual machine through ssh. The private key is returned in RFC3447 format and should be treated as a secret.
+ PrivateKey *string `json:"privateKey,omitempty"`
+ // PublicKey - Public key portion of the key pair used to authenticate to a virtual machine through ssh. The public key is in ssh-rsa format.
+ PublicKey *string `json:"publicKey,omitempty"`
+ // ID - The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{SshPublicKeyName}
+ ID *string `json:"id,omitempty"`
+}
+
+// SSHPublicKeyResource specifies information about the SSH public key.
+type SSHPublicKeyResource struct {
+ autorest.Response `json:"-"`
+ // SSHPublicKeyResourceProperties - Properties of the SSH public key.
+ *SSHPublicKeyResourceProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for SSHPublicKeyResource.
+func (spkr SSHPublicKeyResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if spkr.SSHPublicKeyResourceProperties != nil {
+ objectMap["properties"] = spkr.SSHPublicKeyResourceProperties
+ }
+ if spkr.Location != nil {
+ objectMap["location"] = spkr.Location
+ }
+ if spkr.Tags != nil {
+ objectMap["tags"] = spkr.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for SSHPublicKeyResource struct.
+func (spkr *SSHPublicKeyResource) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var SSHPublicKeyResourceProperties SSHPublicKeyResourceProperties
+ err = json.Unmarshal(*v, &SSHPublicKeyResourceProperties)
+ if err != nil {
+ return err
+ }
+ spkr.SSHPublicKeyResourceProperties = &SSHPublicKeyResourceProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ spkr.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ spkr.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ spkr.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ spkr.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ spkr.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// SSHPublicKeyResourceProperties properties of the SSH public key.
+type SSHPublicKeyResourceProperties struct {
+ // PublicKey - SSH public key used to authenticate to a virtual machine through ssh. If this property is not initially provided when the resource is created, the publicKey property will be populated when generateKeyPair is called. If the public key is provided upon resource creation, the provided public key needs to be at least 2048-bit and in ssh-rsa format.
+ PublicKey *string `json:"publicKey,omitempty"`
+}
+
+// SSHPublicKeysGroupListResult the list SSH public keys operation response.
+type SSHPublicKeysGroupListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of SSH public keys
+ Value *[]SSHPublicKeyResource `json:"value,omitempty"`
+ // NextLink - The URI to fetch the next page of SSH public keys. Call ListNext() with this URI to fetch the next page of SSH public keys.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// SSHPublicKeysGroupListResultIterator provides access to a complete listing of SSHPublicKeyResource
+// values.
+type SSHPublicKeysGroupListResultIterator struct {
+ i int
+ page SSHPublicKeysGroupListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *SSHPublicKeysGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysGroupListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *SSHPublicKeysGroupListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter SSHPublicKeysGroupListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter SSHPublicKeysGroupListResultIterator) Response() SSHPublicKeysGroupListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter SSHPublicKeysGroupListResultIterator) Value() SSHPublicKeyResource {
+ if !iter.page.NotDone() {
+ return SSHPublicKeyResource{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the SSHPublicKeysGroupListResultIterator type.
+func NewSSHPublicKeysGroupListResultIterator(page SSHPublicKeysGroupListResultPage) SSHPublicKeysGroupListResultIterator {
+ return SSHPublicKeysGroupListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (spkglr SSHPublicKeysGroupListResult) IsEmpty() bool {
+ return spkglr.Value == nil || len(*spkglr.Value) == 0
+}
+
+// sSHPublicKeysGroupListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (spkglr SSHPublicKeysGroupListResult) sSHPublicKeysGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if spkglr.NextLink == nil || len(to.String(spkglr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(spkglr.NextLink)))
+}
+
+// SSHPublicKeysGroupListResultPage contains a page of SSHPublicKeyResource values.
+type SSHPublicKeysGroupListResultPage struct {
+ fn func(context.Context, SSHPublicKeysGroupListResult) (SSHPublicKeysGroupListResult, error)
+ spkglr SSHPublicKeysGroupListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *SSHPublicKeysGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysGroupListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.spkglr)
+ if err != nil {
+ return err
+ }
+ page.spkglr = next
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *SSHPublicKeysGroupListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page SSHPublicKeysGroupListResultPage) NotDone() bool {
+ return !page.spkglr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page SSHPublicKeysGroupListResultPage) Response() SSHPublicKeysGroupListResult {
+ return page.spkglr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page SSHPublicKeysGroupListResultPage) Values() []SSHPublicKeyResource {
+ if page.spkglr.IsEmpty() {
+ return nil
+ }
+ return *page.spkglr.Value
+}
+
+// Creates a new instance of the SSHPublicKeysGroupListResultPage type.
+func NewSSHPublicKeysGroupListResultPage(getNextPage func(context.Context, SSHPublicKeysGroupListResult) (SSHPublicKeysGroupListResult, error)) SSHPublicKeysGroupListResultPage {
+ return SSHPublicKeysGroupListResultPage{fn: getNextPage}
+}
+
+// SSHPublicKeyUpdateResource specifies information about the SSH public key.
+type SSHPublicKeyUpdateResource struct {
+ // SSHPublicKeyResourceProperties - Properties of the SSH public key.
+ *SSHPublicKeyResourceProperties `json:"properties,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for SSHPublicKeyUpdateResource.
+func (spkur SSHPublicKeyUpdateResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if spkur.SSHPublicKeyResourceProperties != nil {
+ objectMap["properties"] = spkur.SSHPublicKeyResourceProperties
+ }
+ if spkur.Tags != nil {
+ objectMap["tags"] = spkur.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for SSHPublicKeyUpdateResource struct.
+func (spkur *SSHPublicKeyUpdateResource) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var SSHPublicKeyResourceProperties SSHPublicKeyResourceProperties
+ err = json.Unmarshal(*v, &SSHPublicKeyResourceProperties)
+ if err != nil {
+ return err
+ }
+ spkur.SSHPublicKeyResourceProperties = &SSHPublicKeyResourceProperties
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ spkur.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// 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"`
+}
+
+// SubResourceWithColocationStatus ...
+type SubResourceWithColocationStatus struct {
+ // ColocationStatus - Describes colocation status of a resource in the Proximity Placement Group.
+ ColocationStatus *InstanceViewStatus `json:"colocationStatus,omitempty"`
+ // ID - Resource Id
+ ID *string `json:"id,omitempty"`
+}
+
+// TargetRegion describes the target region information.
+type TargetRegion struct {
+ // Name - The name of the region.
+ Name *string `json:"name,omitempty"`
+ // RegionalReplicaCount - The number of replicas of the Image Version to be created per region. This property is updatable.
+ RegionalReplicaCount *int32 `json:"regionalReplicaCount,omitempty"`
+ // StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS'
+ StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"`
+ Encryption *EncryptionImages `json:"encryption,omitempty"`
+}
+
+// TerminateNotificationProfile ...
+type TerminateNotificationProfile struct {
+ // NotBeforeTimeout - Configurable length of time a Virtual Machine being deleted will have to potentially approve the Terminate Scheduled Event before the event is auto approved (timed out). The configuration must be specified in ISO 8601 format, the default value is 5 minutes (PT5M)
+ NotBeforeTimeout *string `json:"notBeforeTimeout,omitempty"`
+ // Enable - Specifies whether the Terminate Scheduled event is enabled or disabled.
+ Enable *bool `json:"enable,omitempty"`
+}
+
+// ThrottledRequestsInput api request input for LogAnalytics getThrottledRequests Api.
+type ThrottledRequestsInput struct {
+ // BlobContainerSasURI - SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to.
+ BlobContainerSasURI *string `json:"blobContainerSasUri,omitempty"`
+ // FromTime - From time of the query
+ FromTime *date.Time `json:"fromTime,omitempty"`
+ // ToTime - To time of the query
+ ToTime *date.Time `json:"toTime,omitempty"`
+ // GroupByThrottlePolicy - Group query result by Throttle Policy applied.
+ GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"`
+ // GroupByOperationName - Group query result by Operation Name.
+ GroupByOperationName *bool `json:"groupByOperationName,omitempty"`
+ // GroupByResourceName - Group query result by Resource Name.
+ GroupByResourceName *bool `json:"groupByResourceName,omitempty"`
+}
+
+// UpdateResource the Update Resource model definition.
+type UpdateResource struct {
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for UpdateResource.
+func (ur UpdateResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ur.Tags != nil {
+ objectMap["tags"] = ur.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UpdateResourceDefinition the Update Resource model definition.
+type UpdateResourceDefinition struct {
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for UpdateResourceDefinition.
+func (urd UpdateResourceDefinition) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if urd.Tags != nil {
+ objectMap["tags"] = urd.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UpgradeOperationHistoricalStatusInfo virtual Machine Scale Set OS Upgrade History operation response.
+type UpgradeOperationHistoricalStatusInfo struct {
+ // Properties - READ-ONLY; Information about the properties of the upgrade operation.
+ Properties *UpgradeOperationHistoricalStatusInfoProperties `json:"properties,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - READ-ONLY; Resource location
+ Location *string `json:"location,omitempty"`
+}
+
+// UpgradeOperationHistoricalStatusInfoProperties describes each OS upgrade on the Virtual Machine Scale
+// Set.
+type UpgradeOperationHistoricalStatusInfoProperties struct {
+ // RunningStatus - READ-ONLY; Information about the overall status of the upgrade operation.
+ RunningStatus *UpgradeOperationHistoryStatus `json:"runningStatus,omitempty"`
+ // Progress - READ-ONLY; Counts of the VMs in each state.
+ Progress *RollingUpgradeProgressInfo `json:"progress,omitempty"`
+ // Error - READ-ONLY; Error Details for this upgrade if there are any.
+ Error *APIError `json:"error,omitempty"`
+ // StartedBy - READ-ONLY; Invoker of the Upgrade Operation. Possible values include: 'UpgradeOperationInvokerUnknown', 'UpgradeOperationInvokerUser', 'UpgradeOperationInvokerPlatform'
+ StartedBy UpgradeOperationInvoker `json:"startedBy,omitempty"`
+ // TargetImageReference - READ-ONLY; Image Reference details
+ TargetImageReference *ImageReference `json:"targetImageReference,omitempty"`
+ // RollbackInfo - READ-ONLY; Information about OS rollback if performed
+ RollbackInfo *RollbackStatusInfo `json:"rollbackInfo,omitempty"`
+}
+
+// UpgradeOperationHistoryStatus information about the current running state of the overall upgrade.
+type UpgradeOperationHistoryStatus struct {
+ // Code - READ-ONLY; Code indicating the current status of the upgrade. Possible values include: 'UpgradeStateRollingForward', 'UpgradeStateCancelled', 'UpgradeStateCompleted', 'UpgradeStateFaulted'
+ Code UpgradeState `json:"code,omitempty"`
+ // StartTime - READ-ONLY; Start time of the upgrade.
+ StartTime *date.Time `json:"startTime,omitempty"`
+ // EndTime - READ-ONLY; End time of the upgrade.
+ EndTime *date.Time `json:"endTime,omitempty"`
+}
+
+// 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"`
+ // AutomaticOSUpgradePolicy - Configuration parameters used for performing automatic OS Upgrade.
+ AutomaticOSUpgradePolicy *AutomaticOSUpgradePolicy `json:"automaticOSUpgradePolicy,omitempty"`
+}
+
+// Usage describes Compute Resource Usage.
+type Usage struct {
+ // Unit - An enum describing the unit of usage measurement.
+ Unit *string `json:"unit,omitempty"`
+ // CurrentValue - The current usage of the resource.
+ CurrentValue *int32 `json:"currentValue,omitempty"`
+ // Limit - The maximum permitted usage of the resource.
+ Limit *int64 `json:"limit,omitempty"`
+ // Name - The name of the type of usage.
+ Name *UsageName `json:"name,omitempty"`
+}
+
+// UsageName the Usage Names.
+type UsageName struct {
+ // Value - The name of the resource.
+ Value *string `json:"value,omitempty"`
+ // LocalizedValue - The localized name of the resource.
+ LocalizedValue *string `json:"localizedValue,omitempty"`
+}
+
+// UserArtifactSource the source image from which the Image Version is going to be created.
+type UserArtifactSource struct {
+ // FileName - Required. The fileName of the artifact.
+ FileName *string `json:"fileName,omitempty"`
+ // MediaLink - Required. The mediaLink of the artifact, must be a readable storage blob.
+ MediaLink *string `json:"mediaLink,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 output of virtual machine capture operation.
+type VirtualMachineCaptureResult struct {
+ autorest.Response `json:"-"`
+ // Schema - READ-ONLY; the schema of the captured virtual machine
+ Schema *string `json:"$schema,omitempty"`
+ // ContentVersion - READ-ONLY; the version of the content
+ ContentVersion *string `json:"contentVersion,omitempty"`
+ // Parameters - READ-ONLY; parameters of the captured virtual machine
+ Parameters interface{} `json:"parameters,omitempty"`
+ // Resources - READ-ONLY; a list of resource items of the captured virtual machine
+ Resources *[]interface{} `json:"resources,omitempty"`
+ // ID - Resource Id
+ ID *string `json:"id,omitempty"`
+}
+
+// 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"`
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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.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
+}
+
+// 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. This property will only be provided for a system assigned identity.
+ PrincipalID *string `json:"principalId,omitempty"`
+ // TenantID - READ-ONLY; The tenant id associated with the virtual machine. This property will only be provided for a system assigned identity.
+ TenantID *string `json:"tenantId,omitempty"`
+ // Type - The type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine. Possible values include: 'ResourceIdentityTypeSystemAssigned', 'ResourceIdentityTypeUserAssigned', 'ResourceIdentityTypeSystemAssignedUserAssigned', 'ResourceIdentityTypeNone'
+ Type ResourceIdentityType `json:"type,omitempty"`
+ // UserAssignedIdentities - The list of user identities associated with the Virtual Machine. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
+ UserAssignedIdentities map[string]*VirtualMachineIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineIdentity.
+func (vmi VirtualMachineIdentity) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmi.Type != "" {
+ objectMap["type"] = vmi.Type
+ }
+ if vmi.UserAssignedIdentities != nil {
+ objectMap["userAssignedIdentities"] = vmi.UserAssignedIdentities
+ }
+ return json.Marshal(objectMap)
+}
+
+// VirtualMachineIdentityUserAssignedIdentitiesValue ...
+type VirtualMachineIdentityUserAssignedIdentitiesValue struct {
+ // PrincipalID - READ-ONLY; The principal id of user assigned identity.
+ PrincipalID *string `json:"principalId,omitempty"`
+ // ClientID - READ-ONLY; The client id of user assigned identity.
+ ClientID *string `json:"clientId,omitempty"`
+}
+
+// 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"`
+ AutomaticOSUpgradeProperties *AutomaticOSUpgradeProperties `json:"automaticOSUpgradeProperties,omitempty"`
+ // HyperVGeneration - Possible values include: 'HyperVGenerationTypesV1', 'HyperVGenerationTypesV2'
+ HyperVGeneration HyperVGenerationTypes `json:"hyperVGeneration,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"`
+ // ComputerName - The computer name assigned to the virtual machine.
+ ComputerName *string `json:"computerName,omitempty"`
+ // OsName - The Operating System running on the virtual machine.
+ OsName *string `json:"osName,omitempty"`
+ // OsVersion - The version of Operating System running on the virtual machine.
+ OsVersion *string `json:"osVersion,omitempty"`
+ // HyperVGeneration - Specifies the HyperVGeneration Type associated with a resource. Possible values include: 'HyperVGenerationTypeV1', 'HyperVGenerationTypeV2'
+ HyperVGeneration HyperVGenerationType `json:"hyperVGeneration,omitempty"`
+ // RdpThumbPrint - The Remote desktop certificate thumbprint.
+ RdpThumbPrint *string `json:"rdpThumbPrint,omitempty"`
+ // VMAgent - The VM Agent running on the virtual machine.
+ VMAgent *VirtualMachineAgentInstanceView `json:"vmAgent,omitempty"`
+ // MaintenanceRedeployStatus - The Maintenance Operation status on the virtual machine.
+ MaintenanceRedeployStatus *MaintenanceRedeployStatus `json:"maintenanceRedeployStatus,omitempty"`
+ // Disks - The virtual machine disk information.
+ Disks *[]DiskInstanceView `json:"disks,omitempty"`
+ // Extensions - The extensions information.
+ Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"`
+ // 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
+}
+
+// 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.NextLink == nil || len(to.String(vmlr.NextLink)) < 1 {
+ 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)
+ }()
+ }
+ next, err := page.fn(ctx, page.vmlr)
+ if err != nil {
+ return err
+ }
+ page.vmlr = next
+ 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(getNextPage func(context.Context, VirtualMachineListResult) (VirtualMachineListResult, error)) VirtualMachineListResultPage {
+ return VirtualMachineListResultPage{fn: getNextPage}
+}
+
+// VirtualMachineProperties describes the properties of a Virtual Machine.
+type VirtualMachineProperties struct {
+ // HardwareProfile - Specifies the hardware settings for the virtual machine.
+ HardwareProfile *HardwareProfile `json:"hardwareProfile,omitempty"`
+ // StorageProfile - Specifies the storage settings for the virtual machine disks.
+ StorageProfile *StorageProfile `json:"storageProfile,omitempty"`
+ // AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the virtual machine.
+ AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"`
+ // OsProfile - Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned.
+ OsProfile *OSProfile `json:"osProfile,omitempty"`
+ // NetworkProfile - Specifies the network interfaces of the virtual machine.
+ NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"`
+ // 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. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set.
This property cannot exist along with a non-null properties.virtualMachineScaleSet reference.
+ AvailabilitySet *SubResource `json:"availabilitySet,omitempty"`
+ // VirtualMachineScaleSet - Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set.
This property cannot exist along with a non-null properties.availabilitySet reference.
Minimum api‐version: 2019‐03‐01
+ VirtualMachineScaleSet *SubResource `json:"virtualMachineScaleSet,omitempty"`
+ // ProximityPlacementGroup - Specifies information about the proximity placement group that the virtual machine should be assigned to.
Minimum api-version: 2018-04-01.
+ ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"`
+ // Priority - Specifies the priority for the virtual machine.
Minimum api-version: 2019-03-01. Possible values include: 'Regular', 'Low', 'Spot'
+ Priority VirtualMachinePriorityTypes `json:"priority,omitempty"`
+ // EvictionPolicy - Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set.
For Azure Spot virtual machines, the only supported value is 'Deallocate' and the minimum api-version is 2019-03-01.
For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete'
+ EvictionPolicy VirtualMachineEvictionPolicyTypes `json:"evictionPolicy,omitempty"`
+ // BillingProfile - Specifies the billing related details of a Azure Spot virtual machine.
Minimum api-version: 2019-03-01.
+ BillingProfile *BillingProfile `json:"billingProfile,omitempty"`
+ // Host - Specifies information about the dedicated host that the virtual machine resides in.
Minimum api-version: 2018-10-01.
+ Host *SubResource `json:"host,omitempty"`
+ // 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"`
+}
+
+// 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"`
+}
+
+// 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"`
+ // WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
+ WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
+ // CreateOption - The create option. Possible values include: 'DiskCreateOptionTypesFromImage', 'DiskCreateOptionTypesEmpty', 'DiskCreateOptionTypesAttach'
+ CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
+ // DiskSizeGB - Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image.
This value cannot be larger than 1023 GB
+ DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
+ // ManagedDisk - The managed disk parameters.
+ ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"`
+ // DiskIOPSReadWrite - Specifies the Read-Write IOPS for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB.
+ DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"`
+ // DiskMBpsReadWrite - Specifies the bandwidth in MB per second for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB.
+ DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"`
+}
+
+// VirtualMachineScaleSetExtension describes a Virtual Machine Scale Set Extension.
+type VirtualMachineScaleSetExtension struct {
+ autorest.Response `json:"-"`
+ // Name - The name of the extension.
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ *VirtualMachineScaleSetExtensionProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineScaleSetExtension.
+func (vmsse VirtualMachineScaleSetExtension) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmsse.Name != nil {
+ objectMap["name"] = vmsse.Name
+ }
+ if vmsse.VirtualMachineScaleSetExtensionProperties != nil {
+ objectMap["properties"] = vmsse.VirtualMachineScaleSetExtensionProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetExtension struct.
+func (vmsse *VirtualMachineScaleSetExtension) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vmsse.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ vmsse.Type = &typeVar
+ }
+ case "properties":
+ if v != nil {
+ var virtualMachineScaleSetExtensionProperties VirtualMachineScaleSetExtensionProperties
+ err = json.Unmarshal(*v, &virtualMachineScaleSetExtensionProperties)
+ if err != nil {
+ return err
+ }
+ vmsse.VirtualMachineScaleSetExtensionProperties = &virtualMachineScaleSetExtensionProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vmsse.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualMachineScaleSetExtensionListResult the List VM scale set extension operation response.
+type VirtualMachineScaleSetExtensionListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of VM scale set extensions.
+ Value *[]VirtualMachineScaleSetExtension `json:"value,omitempty"`
+ // NextLink - The uri to fetch the next page of VM scale set extensions. Call ListNext() with this to fetch the next page of VM scale set extensions.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// VirtualMachineScaleSetExtensionListResultIterator provides access to a complete listing of
+// VirtualMachineScaleSetExtension values.
+type VirtualMachineScaleSetExtensionListResultIterator struct {
+ i int
+ page VirtualMachineScaleSetExtensionListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *VirtualMachineScaleSetExtensionListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *VirtualMachineScaleSetExtensionListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter VirtualMachineScaleSetExtensionListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter VirtualMachineScaleSetExtensionListResultIterator) Response() VirtualMachineScaleSetExtensionListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter VirtualMachineScaleSetExtensionListResultIterator) Value() VirtualMachineScaleSetExtension {
+ if !iter.page.NotDone() {
+ return VirtualMachineScaleSetExtension{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the VirtualMachineScaleSetExtensionListResultIterator type.
+func NewVirtualMachineScaleSetExtensionListResultIterator(page VirtualMachineScaleSetExtensionListResultPage) VirtualMachineScaleSetExtensionListResultIterator {
+ return VirtualMachineScaleSetExtensionListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (vmsselr VirtualMachineScaleSetExtensionListResult) IsEmpty() bool {
+ return vmsselr.Value == nil || len(*vmsselr.Value) == 0
+}
+
+// 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.NextLink == nil || len(to.String(vmsselr.NextLink)) < 1 {
+ 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)
+ }()
+ }
+ next, err := page.fn(ctx, page.vmsselr)
+ if err != nil {
+ return err
+ }
+ page.vmsselr = next
+ 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(getNextPage func(context.Context, VirtualMachineScaleSetExtensionListResult) (VirtualMachineScaleSetExtensionListResult, error)) VirtualMachineScaleSetExtensionListResultPage {
+ return VirtualMachineScaleSetExtensionListResultPage{fn: getNextPage}
+}
+
+// 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"`
+ // ProvisionAfterExtensions - Collection of extension names after which this extension needs to be provisioned.
+ ProvisionAfterExtensions *[]string `json:"provisionAfterExtensions,omitempty"`
+}
+
+// VirtualMachineScaleSetExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
+type VirtualMachineScaleSetExtensionsCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// 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.
+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
+}
+
+// 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
+}
+
+// VirtualMachineScaleSetExtensionUpdate describes a Virtual Machine Scale Set Extension.
+type VirtualMachineScaleSetExtensionUpdate struct {
+ // Name - READ-ONLY; The name of the extension.
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ *VirtualMachineScaleSetExtensionProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineScaleSetExtensionUpdate.
+func (vmsseu VirtualMachineScaleSetExtensionUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmsseu.VirtualMachineScaleSetExtensionProperties != nil {
+ objectMap["properties"] = vmsseu.VirtualMachineScaleSetExtensionProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetExtensionUpdate struct.
+func (vmsseu *VirtualMachineScaleSetExtensionUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vmsseu.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ vmsseu.Type = &typeVar
+ }
+ case "properties":
+ if v != nil {
+ var virtualMachineScaleSetExtensionProperties VirtualMachineScaleSetExtensionProperties
+ err = json.Unmarshal(*v, &virtualMachineScaleSetExtensionProperties)
+ if err != nil {
+ return err
+ }
+ vmsseu.VirtualMachineScaleSetExtensionProperties = &virtualMachineScaleSetExtensionProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vmsseu.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualMachineScaleSetIdentity identity for the virtual machine scale set.
+type VirtualMachineScaleSetIdentity struct {
+ // PrincipalID - READ-ONLY; The principal id of virtual machine scale set identity. This property will only be provided for a system assigned identity.
+ PrincipalID *string `json:"principalId,omitempty"`
+ // TenantID - READ-ONLY; The tenant id associated with the virtual machine scale set. This property will only be provided for a system assigned identity.
+ TenantID *string `json:"tenantId,omitempty"`
+ // Type - The type of identity used for the virtual machine scale set. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine scale set. Possible values include: 'ResourceIdentityTypeSystemAssigned', 'ResourceIdentityTypeUserAssigned', 'ResourceIdentityTypeSystemAssignedUserAssigned', 'ResourceIdentityTypeNone'
+ Type ResourceIdentityType `json:"type,omitempty"`
+ // UserAssignedIdentities - The list of user identities associated with the virtual machine scale set. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
+ UserAssignedIdentities map[string]*VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineScaleSetIdentity.
+func (vmssi VirtualMachineScaleSetIdentity) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmssi.Type != "" {
+ objectMap["type"] = vmssi.Type
+ }
+ if vmssi.UserAssignedIdentities != nil {
+ objectMap["userAssignedIdentities"] = vmssi.UserAssignedIdentities
+ }
+ return json.Marshal(objectMap)
+}
+
+// VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue ...
+type VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue struct {
+ // PrincipalID - READ-ONLY; The principal id of user assigned identity.
+ PrincipalID *string `json:"principalId,omitempty"`
+ // ClientID - READ-ONLY; The client id of user assigned identity.
+ ClientID *string `json:"clientId,omitempty"`
+}
+
+// VirtualMachineScaleSetInstanceView the instance view of a virtual machine scale set.
+type VirtualMachineScaleSetInstanceView struct {
+ autorest.Response `json:"-"`
+ // VirtualMachine - READ-ONLY; The instance view status summary for the virtual machine scale set.
+ VirtualMachine *VirtualMachineScaleSetInstanceViewStatusesSummary `json:"virtualMachine,omitempty"`
+ // Extensions - READ-ONLY; The extensions information.
+ Extensions *[]VirtualMachineScaleSetVMExtensionsSummary `json:"extensions,omitempty"`
+ // Statuses - The resource status information.
+ Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
+ // OrchestrationServices - READ-ONLY; The orchestration services information.
+ OrchestrationServices *[]OrchestrationServiceSummary `json:"orchestrationServices,omitempty"`
+}
+
+// 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"`
+ // ApplicationSecurityGroups - Specifies an array of references to application security group.
+ ApplicationSecurityGroups *[]SubResource `json:"applicationSecurityGroups,omitempty"`
+ // LoadBalancerBackendAddressPools - Specifies an array of references to backend address pools of load balancers. A scale set can reference backend address pools of one public and one internal load balancer. Multiple scale sets cannot use the same 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"`
+}
+
+// VirtualMachineScaleSetIPTag contains the IP tag associated with the public IP address.
+type VirtualMachineScaleSetIPTag struct {
+ // IPTagType - IP tag type. Example: FirstPartyUsage.
+ IPTagType *string `json:"ipTagType,omitempty"`
+ // Tag - IP tag associated with the public IP. Example: SQL, Storage etc.
+ Tag *string `json:"tag,omitempty"`
+}
+
+// VirtualMachineScaleSetListOSUpgradeHistory list of Virtual Machine Scale Set OS Upgrade History
+// operation response.
+type VirtualMachineScaleSetListOSUpgradeHistory struct {
+ autorest.Response `json:"-"`
+ // Value - The list of OS upgrades performed on the virtual machine scale set.
+ Value *[]UpgradeOperationHistoricalStatusInfo `json:"value,omitempty"`
+ // NextLink - The uri to fetch the next page of OS Upgrade History. Call ListNext() with this to fetch the next page of history of upgrades.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// VirtualMachineScaleSetListOSUpgradeHistoryIterator provides access to a complete listing of
+// UpgradeOperationHistoricalStatusInfo values.
+type VirtualMachineScaleSetListOSUpgradeHistoryIterator struct {
+ i int
+ page VirtualMachineScaleSetListOSUpgradeHistoryPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *VirtualMachineScaleSetListOSUpgradeHistoryIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListOSUpgradeHistoryIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *VirtualMachineScaleSetListOSUpgradeHistoryIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter VirtualMachineScaleSetListOSUpgradeHistoryIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter VirtualMachineScaleSetListOSUpgradeHistoryIterator) Response() VirtualMachineScaleSetListOSUpgradeHistory {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter VirtualMachineScaleSetListOSUpgradeHistoryIterator) Value() UpgradeOperationHistoricalStatusInfo {
+ if !iter.page.NotDone() {
+ return UpgradeOperationHistoricalStatusInfo{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the VirtualMachineScaleSetListOSUpgradeHistoryIterator type.
+func NewVirtualMachineScaleSetListOSUpgradeHistoryIterator(page VirtualMachineScaleSetListOSUpgradeHistoryPage) VirtualMachineScaleSetListOSUpgradeHistoryIterator {
+ return VirtualMachineScaleSetListOSUpgradeHistoryIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (vmsslouh VirtualMachineScaleSetListOSUpgradeHistory) IsEmpty() bool {
+ return vmsslouh.Value == nil || len(*vmsslouh.Value) == 0
+}
+
+// virtualMachineScaleSetListOSUpgradeHistoryPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (vmsslouh VirtualMachineScaleSetListOSUpgradeHistory) virtualMachineScaleSetListOSUpgradeHistoryPreparer(ctx context.Context) (*http.Request, error) {
+ if vmsslouh.NextLink == nil || len(to.String(vmsslouh.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(vmsslouh.NextLink)))
+}
+
+// VirtualMachineScaleSetListOSUpgradeHistoryPage contains a page of UpgradeOperationHistoricalStatusInfo
+// values.
+type VirtualMachineScaleSetListOSUpgradeHistoryPage struct {
+ fn func(context.Context, VirtualMachineScaleSetListOSUpgradeHistory) (VirtualMachineScaleSetListOSUpgradeHistory, error)
+ vmsslouh VirtualMachineScaleSetListOSUpgradeHistory
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *VirtualMachineScaleSetListOSUpgradeHistoryPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListOSUpgradeHistoryPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.vmsslouh)
+ if err != nil {
+ return err
+ }
+ page.vmsslouh = next
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *VirtualMachineScaleSetListOSUpgradeHistoryPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page VirtualMachineScaleSetListOSUpgradeHistoryPage) NotDone() bool {
+ return !page.vmsslouh.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page VirtualMachineScaleSetListOSUpgradeHistoryPage) Response() VirtualMachineScaleSetListOSUpgradeHistory {
+ return page.vmsslouh
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page VirtualMachineScaleSetListOSUpgradeHistoryPage) Values() []UpgradeOperationHistoricalStatusInfo {
+ if page.vmsslouh.IsEmpty() {
+ return nil
+ }
+ return *page.vmsslouh.Value
+}
+
+// Creates a new instance of the VirtualMachineScaleSetListOSUpgradeHistoryPage type.
+func NewVirtualMachineScaleSetListOSUpgradeHistoryPage(getNextPage func(context.Context, VirtualMachineScaleSetListOSUpgradeHistory) (VirtualMachineScaleSetListOSUpgradeHistory, error)) VirtualMachineScaleSetListOSUpgradeHistoryPage {
+ return VirtualMachineScaleSetListOSUpgradeHistoryPage{fn: getNextPage}
+}
+
+// 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
+}
+
+// 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.NextLink == nil || len(to.String(vmsslr.NextLink)) < 1 {
+ 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)
+ }()
+ }
+ next, err := page.fn(ctx, page.vmsslr)
+ if err != nil {
+ return err
+ }
+ page.vmsslr = next
+ 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(getNextPage func(context.Context, VirtualMachineScaleSetListResult) (VirtualMachineScaleSetListResult, error)) VirtualMachineScaleSetListResultPage {
+ return VirtualMachineScaleSetListResultPage{fn: getNextPage}
+}
+
+// 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
+}
+
+// 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.NextLink == nil || len(to.String(vmsslsr.NextLink)) < 1 {
+ 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)
+ }()
+ }
+ next, err := page.fn(ctx, page.vmsslsr)
+ if err != nil {
+ return err
+ }
+ page.vmsslsr = next
+ 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(getNextPage func(context.Context, VirtualMachineScaleSetListSkusResult) (VirtualMachineScaleSetListSkusResult, error)) VirtualMachineScaleSetListSkusResultPage {
+ return VirtualMachineScaleSetListSkusResultPage{fn: getNextPage}
+}
+
+// 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
+}
+
+// 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.NextLink == nil || len(to.String(vmsslwlr.NextLink)) < 1 {
+ 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)
+ }()
+ }
+ next, err := page.fn(ctx, page.vmsslwlr)
+ if err != nil {
+ return err
+ }
+ page.vmsslwlr = next
+ 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(getNextPage func(context.Context, VirtualMachineScaleSetListWithLinkResult) (VirtualMachineScaleSetListWithLinkResult, error)) VirtualMachineScaleSetListWithLinkResultPage {
+ return VirtualMachineScaleSetListWithLinkResultPage{fn: getNextPage}
+}
+
+// VirtualMachineScaleSetManagedDiskParameters describes the parameters of a ScaleSet managed disk.
+type VirtualMachineScaleSetManagedDiskParameters struct {
+ // StorageAccountType - Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS'
+ StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
+ // DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed disk.
+ DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`
+}
+
+// VirtualMachineScaleSetNetworkConfiguration describes a virtual machine scale set network profile's
+// network configurations.
+type VirtualMachineScaleSetNetworkConfiguration struct {
+ // Name - The network configuration name.
+ Name *string `json:"name,omitempty"`
+ *VirtualMachineScaleSetNetworkConfigurationProperties `json:"properties,omitempty"`
+ // ID - Resource Id
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineScaleSetNetworkConfiguration.
+func (vmssnc VirtualMachineScaleSetNetworkConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmssnc.Name != nil {
+ objectMap["name"] = vmssnc.Name
+ }
+ if vmssnc.VirtualMachineScaleSetNetworkConfigurationProperties != nil {
+ objectMap["properties"] = vmssnc.VirtualMachineScaleSetNetworkConfigurationProperties
+ }
+ if vmssnc.ID != nil {
+ objectMap["id"] = vmssnc.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetNetworkConfiguration struct.
+func (vmssnc *VirtualMachineScaleSetNetworkConfiguration) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vmssnc.Name = &name
+ }
+ case "properties":
+ if v != nil {
+ var virtualMachineScaleSetNetworkConfigurationProperties VirtualMachineScaleSetNetworkConfigurationProperties
+ err = json.Unmarshal(*v, &virtualMachineScaleSetNetworkConfigurationProperties)
+ if err != nil {
+ return err
+ }
+ vmssnc.VirtualMachineScaleSetNetworkConfigurationProperties = &virtualMachineScaleSetNetworkConfigurationProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vmssnc.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualMachineScaleSetNetworkConfigurationDNSSettings describes a virtual machines scale sets network
+// configuration's DNS settings.
+type VirtualMachineScaleSetNetworkConfigurationDNSSettings struct {
+ // DNSServers - List of DNS servers IP addresses
+ DNSServers *[]string `json:"dnsServers,omitempty"`
+}
+
+// VirtualMachineScaleSetNetworkConfigurationProperties describes a virtual machine scale set network
+// profile's IP configuration.
+type VirtualMachineScaleSetNetworkConfigurationProperties struct {
+ // Primary - Specifies the primary network interface in case the virtual machine has more than 1 network interface.
+ Primary *bool `json:"primary,omitempty"`
+ // EnableAcceleratedNetworking - Specifies whether the network interface is accelerated networking-enabled.
+ EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
+ // NetworkSecurityGroup - The network security group.
+ NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
+ // DNSSettings - The dns settings to be applied on the network interfaces.
+ DNSSettings *VirtualMachineScaleSetNetworkConfigurationDNSSettings `json:"dnsSettings,omitempty"`
+ // IPConfigurations - Specifies the IP configurations of the network interface.
+ IPConfigurations *[]VirtualMachineScaleSetIPConfiguration `json:"ipConfigurations,omitempty"`
+ // EnableIPForwarding - Whether IP forwarding enabled on this NIC.
+ EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
+}
+
+// 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"`
+ // WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
+ WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
+ // CreateOption - Specifies how the virtual machines in the scale set should be created.
The only allowed value is: **FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'DiskCreateOptionTypesFromImage', 'DiskCreateOptionTypesEmpty', 'DiskCreateOptionTypesAttach'
+ CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
+ // DiffDiskSettings - Specifies the ephemeral disk Settings for the operating system disk used by the virtual machine scale set.
+ DiffDiskSettings *DiffDiskSettings `json:"diffDiskSettings,omitempty"`
+ // DiskSizeGB - Specifies the size of the operating system disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image.
This value cannot be larger than 1023 GB
+ DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
+ // OsType - This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD.
Possible values are:
**Windows**
**Linux**. Possible values include: '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.
**Windows-only restriction:** Cannot end in "."
**Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".
**Minimum-length (Linux):** 1 character
**Max-length (Linux):** 64 characters
**Max-length (Windows):** 20 characters
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_])
**Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"
For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/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"`
+ // AutomaticRepairsPolicy - Policy for automatic repairs.
+ AutomaticRepairsPolicy *AutomaticRepairsPolicy `json:"automaticRepairsPolicy,omitempty"`
+ // VirtualMachineProfile - The virtual machine profile.
+ VirtualMachineProfile *VirtualMachineScaleSetVMProfile `json:"virtualMachineProfile,omitempty"`
+ // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // Overprovision - Specifies whether the Virtual Machine Scale Set should be overprovisioned.
+ Overprovision *bool `json:"overprovision,omitempty"`
+ // DoNotRunExtensionsOnOverprovisionedVMs - When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs.
+ DoNotRunExtensionsOnOverprovisionedVMs *bool `json:"doNotRunExtensionsOnOverprovisionedVMs,omitempty"`
+ // UniqueID - READ-ONLY; Specifies the ID which uniquely identifies a Virtual Machine Scale Set.
+ UniqueID *string `json:"uniqueId,omitempty"`
+ // SinglePlacementGroup - When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true.
+ SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"`
+ // ZoneBalance - Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage.
+ ZoneBalance *bool `json:"zoneBalance,omitempty"`
+ // PlatformFaultDomainCount - Fault Domain count for each placement group.
+ PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"`
+ // ProximityPlacementGroup - Specifies information about the proximity placement group that the virtual machine scale set should be assigned to.
Minimum api-version: 2018-04-01.
+ ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"`
+ // AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type.
+ AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"`
+ // ScaleInPolicy - Specifies the scale-in policy that decides which virtual machines are chosen for removal when a Virtual Machine Scale Set is scaled-in.
+ ScaleInPolicy *ScaleInPolicy `json:"scaleInPolicy,omitempty"`
+}
+
+// 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"`
+ // IPTags - The list of IP tags associated with the public IP address.
+ IPTags *[]VirtualMachineScaleSetIPTag `json:"ipTags,omitempty"`
+ // PublicIPPrefix - The PublicIPPrefix from which to allocate publicIP addresses.
+ PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
+ // PublicIPAddressVersion - Available from Api-Version 2019-07-01 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
+ PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
+}
+
+// VirtualMachineScaleSetReimageParameters describes a Virtual Machine Scale Set VM Reimage Parameters.
+type VirtualMachineScaleSetReimageParameters struct {
+ // InstanceIds - The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
+ InstanceIds *[]string `json:"instanceIds,omitempty"`
+ // TempDisk - Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk.
+ TempDisk *bool `json:"tempDisk,omitempty"`
+}
+
+// VirtualMachineScaleSetRollingUpgradesCancelFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
+type VirtualMachineScaleSetRollingUpgradesCancelFuture struct {
+ azure.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
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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"`
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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.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
+}
+
+// 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
+}
+
+// VirtualMachineScaleSetUpdate describes a Virtual Machine Scale Set.
+type VirtualMachineScaleSetUpdate struct {
+ // Sku - The virtual machine scale set sku.
+ Sku *Sku `json:"sku,omitempty"`
+ // Plan - The purchase plan when deploying a virtual machine scale set from VM Marketplace images.
+ Plan *Plan `json:"plan,omitempty"`
+ *VirtualMachineScaleSetUpdateProperties `json:"properties,omitempty"`
+ // Identity - The identity of the virtual machine scale set, if configured.
+ Identity *VirtualMachineScaleSetIdentity `json:"identity,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdate.
+func (vmssu VirtualMachineScaleSetUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmssu.Sku != nil {
+ objectMap["sku"] = vmssu.Sku
+ }
+ if vmssu.Plan != nil {
+ objectMap["plan"] = vmssu.Plan
+ }
+ if vmssu.VirtualMachineScaleSetUpdateProperties != nil {
+ objectMap["properties"] = vmssu.VirtualMachineScaleSetUpdateProperties
+ }
+ if vmssu.Identity != nil {
+ objectMap["identity"] = vmssu.Identity
+ }
+ if vmssu.Tags != nil {
+ objectMap["tags"] = vmssu.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdate struct.
+func (vmssu *VirtualMachineScaleSetUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "sku":
+ if v != nil {
+ var sku Sku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ vmssu.Sku = &sku
+ }
+ case "plan":
+ if v != nil {
+ var plan Plan
+ err = json.Unmarshal(*v, &plan)
+ if err != nil {
+ return err
+ }
+ vmssu.Plan = &plan
+ }
+ case "properties":
+ if v != nil {
+ var virtualMachineScaleSetUpdateProperties VirtualMachineScaleSetUpdateProperties
+ err = json.Unmarshal(*v, &virtualMachineScaleSetUpdateProperties)
+ if err != nil {
+ return err
+ }
+ vmssu.VirtualMachineScaleSetUpdateProperties = &virtualMachineScaleSetUpdateProperties
+ }
+ case "identity":
+ if v != nil {
+ var identity VirtualMachineScaleSetIdentity
+ err = json.Unmarshal(*v, &identity)
+ if err != nil {
+ return err
+ }
+ vmssu.Identity = &identity
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ vmssu.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualMachineScaleSetUpdateIPConfiguration describes a virtual machine scale set network profile's IP
+// configuration. NOTE: The subnet of a scale set may be modified as long as the original subnet and the
+// new subnet are in the same virtual network
+type VirtualMachineScaleSetUpdateIPConfiguration struct {
+ // Name - The IP configuration name.
+ Name *string `json:"name,omitempty"`
+ *VirtualMachineScaleSetUpdateIPConfigurationProperties `json:"properties,omitempty"`
+ // ID - Resource Id
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdateIPConfiguration.
+func (vmssuic VirtualMachineScaleSetUpdateIPConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmssuic.Name != nil {
+ objectMap["name"] = vmssuic.Name
+ }
+ if vmssuic.VirtualMachineScaleSetUpdateIPConfigurationProperties != nil {
+ objectMap["properties"] = vmssuic.VirtualMachineScaleSetUpdateIPConfigurationProperties
+ }
+ if vmssuic.ID != nil {
+ objectMap["id"] = vmssuic.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdateIPConfiguration struct.
+func (vmssuic *VirtualMachineScaleSetUpdateIPConfiguration) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vmssuic.Name = &name
+ }
+ case "properties":
+ if v != nil {
+ var virtualMachineScaleSetUpdateIPConfigurationProperties VirtualMachineScaleSetUpdateIPConfigurationProperties
+ err = json.Unmarshal(*v, &virtualMachineScaleSetUpdateIPConfigurationProperties)
+ if err != nil {
+ return err
+ }
+ vmssuic.VirtualMachineScaleSetUpdateIPConfigurationProperties = &virtualMachineScaleSetUpdateIPConfigurationProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vmssuic.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualMachineScaleSetUpdateIPConfigurationProperties describes a virtual machine scale set network
+// profile's IP configuration properties.
+type VirtualMachineScaleSetUpdateIPConfigurationProperties struct {
+ // Subnet - The subnet.
+ Subnet *APIEntityReference `json:"subnet,omitempty"`
+ // Primary - Specifies the primary IP Configuration in case the network interface has more than one IP Configuration.
+ Primary *bool `json:"primary,omitempty"`
+ // PublicIPAddressConfiguration - The publicIPAddressConfiguration.
+ PublicIPAddressConfiguration *VirtualMachineScaleSetUpdatePublicIPAddressConfiguration `json:"publicIPAddressConfiguration,omitempty"`
+ // PrivateIPAddressVersion - Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
+ PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
+ // ApplicationGatewayBackendAddressPools - The application gateway backend address pools.
+ ApplicationGatewayBackendAddressPools *[]SubResource `json:"applicationGatewayBackendAddressPools,omitempty"`
+ // ApplicationSecurityGroups - Specifies an array of references to application security group.
+ ApplicationSecurityGroups *[]SubResource `json:"applicationSecurityGroups,omitempty"`
+ // LoadBalancerBackendAddressPools - The load balancer backend address pools.
+ LoadBalancerBackendAddressPools *[]SubResource `json:"loadBalancerBackendAddressPools,omitempty"`
+ // LoadBalancerInboundNatPools - The load balancer inbound nat pools.
+ LoadBalancerInboundNatPools *[]SubResource `json:"loadBalancerInboundNatPools,omitempty"`
+}
+
+// VirtualMachineScaleSetUpdateNetworkConfiguration describes a virtual machine scale set network profile's
+// network configurations.
+type VirtualMachineScaleSetUpdateNetworkConfiguration struct {
+ // Name - The network configuration name.
+ Name *string `json:"name,omitempty"`
+ *VirtualMachineScaleSetUpdateNetworkConfigurationProperties `json:"properties,omitempty"`
+ // ID - Resource Id
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdateNetworkConfiguration.
+func (vmssunc VirtualMachineScaleSetUpdateNetworkConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmssunc.Name != nil {
+ objectMap["name"] = vmssunc.Name
+ }
+ if vmssunc.VirtualMachineScaleSetUpdateNetworkConfigurationProperties != nil {
+ objectMap["properties"] = vmssunc.VirtualMachineScaleSetUpdateNetworkConfigurationProperties
+ }
+ if vmssunc.ID != nil {
+ objectMap["id"] = vmssunc.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdateNetworkConfiguration struct.
+func (vmssunc *VirtualMachineScaleSetUpdateNetworkConfiguration) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vmssunc.Name = &name
+ }
+ case "properties":
+ if v != nil {
+ var virtualMachineScaleSetUpdateNetworkConfigurationProperties VirtualMachineScaleSetUpdateNetworkConfigurationProperties
+ err = json.Unmarshal(*v, &virtualMachineScaleSetUpdateNetworkConfigurationProperties)
+ if err != nil {
+ return err
+ }
+ vmssunc.VirtualMachineScaleSetUpdateNetworkConfigurationProperties = &virtualMachineScaleSetUpdateNetworkConfigurationProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vmssunc.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualMachineScaleSetUpdateNetworkConfigurationProperties describes a virtual machine scale set
+// updatable network profile's IP configuration.Use this object for updating network profile's IP
+// Configuration.
+type VirtualMachineScaleSetUpdateNetworkConfigurationProperties struct {
+ // Primary - Whether this is a primary NIC on a virtual machine.
+ Primary *bool `json:"primary,omitempty"`
+ // EnableAcceleratedNetworking - Specifies whether the network interface is accelerated networking-enabled.
+ EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
+ // NetworkSecurityGroup - The network security group.
+ NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
+ // DNSSettings - The dns settings to be applied on the network interfaces.
+ DNSSettings *VirtualMachineScaleSetNetworkConfigurationDNSSettings `json:"dnsSettings,omitempty"`
+ // IPConfigurations - The virtual machine scale set IP Configuration.
+ IPConfigurations *[]VirtualMachineScaleSetUpdateIPConfiguration `json:"ipConfigurations,omitempty"`
+ // EnableIPForwarding - Whether IP forwarding enabled on this NIC.
+ EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
+}
+
+// VirtualMachineScaleSetUpdateNetworkProfile describes a virtual machine scale set network profile.
+type VirtualMachineScaleSetUpdateNetworkProfile struct {
+ // HealthProbe - A reference to a load balancer probe used to determine the health of an instance in the virtual machine scale set. The reference will be in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'.
+ HealthProbe *APIEntityReference `json:"healthProbe,omitempty"`
+ // NetworkInterfaceConfigurations - The list of network configurations.
+ NetworkInterfaceConfigurations *[]VirtualMachineScaleSetUpdateNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"`
+}
+
+// VirtualMachineScaleSetUpdateOSDisk describes virtual machine scale set operating system disk Update
+// Object. This should be used for Updating VMSS OS Disk.
+type VirtualMachineScaleSetUpdateOSDisk struct {
+ // Caching - The caching type. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite'
+ Caching CachingTypes `json:"caching,omitempty"`
+ // WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
+ WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
+ // DiskSizeGB - Specifies the size of the operating system disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image.
This value cannot be larger than 1023 GB
+ DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
+ // Image - The Source User Image VirtualHardDisk. This VirtualHardDisk will be copied before using it to attach to the Virtual Machine. If SourceImage is provided, the destination VirtualHardDisk should not exist.
+ Image *VirtualHardDisk `json:"image,omitempty"`
+ // VhdContainers - The list of virtual hard disk container uris.
+ VhdContainers *[]string `json:"vhdContainers,omitempty"`
+ // ManagedDisk - The managed disk parameters.
+ ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"`
+}
+
+// VirtualMachineScaleSetUpdateOSProfile describes a virtual machine scale set OS profile.
+type VirtualMachineScaleSetUpdateOSProfile struct {
+ // CustomData - A base-64 encoded string of custom data.
+ CustomData *string `json:"customData,omitempty"`
+ // WindowsConfiguration - The Windows Configuration of the OS profile.
+ WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"`
+ // LinuxConfiguration - The Linux Configuration of the OS profile.
+ LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"`
+ // Secrets - The List of certificates for addition to the VM.
+ Secrets *[]VaultSecretGroup `json:"secrets,omitempty"`
+}
+
+// VirtualMachineScaleSetUpdateProperties describes the properties of a Virtual Machine Scale Set.
+type VirtualMachineScaleSetUpdateProperties struct {
+ // UpgradePolicy - The upgrade policy.
+ UpgradePolicy *UpgradePolicy `json:"upgradePolicy,omitempty"`
+ // AutomaticRepairsPolicy - Policy for automatic repairs.
+ AutomaticRepairsPolicy *AutomaticRepairsPolicy `json:"automaticRepairsPolicy,omitempty"`
+ // VirtualMachineProfile - The virtual machine profile.
+ VirtualMachineProfile *VirtualMachineScaleSetUpdateVMProfile `json:"virtualMachineProfile,omitempty"`
+ // Overprovision - Specifies whether the Virtual Machine Scale Set should be overprovisioned.
+ Overprovision *bool `json:"overprovision,omitempty"`
+ // DoNotRunExtensionsOnOverprovisionedVMs - When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs.
+ DoNotRunExtensionsOnOverprovisionedVMs *bool `json:"doNotRunExtensionsOnOverprovisionedVMs,omitempty"`
+ // SinglePlacementGroup - When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true.
+ SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"`
+ // AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type.
+ AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"`
+ // ScaleInPolicy - Specifies the scale-in policy that decides which virtual machines are chosen for removal when a Virtual Machine Scale Set is scaled-in.
+ ScaleInPolicy *ScaleInPolicy `json:"scaleInPolicy,omitempty"`
+ // ProximityPlacementGroup - Specifies information about the proximity placement group that the virtual machine scale set should be assigned to.
Minimum api-version: 2018-04-01.
+ ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"`
+}
+
+// VirtualMachineScaleSetUpdatePublicIPAddressConfiguration describes a virtual machines scale set IP
+// Configuration's PublicIPAddress configuration
+type VirtualMachineScaleSetUpdatePublicIPAddressConfiguration struct {
+ // Name - The publicIP address configuration name.
+ Name *string `json:"name,omitempty"`
+ *VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdatePublicIPAddressConfiguration.
+func (vmssupiac VirtualMachineScaleSetUpdatePublicIPAddressConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmssupiac.Name != nil {
+ objectMap["name"] = vmssupiac.Name
+ }
+ if vmssupiac.VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties != nil {
+ objectMap["properties"] = vmssupiac.VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdatePublicIPAddressConfiguration struct.
+func (vmssupiac *VirtualMachineScaleSetUpdatePublicIPAddressConfiguration) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vmssupiac.Name = &name
+ }
+ case "properties":
+ if v != nil {
+ var virtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties
+ err = json.Unmarshal(*v, &virtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties)
+ if err != nil {
+ return err
+ }
+ vmssupiac.VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties = &virtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties describes a virtual machines scale
+// set IP Configuration's PublicIPAddress configuration
+type VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties struct {
+ // IdleTimeoutInMinutes - The idle timeout of the public IP address.
+ IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
+ // DNSSettings - The dns settings to be applied on the publicIP addresses .
+ DNSSettings *VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings `json:"dnsSettings,omitempty"`
+}
+
+// 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"`
+ // BillingProfile - Specifies the billing related details of a Azure Spot VMSS.
Minimum api-version: 2019-03-01.
+ BillingProfile *BillingProfile `json:"billingProfile,omitempty"`
+ // ScheduledEventsProfile - Specifies Scheduled Event related configurations.
+ ScheduledEventsProfile *ScheduledEventsProfile `json:"scheduledEventsProfile,omitempty"`
+}
+
+// VirtualMachineScaleSetVM describes a virtual machine scale set virtual machine.
+type VirtualMachineScaleSetVM struct {
+ autorest.Response `json:"-"`
+ // InstanceID - READ-ONLY; The virtual machine instance ID.
+ InstanceID *string `json:"instanceId,omitempty"`
+ // Sku - READ-ONLY; The virtual machine SKU.
+ Sku *Sku `json:"sku,omitempty"`
+ *VirtualMachineScaleSetVMProperties `json:"properties,omitempty"`
+ // Plan - Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**.
+ Plan *Plan `json:"plan,omitempty"`
+ // Resources - READ-ONLY; The virtual machine child extension resources.
+ Resources *[]VirtualMachineExtension `json:"resources,omitempty"`
+ // Zones - READ-ONLY; The virtual machine zones.
+ Zones *[]string `json:"zones,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVM.
+func (vmssv VirtualMachineScaleSetVM) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmssv.VirtualMachineScaleSetVMProperties != nil {
+ objectMap["properties"] = vmssv.VirtualMachineScaleSetVMProperties
+ }
+ if vmssv.Plan != nil {
+ objectMap["plan"] = vmssv.Plan
+ }
+ if vmssv.Location != nil {
+ objectMap["location"] = vmssv.Location
+ }
+ if vmssv.Tags != nil {
+ objectMap["tags"] = vmssv.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetVM struct.
+func (vmssv *VirtualMachineScaleSetVM) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "instanceId":
+ if v != nil {
+ var instanceID string
+ err = json.Unmarshal(*v, &instanceID)
+ if err != nil {
+ return err
+ }
+ vmssv.InstanceID = &instanceID
+ }
+ case "sku":
+ if v != nil {
+ var sku Sku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ vmssv.Sku = &sku
+ }
+ case "properties":
+ if v != nil {
+ var virtualMachineScaleSetVMProperties VirtualMachineScaleSetVMProperties
+ err = json.Unmarshal(*v, &virtualMachineScaleSetVMProperties)
+ if err != nil {
+ return err
+ }
+ vmssv.VirtualMachineScaleSetVMProperties = &virtualMachineScaleSetVMProperties
+ }
+ case "plan":
+ if v != nil {
+ var plan Plan
+ err = json.Unmarshal(*v, &plan)
+ if err != nil {
+ return err
+ }
+ vmssv.Plan = &plan
+ }
+ case "resources":
+ if v != nil {
+ var resources []VirtualMachineExtension
+ err = json.Unmarshal(*v, &resources)
+ if err != nil {
+ return err
+ }
+ vmssv.Resources = &resources
+ }
+ case "zones":
+ if v != nil {
+ var zones []string
+ err = json.Unmarshal(*v, &zones)
+ if err != nil {
+ return err
+ }
+ vmssv.Zones = &zones
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vmssv.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vmssv.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ vmssv.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ vmssv.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ vmssv.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// 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
+}
+
+// VirtualMachineScaleSetVMExtensionsDeleteFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
+type VirtualMachineScaleSetVMExtensionsDeleteFuture struct {
+ azure.Future
+}
+
+// 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.
+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"`
+}
+
+// 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
+}
+
+// VirtualMachineScaleSetVMInstanceIDs specifies a list of virtual machine instance IDs from the VM scale
+// set.
+type VirtualMachineScaleSetVMInstanceIDs struct {
+ // InstanceIds - The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
+ InstanceIds *[]string `json:"instanceIds,omitempty"`
+}
+
+// VirtualMachineScaleSetVMInstanceRequiredIDs specifies a list of virtual machine instance IDs from the VM
+// scale set.
+type VirtualMachineScaleSetVMInstanceRequiredIDs struct {
+ // InstanceIds - The virtual machine scale set instance ids.
+ InstanceIds *[]string `json:"instanceIds,omitempty"`
+}
+
+// VirtualMachineScaleSetVMInstanceView the instance view of a virtual machine scale set VM.
+type VirtualMachineScaleSetVMInstanceView struct {
+ autorest.Response `json:"-"`
+ // PlatformUpdateDomain - The Update Domain count.
+ PlatformUpdateDomain *int32 `json:"platformUpdateDomain,omitempty"`
+ // PlatformFaultDomain - The Fault Domain count.
+ PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"`
+ // RdpThumbPrint - The Remote desktop certificate thumbprint.
+ RdpThumbPrint *string `json:"rdpThumbPrint,omitempty"`
+ // VMAgent - The VM Agent running on the virtual machine.
+ VMAgent *VirtualMachineAgentInstanceView `json:"vmAgent,omitempty"`
+ // MaintenanceRedeployStatus - The Maintenance Operation status on the virtual machine.
+ MaintenanceRedeployStatus *MaintenanceRedeployStatus `json:"maintenanceRedeployStatus,omitempty"`
+ // Disks - The disks information.
+ Disks *[]DiskInstanceView `json:"disks,omitempty"`
+ // Extensions - The extensions information.
+ Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"`
+ // VMHealth - READ-ONLY; The health status for the VM.
+ VMHealth *VirtualMachineHealthStatus `json:"vmHealth,omitempty"`
+ // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
You can easily view the output of your console log.
Azure also enables you to see a screenshot of the VM from the hypervisor.
+ BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"`
+ // Statuses - The resource status information.
+ Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
+ // 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"`
+}
+
+// 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
+}
+
+// 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.NextLink == nil || len(to.String(vmssvlr.NextLink)) < 1 {
+ 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)
+ }()
+ }
+ next, err := page.fn(ctx, page.vmssvlr)
+ if err != nil {
+ return err
+ }
+ page.vmssvlr = next
+ 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(getNextPage func(context.Context, VirtualMachineScaleSetVMListResult) (VirtualMachineScaleSetVMListResult, error)) VirtualMachineScaleSetVMListResultPage {
+ return VirtualMachineScaleSetVMListResultPage{fn: getNextPage}
+}
+
+// VirtualMachineScaleSetVMNetworkProfileConfiguration describes a virtual machine scale set VM network
+// profile.
+type VirtualMachineScaleSetVMNetworkProfileConfiguration struct {
+ // NetworkInterfaceConfigurations - The list of network configurations.
+ NetworkInterfaceConfigurations *[]VirtualMachineScaleSetNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"`
+}
+
+// VirtualMachineScaleSetVMProfile describes a virtual machine scale set virtual machine profile.
+type VirtualMachineScaleSetVMProfile struct {
+ // OsProfile - Specifies the operating system settings for the virtual machines in the scale set.
+ OsProfile *VirtualMachineScaleSetOSProfile `json:"osProfile,omitempty"`
+ // StorageProfile - Specifies the storage settings for the virtual machine disks.
+ StorageProfile *VirtualMachineScaleSetStorageProfile `json:"storageProfile,omitempty"`
+ // NetworkProfile - Specifies properties of the network interfaces of the virtual machines in the scale set.
+ NetworkProfile *VirtualMachineScaleSetNetworkProfile `json:"networkProfile,omitempty"`
+ // 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"`
+ // Priority - Specifies the priority for the virtual machines in the scale set.
Minimum api-version: 2017-10-30-preview. Possible values include: 'Regular', 'Low', 'Spot'
+ Priority VirtualMachinePriorityTypes `json:"priority,omitempty"`
+ // EvictionPolicy - Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set.
For Azure Spot virtual machines, the only supported value is 'Deallocate' and the minimum api-version is 2019-03-01.
For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete'
+ EvictionPolicy VirtualMachineEvictionPolicyTypes `json:"evictionPolicy,omitempty"`
+ // BillingProfile - Specifies the billing related details of a Azure Spot VMSS.
Minimum api-version: 2019-03-01.
+ BillingProfile *BillingProfile `json:"billingProfile,omitempty"`
+ // ScheduledEventsProfile - Specifies Scheduled Event related configurations.
+ ScheduledEventsProfile *ScheduledEventsProfile `json:"scheduledEventsProfile,omitempty"`
+}
+
+// VirtualMachineScaleSetVMProperties describes the properties of a virtual machine scale set virtual
+// machine.
+type VirtualMachineScaleSetVMProperties struct {
+ // LatestModelApplied - READ-ONLY; Specifies whether the latest model has been applied to the virtual machine.
+ LatestModelApplied *bool `json:"latestModelApplied,omitempty"`
+ // VMID - READ-ONLY; Azure VM unique ID.
+ VMID *string `json:"vmId,omitempty"`
+ // InstanceView - READ-ONLY; The virtual machine instance view.
+ InstanceView *VirtualMachineScaleSetVMInstanceView `json:"instanceView,omitempty"`
+ // HardwareProfile - Specifies the hardware settings for the virtual machine.
+ HardwareProfile *HardwareProfile `json:"hardwareProfile,omitempty"`
+ // StorageProfile - Specifies the storage settings for the virtual machine disks.
+ StorageProfile *StorageProfile `json:"storageProfile,omitempty"`
+ // AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the virtual machine in the scale set. For instance: whether the virtual machine has the capability to support attaching managed data disks with UltraSSD_LRS storage account type.
+ AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"`
+ // OsProfile - Specifies the operating system settings for the virtual machine.
+ OsProfile *OSProfile `json:"osProfile,omitempty"`
+ // NetworkProfile - Specifies the network interfaces of the virtual machine.
+ NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"`
+ // NetworkProfileConfiguration - Specifies the network profile configuration of the virtual machine.
+ NetworkProfileConfiguration *VirtualMachineScaleSetVMNetworkProfileConfiguration `json:"networkProfileConfiguration,omitempty"`
+ // DiagnosticsProfile - Specifies the boot diagnostic settings state.
Minimum api-version: 2015-06-15.
+ DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
+ // AvailabilitySet - Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [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"`
+ // ModelDefinitionApplied - READ-ONLY; Specifies whether the model applied to the virtual machine is the model of the virtual machine scale set or the customized model for the virtual machine.
+ ModelDefinitionApplied *string `json:"modelDefinitionApplied,omitempty"`
+ // ProtectionPolicy - Specifies the protection policy of the virtual machine.
+ ProtectionPolicy *VirtualMachineScaleSetVMProtectionPolicy `json:"protectionPolicy,omitempty"`
+}
+
+// VirtualMachineScaleSetVMProtectionPolicy the protection policy of a virtual machine scale set VM.
+type VirtualMachineScaleSetVMProtectionPolicy struct {
+ // ProtectFromScaleIn - Indicates that the virtual machine scale set VM shouldn't be considered for deletion during a scale-in operation.
+ ProtectFromScaleIn *bool `json:"protectFromScaleIn,omitempty"`
+ // ProtectFromScaleSetActions - Indicates that model updates or actions (including scale-in) initiated on the virtual machine scale set should not be applied to the virtual machine scale set VM.
+ ProtectFromScaleSetActions *bool `json:"protectFromScaleSetActions,omitempty"`
+}
+
+// VirtualMachineScaleSetVMReimageParameters describes a Virtual Machine Scale Set VM Reimage Parameters.
+type VirtualMachineScaleSetVMReimageParameters struct {
+ // TempDisk - Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk.
+ TempDisk *bool `json:"tempDisk,omitempty"`
+}
+
+// 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
+}
+
+// VirtualMachineScaleSetVMsDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualMachineScaleSetVMsDeleteFuture struct {
+ azure.Future
+}
+
+// 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.
+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
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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.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
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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"`
+}
+
+// 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
+}
+
+// VirtualMachineUpdate describes a Virtual Machine Update.
+type VirtualMachineUpdate struct {
+ // Plan - Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**.
+ Plan *Plan `json:"plan,omitempty"`
+ *VirtualMachineProperties `json:"properties,omitempty"`
+ // Identity - The identity of the virtual machine, if configured.
+ Identity *VirtualMachineIdentity `json:"identity,omitempty"`
+ // Zones - The virtual machine zones.
+ Zones *[]string `json:"zones,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineUpdate.
+func (vmu VirtualMachineUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmu.Plan != nil {
+ objectMap["plan"] = vmu.Plan
+ }
+ if vmu.VirtualMachineProperties != nil {
+ objectMap["properties"] = vmu.VirtualMachineProperties
+ }
+ if vmu.Identity != nil {
+ objectMap["identity"] = vmu.Identity
+ }
+ if vmu.Zones != nil {
+ objectMap["zones"] = vmu.Zones
+ }
+ if vmu.Tags != nil {
+ objectMap["tags"] = vmu.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualMachineUpdate struct.
+func (vmu *VirtualMachineUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "plan":
+ if v != nil {
+ var plan Plan
+ err = json.Unmarshal(*v, &plan)
+ if err != nil {
+ return err
+ }
+ vmu.Plan = &plan
+ }
+ case "properties":
+ if v != nil {
+ var virtualMachineProperties VirtualMachineProperties
+ err = json.Unmarshal(*v, &virtualMachineProperties)
+ if err != nil {
+ return err
+ }
+ vmu.VirtualMachineProperties = &virtualMachineProperties
+ }
+ case "identity":
+ if v != nil {
+ var identity VirtualMachineIdentity
+ err = json.Unmarshal(*v, &identity)
+ if err != nil {
+ return err
+ }
+ vmu.Identity = &identity
+ }
+ case "zones":
+ if v != nil {
+ var zones []string
+ err = json.Unmarshal(*v, &zones)
+ if err != nil {
+ return err
+ }
+ vmu.Zones = &zones
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ vmu.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// VMScaleSetConvertToSinglePlacementGroupInput ...
+type VMScaleSetConvertToSinglePlacementGroupInput struct {
+ // ActivePlacementGroupID - Id of the placement group in which you want future virtual machine instances to be placed. To query placement group Id, please use Virtual Machine Scale Set VMs - Get API. If not provided, the platform will choose one with maximum number of virtual machine instances.
+ ActivePlacementGroupID *string `json:"activePlacementGroupId,omitempty"`
+}
+
+// WindowsConfiguration specifies Windows operating system settings on the virtual machine.
+type WindowsConfiguration struct {
+ // ProvisionVMAgent - Indicates whether virtual machine agent should be provisioned on the virtual machine.
When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later.
+ ProvisionVMAgent *bool `json:"provisionVMAgent,omitempty"`
+ // EnableAutomaticUpdates - Indicates whether Automatic Updates is enabled for the Windows virtual machine. Default value is true.
For virtual machine scale sets, this property can be updated and updates will take effect on OS reprovisioning.
+ EnableAutomaticUpdates *bool `json:"enableAutomaticUpdates,omitempty"`
+ // TimeZone - Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time".
Possible values can be [TimeZoneInfo.Id](https://docs.microsoft.com/en-us/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id) value from time zones returned by [TimeZoneInfo.GetSystemTimeZones](https://docs.microsoft.com/en-us/dotnet/api/system.timezoneinfo.getsystemtimezones).
+ TimeZone *string `json:"timeZone,omitempty"`
+ // AdditionalUnattendContent - Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup.
+ AdditionalUnattendContent *[]AdditionalUnattendContent `json:"additionalUnattendContent,omitempty"`
+ // 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 WinRM 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/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
new file mode 100644
index 000000000..891fba0f6
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/operations.go
@@ -0,0 +1,109 @@
+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"
+)
+
+// OperationsClient is the compute Client
+type OperationsClient struct {
+ BaseClient
+}
+
+// NewOperationsClient creates an instance of the OperationsClient client.
+func NewOperationsClient(subscriptionID string) OperationsClient {
+ return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client using a custom endpoint. Use this
+// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
+func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient {
+ return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// List gets a list of compute operations.
+func (client OperationsClient) List(ctx context.Context) (result OperationListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.OperationsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.OperationsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.OperationsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.Compute/operations"),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/2019-12-01/compute/proximityplacementgroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/proximityplacementgroups.go
new file mode 100644
index 000000000..3abf4a32b
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/proximityplacementgroups.go
@@ -0,0 +1,578 @@
+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"
+)
+
+// ProximityPlacementGroupsClient is the compute Client
+type ProximityPlacementGroupsClient struct {
+ BaseClient
+}
+
+// NewProximityPlacementGroupsClient creates an instance of the ProximityPlacementGroupsClient client.
+func NewProximityPlacementGroupsClient(subscriptionID string) ProximityPlacementGroupsClient {
+ return NewProximityPlacementGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewProximityPlacementGroupsClientWithBaseURI creates an instance of the ProximityPlacementGroupsClient client using
+// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign
+// clouds, Azure stack).
+func NewProximityPlacementGroupsClientWithBaseURI(baseURI string, subscriptionID string) ProximityPlacementGroupsClient {
+ return ProximityPlacementGroupsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate create or update a proximity placement group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// proximityPlacementGroupName - the name of the proximity placement group.
+// parameters - parameters supplied to the Create Proximity Placement Group operation.
+func (client ProximityPlacementGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, parameters ProximityPlacementGroup) (result ProximityPlacementGroup, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, proximityPlacementGroupName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateOrUpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "CreateOrUpdate", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client ProximityPlacementGroupsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, parameters ProximityPlacementGroup) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "proximityPlacementGroupName": autorest.Encode("path", proximityPlacementGroupName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/proximityPlacementGroups/{proximityPlacementGroupName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client ProximityPlacementGroupsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client ProximityPlacementGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result ProximityPlacementGroup, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete delete a proximity placement group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// proximityPlacementGroupName - the name of the proximity placement group.
+func (client ProximityPlacementGroupsClient) Delete(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, proximityPlacementGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client ProximityPlacementGroupsClient) DeletePreparer(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "proximityPlacementGroupName": autorest.Encode("path", proximityPlacementGroupName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/proximityPlacementGroups/{proximityPlacementGroupName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client ProximityPlacementGroupsClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client ProximityPlacementGroupsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get retrieves information about a proximity placement group .
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// proximityPlacementGroupName - the name of the proximity placement group.
+// includeColocationStatus - includeColocationStatus=true enables fetching the colocation status of all the
+// resources in the proximity placement group.
+func (client ProximityPlacementGroupsClient) Get(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, includeColocationStatus string) (result ProximityPlacementGroup, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, proximityPlacementGroupName, includeColocationStatus)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client ProximityPlacementGroupsClient) GetPreparer(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, includeColocationStatus string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "proximityPlacementGroupName": autorest.Encode("path", proximityPlacementGroupName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(includeColocationStatus) > 0 {
+ queryParameters["includeColocationStatus"] = autorest.Encode("query", includeColocationStatus)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client ProximityPlacementGroupsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client ProximityPlacementGroupsClient) GetResponder(resp *http.Response) (result ProximityPlacementGroup, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListByResourceGroup lists all proximity placement groups in a resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client ProximityPlacementGroupsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ProximityPlacementGroupListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.ppglr.Response.Response != nil {
+ sc = result.ppglr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listByResourceGroupNextResults
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.ppglr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.ppglr, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "ListByResourceGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client ProximityPlacementGroupsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/proximityPlacementGroups", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client ProximityPlacementGroupsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
+// closes the http.Response Body.
+func (client ProximityPlacementGroupsClient) ListByResourceGroupResponder(resp *http.Response) (result ProximityPlacementGroupListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByResourceGroupNextResults retrieves the next set of results, if any.
+func (client ProximityPlacementGroupsClient) listByResourceGroupNextResults(ctx context.Context, lastResults ProximityPlacementGroupListResult) (result ProximityPlacementGroupListResult, err error) {
+ req, err := lastResults.proximityPlacementGroupListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ProximityPlacementGroupsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ProximityPlacementGroupListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByResourceGroup(ctx, resourceGroupName)
+ return
+}
+
+// ListBySubscription lists all proximity placement groups in a subscription.
+func (client ProximityPlacementGroupsClient) ListBySubscription(ctx context.Context) (result ProximityPlacementGroupListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupsClient.ListBySubscription")
+ defer func() {
+ sc := -1
+ if result.ppglr.Response.Response != nil {
+ sc = result.ppglr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listBySubscriptionNextResults
+ req, err := client.ListBySubscriptionPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "ListBySubscription", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListBySubscriptionSender(req)
+ if err != nil {
+ result.ppglr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "ListBySubscription", resp, "Failure sending request")
+ return
+ }
+
+ result.ppglr, err = client.ListBySubscriptionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "ListBySubscription", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListBySubscriptionPreparer prepares the ListBySubscription request.
+func (client ProximityPlacementGroupsClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/proximityPlacementGroups", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListBySubscriptionSender sends the ListBySubscription request. The method will close the
+// http.Response Body if it receives an error.
+func (client ProximityPlacementGroupsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always
+// closes the http.Response Body.
+func (client ProximityPlacementGroupsClient) ListBySubscriptionResponder(resp *http.Response) (result ProximityPlacementGroupListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listBySubscriptionNextResults retrieves the next set of results, if any.
+func (client ProximityPlacementGroupsClient) listBySubscriptionNextResults(ctx context.Context, lastResults ProximityPlacementGroupListResult) (result ProximityPlacementGroupListResult, err error) {
+ req, err := lastResults.proximityPlacementGroupListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListBySubscriptionSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "listBySubscriptionNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListBySubscriptionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ProximityPlacementGroupsClient) ListBySubscriptionComplete(ctx context.Context) (result ProximityPlacementGroupListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupsClient.ListBySubscription")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListBySubscription(ctx)
+ return
+}
+
+// Update update a proximity placement group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// proximityPlacementGroupName - the name of the proximity placement group.
+// parameters - parameters supplied to the Update Proximity Placement Group operation.
+func (client ProximityPlacementGroupsClient) Update(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, parameters ProximityPlacementGroupUpdate) (result ProximityPlacementGroup, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, proximityPlacementGroupName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Update", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client ProximityPlacementGroupsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, parameters ProximityPlacementGroupUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "proximityPlacementGroupName": autorest.Encode("path", proximityPlacementGroupName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/proximityPlacementGroups/{proximityPlacementGroupName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client ProximityPlacementGroupsClient) UpdateSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client ProximityPlacementGroupsClient) UpdateResponder(resp *http.Response) (result ProximityPlacementGroup, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/2019-12-01/compute/resourceskus.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/resourceskus.go
new file mode 100644
index 000000000..e71328f0c
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/resourceskus.go
@@ -0,0 +1,156 @@
+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"
+)
+
+// ResourceSkusClient is the compute Client
+type ResourceSkusClient struct {
+ BaseClient
+}
+
+// NewResourceSkusClient creates an instance of the ResourceSkusClient client.
+func NewResourceSkusClient(subscriptionID string) ResourceSkusClient {
+ return NewResourceSkusClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewResourceSkusClientWithBaseURI creates an instance of the ResourceSkusClient client using a custom endpoint. Use
+// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
+func NewResourceSkusClientWithBaseURI(baseURI string, subscriptionID string) ResourceSkusClient {
+ return ResourceSkusClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// List gets the list of Microsoft.Compute SKUs available for your Subscription.
+// Parameters:
+// filter - the filter to apply on the operation. Only **location** filter is supported currently.
+func (client ResourceSkusClient) List(ctx context.Context, filter string) (result ResourceSkusResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusClient.List")
+ defer func() {
+ sc := -1
+ if result.rsr.Response.Response != nil {
+ sc = result.rsr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, filter)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.rsr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.rsr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client ResourceSkusClient) ListPreparer(ctx context.Context, filter string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/skus", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client ResourceSkusClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client ResourceSkusClient) ListResponder(resp *http.Response) (result ResourceSkusResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client ResourceSkusClient) listNextResults(ctx context.Context, lastResults ResourceSkusResult) (result ResourceSkusResult, err error) {
+ req, err := lastResults.resourceSkusResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ResourceSkusClient) ListComplete(ctx context.Context, filter string) (result ResourceSkusResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx, filter)
+ 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
new file mode 100644
index 000000000..e3f4980da
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/snapshots.go
@@ -0,0 +1,755 @@
+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.SnapshotProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.CreationData", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.CreationData.ImageReference", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.CreationData.ImageReference.ID", Name: validation.Null, Rule: true, Chain: nil}}},
+ {Target: "snapshot.SnapshotProperties.CreationData.GalleryImageReference", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.CreationData.GalleryImageReference.ID", Name: validation.Null, Rule: true, Chain: nil}}},
+ }},
+ {Target: "snapshot.SnapshotProperties.EncryptionSettingsCollection", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.EncryptionSettingsCollection.Enabled", Name: validation.Null, Rule: true, Chain: nil}}},
+ }}}}}); err != nil {
+ return result, validation.NewError("compute.SnapshotsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, snapshotName, snapshot)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client SnapshotsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, snapshotName string, snapshot Snapshot) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "snapshotName": autorest.Encode("path", snapshotName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ snapshot.ManagedBy = nil
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}", pathParameters),
+ autorest.WithJSON(snapshot),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client SnapshotsClient) CreateOrUpdateSender(req *http.Request) (future SnapshotsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ 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 SnapshotsClient) CreateOrUpdateResponder(resp *http.Response) (result Snapshot, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client SnapshotsClient) DeletePreparer(ctx context.Context, resourceGroupName string, snapshotName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "snapshotName": autorest.Encode("path", snapshotName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client SnapshotsClient) DeleteSender(req *http.Request) (future SnapshotsDeleteFuture, err error) {
+ var resp *http.Response
+ 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 SnapshotsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get gets information about a snapshot.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// snapshotName - the name of the snapshot that is being created. The name can't be changed after the snapshot
+// is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters.
+func (client SnapshotsClient) Get(ctx context.Context, resourceGroupName string, snapshotName string) (result Snapshot, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, snapshotName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// 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 = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client SnapshotsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client SnapshotsClient) GetResponder(resp *http.Response) (result Snapshot, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// GrantAccessPreparer prepares the GrantAccess request.
+func (client SnapshotsClient) GrantAccessPreparer(ctx context.Context, resourceGroupName string, snapshotName string, grantAccessData GrantAccessData) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "snapshotName": autorest.Encode("path", snapshotName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/beginGetAccess", pathParameters),
+ autorest.WithJSON(grantAccessData),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GrantAccessSender sends the GrantAccess request. The method will close the
+// http.Response Body if it receives an error.
+func (client SnapshotsClient) GrantAccessSender(req *http.Request) (future SnapshotsGrantAccessFuture, err error) {
+ var resp *http.Response
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ 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,
+ client.ByInspecting(),
+ 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
+}
+
+// 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 = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/snapshots", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client SnapshotsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client SnapshotsClient) ListResponder(resp *http.Response) (result SnapshotList, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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
+}
+
+// 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 = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client SnapshotsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
+// closes the http.Response Body.
+func (client SnapshotsClient) ListByResourceGroupResponder(resp *http.Response) (result SnapshotList, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// RevokeAccessPreparer prepares the RevokeAccess request.
+func (client SnapshotsClient) RevokeAccessPreparer(ctx context.Context, resourceGroupName string, snapshotName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "snapshotName": autorest.Encode("path", snapshotName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/endGetAccess", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// RevokeAccessSender sends the RevokeAccess request. The method will close the
+// http.Response Body if it receives an error.
+func (client SnapshotsClient) RevokeAccessSender(req *http.Request) (future SnapshotsRevokeAccessFuture, err error) {
+ var resp *http.Response
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// RevokeAccessResponder handles the response to the RevokeAccess request. The method always
+// closes the http.Response Body.
+func (client SnapshotsClient) RevokeAccessResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Update updates (patches) a snapshot.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// snapshotName - the name of the snapshot that is being created. The name can't be changed after the snapshot
+// is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters.
+// snapshot - snapshot object supplied in the body of the Patch snapshot operation.
+func (client SnapshotsClient) Update(ctx context.Context, resourceGroupName string, snapshotName string, snapshot SnapshotUpdate) (result SnapshotsUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.Update")
+ defer func() {
+ sc := -1
+ if result.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", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client SnapshotsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, snapshotName string, snapshot SnapshotUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "snapshotName": autorest.Encode("path", snapshotName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-11-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}", pathParameters),
+ autorest.WithJSON(snapshot),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client SnapshotsClient) UpdateSender(req *http.Request) (future SnapshotsUpdateFuture, err error) {
+ var resp *http.Response
+ 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 SnapshotsClient) UpdateResponder(resp *http.Response) (result Snapshot, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/2019-12-01/compute/sshpublickeys.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/sshpublickeys.go
new file mode 100644
index 000000000..d12c7d867
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/sshpublickeys.go
@@ -0,0 +1,652 @@
+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"
+)
+
+// SSHPublicKeysClient is the compute Client
+type SSHPublicKeysClient struct {
+ BaseClient
+}
+
+// NewSSHPublicKeysClient creates an instance of the SSHPublicKeysClient client.
+func NewSSHPublicKeysClient(subscriptionID string) SSHPublicKeysClient {
+ return NewSSHPublicKeysClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewSSHPublicKeysClientWithBaseURI creates an instance of the SSHPublicKeysClient client using a custom endpoint.
+// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
+func NewSSHPublicKeysClientWithBaseURI(baseURI string, subscriptionID string) SSHPublicKeysClient {
+ return SSHPublicKeysClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Create creates a new SSH public key resource.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// SSHPublicKeyName - the name of the SSH public key.
+// parameters - parameters supplied to create the SSH public key.
+func (client SSHPublicKeysClient) Create(ctx context.Context, resourceGroupName string, SSHPublicKeyName string, parameters SSHPublicKeyResource) (result SSHPublicKeyResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.Create")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.CreatePreparer(ctx, resourceGroupName, SSHPublicKeyName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Create", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Create", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Create", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreatePreparer prepares the Create request.
+func (client SSHPublicKeysClient) CreatePreparer(ctx context.Context, resourceGroupName string, SSHPublicKeyName string, parameters SSHPublicKeyResource) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "sshPublicKeyName": autorest.Encode("path", SSHPublicKeyName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/sshPublicKeys/{sshPublicKeyName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateSender sends the Create request. The method will close the
+// http.Response Body if it receives an error.
+func (client SSHPublicKeysClient) CreateSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateResponder handles the response to the Create request. The method always
+// closes the http.Response Body.
+func (client SSHPublicKeysClient) CreateResponder(resp *http.Response) (result SSHPublicKeyResource, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete delete an SSH public key.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// SSHPublicKeyName - the name of the SSH public key.
+func (client SSHPublicKeysClient) Delete(ctx context.Context, resourceGroupName string, SSHPublicKeyName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, SSHPublicKeyName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client SSHPublicKeysClient) DeletePreparer(ctx context.Context, resourceGroupName string, SSHPublicKeyName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "sshPublicKeyName": autorest.Encode("path", SSHPublicKeyName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/sshPublicKeys/{sshPublicKeyName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client SSHPublicKeysClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client SSHPublicKeysClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// GenerateKeyPair generates and returns a public/private key pair and populates the SSH public key resource with the
+// public key. The length of the key will be 3072 bits. This operation can only be performed once per SSH public key
+// resource.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// SSHPublicKeyName - the name of the SSH public key.
+func (client SSHPublicKeysClient) GenerateKeyPair(ctx context.Context, resourceGroupName string, SSHPublicKeyName string) (result SSHPublicKeyGenerateKeyPairResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.GenerateKeyPair")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GenerateKeyPairPreparer(ctx, resourceGroupName, SSHPublicKeyName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "GenerateKeyPair", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GenerateKeyPairSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "GenerateKeyPair", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GenerateKeyPairResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "GenerateKeyPair", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GenerateKeyPairPreparer prepares the GenerateKeyPair request.
+func (client SSHPublicKeysClient) GenerateKeyPairPreparer(ctx context.Context, resourceGroupName string, SSHPublicKeyName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "sshPublicKeyName": autorest.Encode("path", SSHPublicKeyName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}/generateKeyPair", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GenerateKeyPairSender sends the GenerateKeyPair request. The method will close the
+// http.Response Body if it receives an error.
+func (client SSHPublicKeysClient) GenerateKeyPairSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GenerateKeyPairResponder handles the response to the GenerateKeyPair request. The method always
+// closes the http.Response Body.
+func (client SSHPublicKeysClient) GenerateKeyPairResponder(resp *http.Response) (result SSHPublicKeyGenerateKeyPairResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Get retrieves information about an SSH public key.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// SSHPublicKeyName - the name of the SSH public key.
+func (client SSHPublicKeysClient) Get(ctx context.Context, resourceGroupName string, SSHPublicKeyName string) (result SSHPublicKeyResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, SSHPublicKeyName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client SSHPublicKeysClient) GetPreparer(ctx context.Context, resourceGroupName string, SSHPublicKeyName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "sshPublicKeyName": autorest.Encode("path", SSHPublicKeyName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/sshPublicKeys/{sshPublicKeyName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client SSHPublicKeysClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client SSHPublicKeysClient) GetResponder(resp *http.Response) (result SSHPublicKeyResource, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListByResourceGroup lists all of the SSH public keys in the specified resource group. Use the nextLink property in
+// the response to get the next page of SSH public keys.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client SSHPublicKeysClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result SSHPublicKeysGroupListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.spkglr.Response.Response != nil {
+ sc = result.spkglr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listByResourceGroupNextResults
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.spkglr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.spkglr, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "ListByResourceGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client SSHPublicKeysClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/sshPublicKeys", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client SSHPublicKeysClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
+// closes the http.Response Body.
+func (client SSHPublicKeysClient) ListByResourceGroupResponder(resp *http.Response) (result SSHPublicKeysGroupListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByResourceGroupNextResults retrieves the next set of results, if any.
+func (client SSHPublicKeysClient) listByResourceGroupNextResults(ctx context.Context, lastResults SSHPublicKeysGroupListResult) (result SSHPublicKeysGroupListResult, err error) {
+ req, err := lastResults.sSHPublicKeysGroupListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client SSHPublicKeysClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result SSHPublicKeysGroupListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByResourceGroup(ctx, resourceGroupName)
+ return
+}
+
+// ListBySubscription lists all of the SSH public keys in the subscription. Use the nextLink property in the response
+// to get the next page of SSH public keys.
+func (client SSHPublicKeysClient) ListBySubscription(ctx context.Context) (result SSHPublicKeysGroupListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.ListBySubscription")
+ defer func() {
+ sc := -1
+ if result.spkglr.Response.Response != nil {
+ sc = result.spkglr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listBySubscriptionNextResults
+ req, err := client.ListBySubscriptionPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "ListBySubscription", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListBySubscriptionSender(req)
+ if err != nil {
+ result.spkglr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "ListBySubscription", resp, "Failure sending request")
+ return
+ }
+
+ result.spkglr, err = client.ListBySubscriptionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "ListBySubscription", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListBySubscriptionPreparer prepares the ListBySubscription request.
+func (client SSHPublicKeysClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/sshPublicKeys", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListBySubscriptionSender sends the ListBySubscription request. The method will close the
+// http.Response Body if it receives an error.
+func (client SSHPublicKeysClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always
+// closes the http.Response Body.
+func (client SSHPublicKeysClient) ListBySubscriptionResponder(resp *http.Response) (result SSHPublicKeysGroupListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listBySubscriptionNextResults retrieves the next set of results, if any.
+func (client SSHPublicKeysClient) listBySubscriptionNextResults(ctx context.Context, lastResults SSHPublicKeysGroupListResult) (result SSHPublicKeysGroupListResult, err error) {
+ req, err := lastResults.sSHPublicKeysGroupListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListBySubscriptionSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "listBySubscriptionNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListBySubscriptionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required.
+func (client SSHPublicKeysClient) ListBySubscriptionComplete(ctx context.Context) (result SSHPublicKeysGroupListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.ListBySubscription")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListBySubscription(ctx)
+ return
+}
+
+// Update updates a new SSH public key resource.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// SSHPublicKeyName - the name of the SSH public key.
+// parameters - parameters supplied to update the SSH public key.
+func (client SSHPublicKeysClient) Update(ctx context.Context, resourceGroupName string, SSHPublicKeyName string, parameters SSHPublicKeyUpdateResource) (result SSHPublicKeyResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, SSHPublicKeyName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Update", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client SSHPublicKeysClient) UpdatePreparer(ctx context.Context, resourceGroupName string, SSHPublicKeyName string, parameters SSHPublicKeyUpdateResource) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "sshPublicKeyName": autorest.Encode("path", SSHPublicKeyName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-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.Compute/sshPublicKeys/{sshPublicKeyName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client SSHPublicKeysClient) UpdateSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client SSHPublicKeysClient) UpdateResponder(resp *http.Response) (result SSHPublicKeyResource, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/2019-12-01/compute/usage.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/usage.go
new file mode 100644
index 000000000..7ec1c4026
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/usage.go
@@ -0,0 +1,162 @@
+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
+}
+
+// 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 = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/usages", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client UsageClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client UsageClient) ListResponder(resp *http.Response) (result ListUsagesResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/2019-12-01/compute/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/version.go
new file mode 100644
index 000000000..69ef1e676
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/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/2019-12-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/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
new file mode 100644
index 000000000..62d2dfefd
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/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
+}
+
+// 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 = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions/{version}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineExtensionImagesClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineExtensionImagesClient) GetResponder(resp *http.Response) (result VirtualMachineExtensionImage, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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
+}
+
+// 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 = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListTypesSender sends the ListTypes request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineExtensionImagesClient) ListTypesSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListTypesResponder handles the response to the ListTypes request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineExtensionImagesClient) ListTypesResponder(resp *http.Response) (result ListVirtualMachineExtensionImage, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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
+}
+
+// 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 = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+ if len(orderby) > 0 {
+ queryParameters["$orderby"] = autorest.Encode("query", orderby)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListVersionsSender sends the ListVersions request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineExtensionImagesClient) ListVersionsSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListVersionsResponder handles the response to the ListVersions request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineExtensionImagesClient) ListVersionsResponder(resp *http.Response) (result ListVirtualMachineExtensionImage, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/2019-12-01/compute/virtualmachineextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineextensions.go
new file mode 100644
index 000000000..545d45a63
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineextensions.go
@@ -0,0 +1,444 @@
+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", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client VirtualMachineExtensionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, VMName string, VMExtensionName string, extensionParameters VirtualMachineExtension) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmExtensionName": autorest.Encode("path", VMExtensionName),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2019-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.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
+ }
+ 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 VirtualMachineExtensionsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualMachineExtension, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client VirtualMachineExtensionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, VMName string, VMExtensionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmExtensionName": autorest.Encode("path", VMExtensionName),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2019-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.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
+ }
+ 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 VirtualMachineExtensionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get the operation to get the extension.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine containing the extension.
+// VMExtensionName - the name of the virtual machine extension.
+// expand - the expand expression to apply on the operation.
+func (client VirtualMachineExtensionsClient) Get(ctx context.Context, resourceGroupName string, VMName string, VMExtensionName string, expand string) (result VirtualMachineExtension, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineExtensionsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, VMName, VMExtensionName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// 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 = "2019-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.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,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List the operation to get all extensions of a Virtual Machine.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine containing the extension.
+// expand - the expand expression to apply on the operation.
+func (client VirtualMachineExtensionsClient) List(ctx context.Context, resourceGroupName string, VMName string, expand string) (result VirtualMachineExtensionsListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineExtensionsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ListPreparer(ctx, resourceGroupName, VMName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client VirtualMachineExtensionsClient) ListPreparer(ctx context.Context, resourceGroupName string, VMName string, expand string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2019-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.Compute/virtualMachines/{vmName}/extensions", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineExtensionsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineExtensionsClient) ListResponder(resp *http.Response) (result VirtualMachineExtensionsListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client VirtualMachineExtensionsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, VMName string, VMExtensionName string, extensionParameters VirtualMachineExtensionUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmExtensionName": autorest.Encode("path", VMExtensionName),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2019-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.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
+ }
+ 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 VirtualMachineExtensionsClient) UpdateResponder(resp *http.Response) (result VirtualMachineExtension, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/2019-12-01/compute/virtualmachineimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineimages.go
new file mode 100644
index 000000000..431ac3ae3
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/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
+}
+
+// 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 = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineImagesClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineImagesClient) GetResponder(resp *http.Response) (result VirtualMachineImage, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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
+}
+
+// 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 = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(expand) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+ if len(orderby) > 0 {
+ queryParameters["$orderby"] = autorest.Encode("query", orderby)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineImagesClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineImagesClient) ListResponder(resp *http.Response) (result ListVirtualMachineImageResource, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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
+}
+
+// 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 = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListOffersSender sends the ListOffers request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineImagesClient) ListOffersSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListOffersResponder handles the response to the ListOffers request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineImagesClient) ListOffersResponder(resp *http.Response) (result ListVirtualMachineImageResource, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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
+}
+
+// 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 = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListPublishersSender sends the ListPublishers request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineImagesClient) ListPublishersSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListPublishersResponder handles the response to the ListPublishers request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineImagesClient) ListPublishersResponder(resp *http.Response) (result ListVirtualMachineImageResource, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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
+}
+
+// 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 = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSkusSender sends the ListSkus request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineImagesClient) ListSkusSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListSkusResponder handles the response to the ListSkus request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineImagesClient) ListSkusResponder(resp *http.Response) (result ListVirtualMachineImageResource, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/2019-12-01/compute/virtualmachineruncommands.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineruncommands.go
new file mode 100644
index 000000000..9a670358b
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineruncommands.go
@@ -0,0 +1,244 @@
+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
+}
+
+// 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 = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands/{commandId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineRunCommandsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineRunCommandsClient) GetResponder(resp *http.Response) (result RunCommandDocument, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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
+}
+
+// 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 = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineRunCommandsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineRunCommandsClient) ListResponder(resp *http.Response) (result RunCommandListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/2019-12-01/compute/virtualmachines.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachines.go
new file mode 100644
index 000000000..b73c77f84
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachines.go
@@ -0,0 +1,1897 @@
+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", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CapturePreparer prepares the Capture request.
+func (client VirtualMachinesClient) CapturePreparer(ctx context.Context, resourceGroupName string, VMName string, parameters VirtualMachineCaptureParameters) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/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
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ 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,
+ client.ByInspecting(),
+ 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", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// ConvertToManagedDisksPreparer prepares the ConvertToManagedDisks request.
+func (client VirtualMachinesClient) ConvertToManagedDisksPreparer(ctx context.Context, resourceGroupName string, VMName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/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
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// ConvertToManagedDisksResponder handles the response to the ConvertToManagedDisks request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) ConvertToManagedDisksResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// CreateOrUpdate the operation to create or update a virtual machine. Please note some properties can be set only
+// during virtual machine creation.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine.
+// parameters - parameters supplied to the Create Virtual Machine operation.
+func (client VirtualMachinesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, VMName string, parameters VirtualMachine) (result VirtualMachinesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.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", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client VirtualMachinesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, VMName string, parameters VirtualMachine) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ parameters.Resources = nil
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachinesCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ 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 VirtualMachinesClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualMachine, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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", result.Response(), "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 = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/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
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeallocateResponder handles the response to the Deallocate request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) DeallocateResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Delete the operation to delete a virtual machine.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine.
+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", result.Response(), "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 = "2019-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.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
+ }
+ 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 VirtualMachinesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Generalize sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine
+// before performing this operation.
For Windows, please refer to [Create a managed image of a generalized VM in
+// Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/capture-image-resource).
For Linux, please
+// refer to [How to create an image of a virtual machine or
+// VHD](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/capture-image).
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine.
+func (client VirtualMachinesClient) Generalize(ctx context.Context, resourceGroupName string, VMName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Generalize")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GeneralizePreparer(ctx, resourceGroupName, VMName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Generalize", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GeneralizeSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Generalize", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GeneralizeResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Generalize", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// 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 = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/generalize", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GeneralizeSender sends the Generalize request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) GeneralizeSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GeneralizeResponder handles the response to the Generalize request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) GeneralizeResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get retrieves information about the model view or the instance view of a virtual machine.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine.
+// expand - the expand expression to apply on the operation.
+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
+}
+
+// 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 = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(string(expand)) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) GetResponder(resp *http.Response) (result VirtualMachine, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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
+}
+
+// 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 = "2019-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.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,
+ client.ByInspecting(),
+ 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
+}
+
+// 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 = "2019-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.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,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client VirtualMachinesClient) listNextResults(ctx context.Context, lastResults VirtualMachineListResult) (result VirtualMachineListResult, err error) {
+ req, err := lastResults.virtualMachineListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client VirtualMachinesClient) ListComplete(ctx context.Context, resourceGroupName string) (result VirtualMachineListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx, resourceGroupName)
+ return
+}
+
+// ListAll lists all of the virtual machines in the specified subscription. Use the nextLink property in the response
+// to get the next page of virtual machines.
+// Parameters:
+// statusOnly - statusOnly=true enables fetching run time status of all Virtual Machines in the subscription.
+func (client VirtualMachinesClient) ListAll(ctx context.Context, statusOnly string) (result VirtualMachineListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.ListAll")
+ defer func() {
+ sc := -1
+ if result.vmlr.Response.Response != nil {
+ sc = result.vmlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listAllNextResults
+ req, err := client.ListAllPreparer(ctx, statusOnly)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListAll", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListAllSender(req)
+ if err != nil {
+ result.vmlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListAll", resp, "Failure sending request")
+ return
+ }
+
+ result.vmlr, err = client.ListAllResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListAll", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListAllPreparer prepares the ListAll request.
+func (client VirtualMachinesClient) ListAllPreparer(ctx context.Context, statusOnly string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(statusOnly) > 0 {
+ queryParameters["statusOnly"] = autorest.Encode("query", statusOnly)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListAllSender sends the ListAll request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) ListAllSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListAllResponder handles the response to the ListAll request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) ListAllResponder(resp *http.Response) (result VirtualMachineListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listAllNextResults retrieves the next set of results, if any.
+func (client VirtualMachinesClient) listAllNextResults(ctx context.Context, lastResults VirtualMachineListResult) (result VirtualMachineListResult, err error) {
+ req, err := lastResults.virtualMachineListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listAllNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListAllSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listAllNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListAllResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listAllNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListAllComplete enumerates all values, automatically crossing page boundaries as required.
+func (client VirtualMachinesClient) ListAllComplete(ctx context.Context, statusOnly string) (result VirtualMachineListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.ListAll")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListAll(ctx, statusOnly)
+ return
+}
+
+// ListAvailableSizes lists all available virtual machine sizes to which the specified virtual machine can be resized.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine.
+func (client VirtualMachinesClient) ListAvailableSizes(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachineSizeListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.ListAvailableSizes")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ListAvailableSizesPreparer(ctx, resourceGroupName, VMName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListAvailableSizes", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListAvailableSizesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListAvailableSizes", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListAvailableSizesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListAvailableSizes", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// 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 = "2019-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.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,
+ client.ByInspecting(),
+ 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
+}
+
+// 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 = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachines", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByLocationSender sends the ListByLocation request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) ListByLocationSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByLocationResponder handles the response to the ListByLocation request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) ListByLocationResponder(resp *http.Response) (result VirtualMachineListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// PerformMaintenancePreparer prepares the PerformMaintenance request.
+func (client VirtualMachinesClient) PerformMaintenancePreparer(ctx context.Context, resourceGroupName string, VMName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/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
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// PerformMaintenanceResponder handles the response to the PerformMaintenance request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) PerformMaintenanceResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// PowerOff the operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same
+// provisioned resources. You are still charged for this virtual machine.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine.
+// skipShutdown - the parameter to request non-graceful VM shutdown. True value for this flag indicates
+// non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not
+// specified
+func (client VirtualMachinesClient) PowerOff(ctx context.Context, resourceGroupName string, VMName string, skipShutdown *bool) (result VirtualMachinesPowerOffFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.PowerOff")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.PowerOffPreparer(ctx, resourceGroupName, VMName, skipShutdown)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "PowerOff", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.PowerOffSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "PowerOff", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// PowerOffPreparer prepares the PowerOff request.
+func (client VirtualMachinesClient) PowerOffPreparer(ctx context.Context, resourceGroupName string, VMName string, skipShutdown *bool) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if skipShutdown != nil {
+ queryParameters["skipShutdown"] = autorest.Encode("query", *skipShutdown)
+ } else {
+ queryParameters["skipShutdown"] = autorest.Encode("query", false)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/powerOff", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// PowerOffSender sends the PowerOff request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) PowerOffSender(req *http.Request) (future VirtualMachinesPowerOffFuture, err error) {
+ var resp *http.Response
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// PowerOffResponder handles the response to the PowerOff request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) PowerOffResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Reapply the operation to reapply a virtual machine's state.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine.
+func (client VirtualMachinesClient) Reapply(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachinesReapplyFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Reapply")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ReapplyPreparer(ctx, resourceGroupName, VMName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Reapply", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.ReapplySender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Reapply", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// ReapplyPreparer prepares the Reapply request.
+func (client VirtualMachinesClient) ReapplyPreparer(ctx context.Context, resourceGroupName string, VMName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/reapply", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ReapplySender sends the Reapply request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) ReapplySender(req *http.Request) (future VirtualMachinesReapplyFuture, err error) {
+ var resp *http.Response
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// ReapplyResponder handles the response to the Reapply request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) ReapplyResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Redeploy shuts down the virtual machine, moves it to a new node, and powers it back on.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine.
+func (client VirtualMachinesClient) Redeploy(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachinesRedeployFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Redeploy")
+ defer func() {
+ sc := -1
+ if result.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", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// RedeployPreparer prepares the Redeploy request.
+func (client VirtualMachinesClient) RedeployPreparer(ctx context.Context, resourceGroupName string, VMName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/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
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// RedeployResponder handles the response to the Redeploy request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) RedeployResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Reimage reimages the virtual machine which has an ephemeral OS disk back to its initial state.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine.
+// parameters - parameters supplied to the Reimage Virtual Machine operation.
+func (client VirtualMachinesClient) Reimage(ctx context.Context, resourceGroupName string, VMName string, parameters *VirtualMachineReimageParameters) (result VirtualMachinesReimageFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Reimage")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ReimagePreparer(ctx, resourceGroupName, VMName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Reimage", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.ReimageSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Reimage", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// ReimagePreparer prepares the Reimage request.
+func (client VirtualMachinesClient) ReimagePreparer(ctx context.Context, resourceGroupName string, VMName string, parameters *VirtualMachineReimageParameters) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/reimage", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if parameters != nil {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithJSON(parameters))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ReimageSender sends the Reimage request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) ReimageSender(req *http.Request) (future VirtualMachinesReimageFuture, err error) {
+ var resp *http.Response
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// ReimageResponder handles the response to the Reimage request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) ReimageResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Restart the operation to restart a virtual machine.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine.
+func (client VirtualMachinesClient) Restart(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachinesRestartFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Restart")
+ defer func() {
+ sc := -1
+ if result.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", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// RestartPreparer prepares the Restart request.
+func (client VirtualMachinesClient) RestartPreparer(ctx context.Context, resourceGroupName string, VMName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/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
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// RestartResponder handles the response to the Restart request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) RestartResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.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", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// RunCommandPreparer prepares the RunCommand request.
+func (client VirtualMachinesClient) RunCommandPreparer(ctx context.Context, resourceGroupName string, VMName string, parameters RunCommandInput) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/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
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ 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,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// SimulateEviction the operation to simulate the eviction of spot virtual machine. The eviction will occur within 30
+// minutes of calling the API
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine.
+func (client VirtualMachinesClient) SimulateEviction(ctx context.Context, resourceGroupName string, VMName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.SimulateEviction")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.SimulateEvictionPreparer(ctx, resourceGroupName, VMName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "SimulateEviction", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.SimulateEvictionSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "SimulateEviction", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.SimulateEvictionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "SimulateEviction", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// SimulateEvictionPreparer prepares the SimulateEviction request.
+func (client VirtualMachinesClient) SimulateEvictionPreparer(ctx context.Context, resourceGroupName string, VMName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/simulateEviction", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// SimulateEvictionSender sends the SimulateEviction request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) SimulateEvictionSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// SimulateEvictionResponder handles the response to the SimulateEviction request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) SimulateEvictionResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Start the operation to start a virtual machine.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine.
+func (client VirtualMachinesClient) Start(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachinesStartFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Start")
+ defer func() {
+ sc := -1
+ if result.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", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// StartPreparer prepares the Start request.
+func (client VirtualMachinesClient) StartPreparer(ctx context.Context, resourceGroupName string, VMName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/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
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// StartResponder handles the response to the Start request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) StartResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Update the operation to update a virtual machine.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine.
+// parameters - parameters supplied to the Update Virtual Machine operation.
+func (client VirtualMachinesClient) Update(ctx context.Context, resourceGroupName string, VMName string, parameters VirtualMachineUpdate) (result VirtualMachinesUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, VMName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client VirtualMachinesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, VMName string, parameters VirtualMachineUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2019-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.Compute/virtualMachines/{vmName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) UpdateSender(req *http.Request) (future VirtualMachinesUpdateFuture, err error) {
+ var resp *http.Response
+ 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 VirtualMachinesClient) UpdateResponder(resp *http.Response) (result VirtualMachine, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/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
new file mode 100644
index 000000000..97605bcbf
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetextensions.go
@@ -0,0 +1,481 @@
+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", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, extensionParameters VirtualMachineScaleSetExtension) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ "vmssExtensionName": autorest.Encode("path", vmssExtensionName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ extensionParameters.Type = nil
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}", pathParameters),
+ autorest.WithJSON(extensionParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineScaleSetExtensionsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ 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 VirtualMachineScaleSetExtensionsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualMachineScaleSetExtension, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client VirtualMachineScaleSetExtensionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ "vmssExtensionName": autorest.Encode("path", vmssExtensionName),
+ }
+
+ const APIVersion = "2019-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.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
+ }
+ 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 VirtualMachineScaleSetExtensionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get the operation to get the extension.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set containing the extension.
+// vmssExtensionName - the name of the VM scale set extension.
+// expand - the expand expression to apply on the operation.
+func (client VirtualMachineScaleSetExtensionsClient) Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, expand string) (result VirtualMachineScaleSetExtension, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, VMScaleSetName, vmssExtensionName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// 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 = "2019-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.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,
+ client.ByInspecting(),
+ 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
+}
+
+// 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 = "2019-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.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,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client VirtualMachineScaleSetExtensionsClient) listNextResults(ctx context.Context, lastResults VirtualMachineScaleSetExtensionListResult) (result VirtualMachineScaleSetExtensionListResult, err error) {
+ req, err := lastResults.virtualMachineScaleSetExtensionListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client VirtualMachineScaleSetExtensionsClient) ListComplete(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetExtensionListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx, resourceGroupName, VMScaleSetName)
+ return
+}
+
+// Update the operation to update an extension.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set where the extension should be updated.
+// vmssExtensionName - the name of the VM scale set extension.
+// extensionParameters - parameters supplied to the Update VM scale set Extension operation.
+func (client VirtualMachineScaleSetExtensionsClient) Update(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, extensionParameters VirtualMachineScaleSetExtensionUpdate) (result VirtualMachineScaleSetExtensionsUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, VMScaleSetName, vmssExtensionName, extensionParameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client VirtualMachineScaleSetExtensionsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, extensionParameters VirtualMachineScaleSetExtensionUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ "vmssExtensionName": autorest.Encode("path", vmssExtensionName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ extensionParameters.Name = nil
+ extensionParameters.Type = nil
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}", pathParameters),
+ autorest.WithJSON(extensionParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetExtensionsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetExtensionsUpdateFuture, err error) {
+ var resp *http.Response
+ 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 VirtualMachineScaleSetExtensionsClient) UpdateResponder(resp *http.Response) (result VirtualMachineScaleSetExtension, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/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
new file mode 100644
index 000000000..e5653cbc2
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetrollingupgrades.go
@@ -0,0 +1,348 @@
+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", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CancelPreparer prepares the Cancel request.
+func (client VirtualMachineScaleSetRollingUpgradesClient) CancelPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/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
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CancelResponder handles the response to the Cancel request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetRollingUpgradesClient) CancelResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// GetLatest gets the status of the latest virtual machine scale set rolling upgrade.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatest(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result RollingUpgradeStatusInfo, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetRollingUpgradesClient.GetLatest")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetLatestPreparer(ctx, resourceGroupName, VMScaleSetName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "GetLatest", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetLatestSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "GetLatest", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetLatestResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "GetLatest", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// 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 = "2019-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.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,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// StartExtensionUpgrade starts a rolling upgrade to move all extensions for all virtual machine scale set instances to
+// the latest available extension version. Instances which are already running the latest extension versions are not
+// affected.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgrade(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetRollingUpgradesClient.StartExtensionUpgrade")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.StartExtensionUpgradePreparer(ctx, resourceGroupName, VMScaleSetName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartExtensionUpgrade", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.StartExtensionUpgradeSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartExtensionUpgrade", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// StartExtensionUpgradePreparer prepares the StartExtensionUpgrade request.
+func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensionRollingUpgrade", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// StartExtensionUpgradeSender sends the StartExtensionUpgrade request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeSender(req *http.Request) (future VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture, err error) {
+ var resp *http.Response
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// StartExtensionUpgradeResponder handles the response to the StartExtensionUpgrade request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// StartOSUpgrade starts a rolling upgrade to move all virtual machine scale set instances to the latest available
+// Platform Image OS version. Instances which are already running the latest available OS version are not affected.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgrade(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetRollingUpgradesClient.StartOSUpgrade")
+ defer func() {
+ sc := -1
+ if result.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", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// StartOSUpgradePreparer prepares the StartOSUpgrade request.
+func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/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
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// StartOSUpgradeResponder handles the response to the StartOSUpgrade request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradeResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ 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
new file mode 100644
index 000000000..c95a97566
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesets.go
@@ -0,0 +1,1971 @@
+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)}
+}
+
+// ConvertToSinglePlacementGroup converts SinglePlacementGroup property to false for a existing virtual machine scale
+// set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the virtual machine scale set to create or update.
+// parameters - the input object for ConvertToSinglePlacementGroup API.
+func (client VirtualMachineScaleSetsClient) ConvertToSinglePlacementGroup(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters VMScaleSetConvertToSinglePlacementGroupInput) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.ConvertToSinglePlacementGroup")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ConvertToSinglePlacementGroupPreparer(ctx, resourceGroupName, VMScaleSetName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ConvertToSinglePlacementGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ConvertToSinglePlacementGroupSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ConvertToSinglePlacementGroup", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ConvertToSinglePlacementGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ConvertToSinglePlacementGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ConvertToSinglePlacementGroupPreparer prepares the ConvertToSinglePlacementGroup request.
+func (client VirtualMachineScaleSetsClient) ConvertToSinglePlacementGroupPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters VMScaleSetConvertToSinglePlacementGroupInput) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/convertToSinglePlacementGroup", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ConvertToSinglePlacementGroupSender sends the ConvertToSinglePlacementGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetsClient) ConvertToSinglePlacementGroupSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ConvertToSinglePlacementGroupResponder handles the response to the ConvertToSinglePlacementGroup request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetsClient) ConvertToSinglePlacementGroupResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// CreateOrUpdate create or update a VM scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set to create or update.
+// parameters - the scale set object.
+func (client VirtualMachineScaleSetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters VirtualMachineScaleSet) (result VirtualMachineScaleSetsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.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", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client VirtualMachineScaleSetsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters VirtualMachineScaleSet) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2019-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.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
+ }
+ 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 VirtualMachineScaleSetsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualMachineScaleSet, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeallocatePreparer prepares the Deallocate request.
+func (client VirtualMachineScaleSetsClient) DeallocatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/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
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeallocateResponder handles the response to the Deallocate request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetsClient) DeallocateResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Delete deletes a VM scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+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", result.Response(), "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 = "2019-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.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
+ }
+ 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 VirtualMachineScaleSetsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// DeleteInstances deletes virtual machines in a VM scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set.
+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", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeleteInstancesPreparer prepares the DeleteInstances request.
+func (client VirtualMachineScaleSetsClient) DeleteInstancesPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs VirtualMachineScaleSetVMInstanceRequiredIDs) (*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 = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/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
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteInstancesResponder handles the response to the DeleteInstances request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetsClient) DeleteInstancesResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// ForceRecoveryServiceFabricPlatformUpdateDomainWalk manual platform update domain walk to update virtual machines in
+// a service fabric virtual machine scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// platformUpdateDomain - the platform update domain for which a manual recovery walk is requested
+func (client VirtualMachineScaleSetsClient) ForceRecoveryServiceFabricPlatformUpdateDomainWalk(ctx context.Context, resourceGroupName string, VMScaleSetName string, platformUpdateDomain int32) (result RecoveryWalkResponse, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.ForceRecoveryServiceFabricPlatformUpdateDomainWalk")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ForceRecoveryServiceFabricPlatformUpdateDomainWalkPreparer(ctx, resourceGroupName, VMScaleSetName, platformUpdateDomain)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ForceRecoveryServiceFabricPlatformUpdateDomainWalk", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ForceRecoveryServiceFabricPlatformUpdateDomainWalkSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ForceRecoveryServiceFabricPlatformUpdateDomainWalk", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ForceRecoveryServiceFabricPlatformUpdateDomainWalkResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ForceRecoveryServiceFabricPlatformUpdateDomainWalk", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ForceRecoveryServiceFabricPlatformUpdateDomainWalkPreparer prepares the ForceRecoveryServiceFabricPlatformUpdateDomainWalk request.
+func (client VirtualMachineScaleSetsClient) ForceRecoveryServiceFabricPlatformUpdateDomainWalkPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, platformUpdateDomain int32) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ "platformUpdateDomain": autorest.Encode("query", platformUpdateDomain),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/forceRecoveryServiceFabricPlatformUpdateDomainWalk", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ForceRecoveryServiceFabricPlatformUpdateDomainWalkSender sends the ForceRecoveryServiceFabricPlatformUpdateDomainWalk request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetsClient) ForceRecoveryServiceFabricPlatformUpdateDomainWalkSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ForceRecoveryServiceFabricPlatformUpdateDomainWalkResponder handles the response to the ForceRecoveryServiceFabricPlatformUpdateDomainWalk request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetsClient) ForceRecoveryServiceFabricPlatformUpdateDomainWalkResponder(resp *http.Response) (result RecoveryWalkResponse, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Get display information about a virtual machine scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+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
+}
+
+// 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 = "2019-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.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,
+ client.ByInspecting(),
+ 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
+}
+
+// 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 = "2019-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.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,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetOSUpgradeHistory gets list of OS upgrades on a VM scale set instance.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+func (client VirtualMachineScaleSetsClient) GetOSUpgradeHistory(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetListOSUpgradeHistoryPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.GetOSUpgradeHistory")
+ defer func() {
+ sc := -1
+ if result.vmsslouh.Response.Response != nil {
+ sc = result.vmsslouh.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.getOSUpgradeHistoryNextResults
+ req, err := client.GetOSUpgradeHistoryPreparer(ctx, resourceGroupName, VMScaleSetName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "GetOSUpgradeHistory", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetOSUpgradeHistorySender(req)
+ if err != nil {
+ result.vmsslouh.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "GetOSUpgradeHistory", resp, "Failure sending request")
+ return
+ }
+
+ result.vmsslouh, err = client.GetOSUpgradeHistoryResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "GetOSUpgradeHistory", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetOSUpgradeHistoryPreparer prepares the GetOSUpgradeHistory request.
+func (client VirtualMachineScaleSetsClient) GetOSUpgradeHistoryPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2019-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.Compute/virtualMachineScaleSets/{vmScaleSetName}/osUpgradeHistory", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetOSUpgradeHistorySender sends the GetOSUpgradeHistory request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetsClient) GetOSUpgradeHistorySender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetOSUpgradeHistoryResponder handles the response to the GetOSUpgradeHistory request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetsClient) GetOSUpgradeHistoryResponder(resp *http.Response) (result VirtualMachineScaleSetListOSUpgradeHistory, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// getOSUpgradeHistoryNextResults retrieves the next set of results, if any.
+func (client VirtualMachineScaleSetsClient) getOSUpgradeHistoryNextResults(ctx context.Context, lastResults VirtualMachineScaleSetListOSUpgradeHistory) (result VirtualMachineScaleSetListOSUpgradeHistory, err error) {
+ req, err := lastResults.virtualMachineScaleSetListOSUpgradeHistoryPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "getOSUpgradeHistoryNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.GetOSUpgradeHistorySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "getOSUpgradeHistoryNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.GetOSUpgradeHistoryResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "getOSUpgradeHistoryNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// GetOSUpgradeHistoryComplete enumerates all values, automatically crossing page boundaries as required.
+func (client VirtualMachineScaleSetsClient) GetOSUpgradeHistoryComplete(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetListOSUpgradeHistoryIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.GetOSUpgradeHistory")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.GetOSUpgradeHistory(ctx, resourceGroupName, VMScaleSetName)
+ return
+}
+
+// List gets a list of all VM scale sets under a resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client VirtualMachineScaleSetsClient) List(ctx context.Context, resourceGroupName string) (result VirtualMachineScaleSetListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.List")
+ defer func() {
+ sc := -1
+ if result.vmsslr.Response.Response != nil {
+ sc = result.vmsslr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.vmsslr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.vmsslr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// 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 = "2019-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.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,
+ client.ByInspecting(),
+ 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
+}
+
+// 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 = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachineScaleSets", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListAllSender sends the ListAll request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetsClient) ListAllSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListAllResponder handles the response to the ListAll request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetsClient) ListAllResponder(resp *http.Response) (result VirtualMachineScaleSetListWithLinkResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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
+}
+
+// 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 = "2019-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.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,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listSkusNextResults retrieves the next set of results, if any.
+func (client VirtualMachineScaleSetsClient) listSkusNextResults(ctx context.Context, lastResults VirtualMachineScaleSetListSkusResult) (result VirtualMachineScaleSetListSkusResult, err error) {
+ req, err := lastResults.virtualMachineScaleSetListSkusResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "listSkusNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSkusSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "listSkusNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListSkusResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "listSkusNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListSkusComplete enumerates all values, automatically crossing page boundaries as required.
+func (client VirtualMachineScaleSetsClient) ListSkusComplete(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetListSkusResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.ListSkus")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListSkus(ctx, resourceGroupName, VMScaleSetName)
+ return
+}
+
+// PerformMaintenance perform maintenance on one or more virtual machines in a VM scale set. Operation on instances
+// which are not eligible for perform maintenance will be failed. Please refer to best practices for more details:
+// https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set.
+func (client VirtualMachineScaleSetsClient) PerformMaintenance(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (result VirtualMachineScaleSetsPerformMaintenanceFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.PerformMaintenance")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.PerformMaintenancePreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "PerformMaintenance", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.PerformMaintenanceSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "PerformMaintenance", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// PerformMaintenancePreparer prepares the PerformMaintenance request.
+func (client VirtualMachineScaleSetsClient) PerformMaintenancePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/performMaintenance", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if VMInstanceIDs != nil {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithJSON(VMInstanceIDs))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// PerformMaintenanceSender sends the PerformMaintenance request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetsClient) PerformMaintenanceSender(req *http.Request) (future VirtualMachineScaleSetsPerformMaintenanceFuture, err error) {
+ var resp *http.Response
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// PerformMaintenanceResponder handles the response to the PerformMaintenance request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetsClient) PerformMaintenanceResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// PowerOff power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and
+// you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set.
+// skipShutdown - the parameter to request non-graceful VM shutdown. True value for this flag indicates
+// non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not
+// specified
+func (client VirtualMachineScaleSetsClient) PowerOff(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs, skipShutdown *bool) (result VirtualMachineScaleSetsPowerOffFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.PowerOff")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.PowerOffPreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs, skipShutdown)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "PowerOff", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.PowerOffSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "PowerOff", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// PowerOffPreparer prepares the PowerOff request.
+func (client VirtualMachineScaleSetsClient) PowerOffPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs, skipShutdown *bool) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if skipShutdown != nil {
+ queryParameters["skipShutdown"] = autorest.Encode("query", *skipShutdown)
+ } else {
+ queryParameters["skipShutdown"] = autorest.Encode("query", false)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/poweroff", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if VMInstanceIDs != nil {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithJSON(VMInstanceIDs))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// PowerOffSender sends the PowerOff request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetsClient) PowerOffSender(req *http.Request) (future VirtualMachineScaleSetsPowerOffFuture, err error) {
+ var resp *http.Response
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// PowerOffResponder handles the response to the PowerOff request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetsClient) PowerOffResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Redeploy shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers
+// them back on.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set.
+func (client VirtualMachineScaleSetsClient) Redeploy(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (result VirtualMachineScaleSetsRedeployFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Redeploy")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.RedeployPreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Redeploy", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.RedeploySender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Redeploy", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// RedeployPreparer prepares the Redeploy request.
+func (client VirtualMachineScaleSetsClient) RedeployPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/redeploy", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if VMInstanceIDs != nil {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithJSON(VMInstanceIDs))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// RedeploySender sends the Redeploy request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetsClient) RedeploySender(req *http.Request) (future VirtualMachineScaleSetsRedeployFuture, err error) {
+ var resp *http.Response
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// RedeployResponder handles the response to the Redeploy request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetsClient) RedeployResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Reimage reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a
+// ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// VMScaleSetReimageInput - parameters for Reimaging VM ScaleSet.
+func (client VirtualMachineScaleSetsClient) Reimage(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMScaleSetReimageInput *VirtualMachineScaleSetReimageParameters) (result VirtualMachineScaleSetsReimageFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Reimage")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ReimagePreparer(ctx, resourceGroupName, VMScaleSetName, VMScaleSetReimageInput)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Reimage", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.ReimageSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Reimage", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// ReimagePreparer prepares the Reimage request.
+func (client VirtualMachineScaleSetsClient) ReimagePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMScaleSetReimageInput *VirtualMachineScaleSetReimageParameters) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if VMScaleSetReimageInput != nil {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithJSON(VMScaleSetReimageInput))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ReimageSender sends the Reimage request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetsClient) ReimageSender(req *http.Request) (future VirtualMachineScaleSetsReimageFuture, err error) {
+ var resp *http.Response
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// ReimageResponder handles the response to the Reimage request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetsClient) ReimageResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// ReimageAll reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation
+// is only supported for managed disks.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set.
+func (client VirtualMachineScaleSetsClient) ReimageAll(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (result VirtualMachineScaleSetsReimageAllFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.ReimageAll")
+ defer func() {
+ sc := -1
+ if result.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", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// ReimageAllPreparer prepares the ReimageAll request.
+func (client VirtualMachineScaleSetsClient) ReimageAllPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/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
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// ReimageAllResponder handles the response to the ReimageAll request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetsClient) ReimageAllResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Restart restarts one or more virtual machines in a VM scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set.
+func (client VirtualMachineScaleSetsClient) Restart(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (result VirtualMachineScaleSetsRestartFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Restart")
+ defer func() {
+ sc := -1
+ if result.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", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// RestartPreparer prepares the Restart request.
+func (client VirtualMachineScaleSetsClient) RestartPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/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
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// RestartResponder handles the response to the Restart request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetsClient) RestartResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// SetOrchestrationServiceState changes ServiceState property for a given service
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the virtual machine scale set to create or update.
+// parameters - the input object for SetOrchestrationServiceState API.
+func (client VirtualMachineScaleSetsClient) SetOrchestrationServiceState(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters OrchestrationServiceStateInput) (result VirtualMachineScaleSetsSetOrchestrationServiceStateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.SetOrchestrationServiceState")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.SetOrchestrationServiceStatePreparer(ctx, resourceGroupName, VMScaleSetName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "SetOrchestrationServiceState", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.SetOrchestrationServiceStateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "SetOrchestrationServiceState", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// SetOrchestrationServiceStatePreparer prepares the SetOrchestrationServiceState request.
+func (client VirtualMachineScaleSetsClient) SetOrchestrationServiceStatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters OrchestrationServiceStateInput) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/setOrchestrationServiceState", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// SetOrchestrationServiceStateSender sends the SetOrchestrationServiceState request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetsClient) SetOrchestrationServiceStateSender(req *http.Request) (future VirtualMachineScaleSetsSetOrchestrationServiceStateFuture, err error) {
+ var resp *http.Response
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// SetOrchestrationServiceStateResponder handles the response to the SetOrchestrationServiceState request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetsClient) SetOrchestrationServiceStateResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Start starts one or more virtual machines in a VM scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set.
+func (client VirtualMachineScaleSetsClient) Start(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (result VirtualMachineScaleSetsStartFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Start")
+ defer func() {
+ sc := -1
+ if result.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", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// StartPreparer prepares the Start request.
+func (client VirtualMachineScaleSetsClient) StartPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/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
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// StartResponder handles the response to the Start request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetsClient) StartResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Update update a VM scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set to create or update.
+// parameters - the scale set object.
+func (client VirtualMachineScaleSetsClient) Update(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters VirtualMachineScaleSetUpdate) (result VirtualMachineScaleSetsUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Update")
+ defer func() {
+ sc := -1
+ if result.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", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client VirtualMachineScaleSetsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters VirtualMachineScaleSetUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2019-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.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
+ }
+ 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 VirtualMachineScaleSetsClient) UpdateResponder(resp *http.Response) (result VirtualMachineScaleSet, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdateInstancesPreparer prepares the UpdateInstances request.
+func (client VirtualMachineScaleSetsClient) UpdateInstancesPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs VirtualMachineScaleSetVMInstanceRequiredIDs) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/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
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// UpdateInstancesResponder handles the response to the UpdateInstances request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetsClient) UpdateInstancesResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ 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
new file mode 100644
index 000000000..bf1427b10
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetvmextensions.go
@@ -0,0 +1,455 @@
+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"
+)
+
+// VirtualMachineScaleSetVMExtensionsClient is the compute Client
+type VirtualMachineScaleSetVMExtensionsClient struct {
+ BaseClient
+}
+
+// NewVirtualMachineScaleSetVMExtensionsClient creates an instance of the VirtualMachineScaleSetVMExtensionsClient
+// client.
+func NewVirtualMachineScaleSetVMExtensionsClient(subscriptionID string) VirtualMachineScaleSetVMExtensionsClient {
+ return NewVirtualMachineScaleSetVMExtensionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewVirtualMachineScaleSetVMExtensionsClientWithBaseURI creates an instance of the
+// VirtualMachineScaleSetVMExtensionsClient client using a custom endpoint. Use this when interacting with an Azure
+// cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
+func NewVirtualMachineScaleSetVMExtensionsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetVMExtensionsClient {
+ return VirtualMachineScaleSetVMExtensionsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate the operation to create or update the VMSS VM extension.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+// VMExtensionName - the name of the virtual machine extension.
+// extensionParameters - parameters supplied to the Create Virtual Machine Extension operation.
+func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string, extensionParameters VirtualMachineExtension) (result VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMExtensionsClient.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, instanceID, VMExtensionName, extensionParameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string, extensionParameters VirtualMachineExtension) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmExtensionName": autorest.Encode("path", VMExtensionName),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2019-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.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}", pathParameters),
+ autorest.WithJSON(extensionParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ 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 VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualMachineExtension, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete the operation to delete the VMSS VM extension.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+// VMExtensionName - the name of the virtual machine extension.
+func (client VirtualMachineScaleSetVMExtensionsClient) Delete(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string) (result VirtualMachineScaleSetVMExtensionsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMExtensionsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, VMExtensionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client VirtualMachineScaleSetVMExtensionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmExtensionName": autorest.Encode("path", VMExtensionName),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2019-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.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMExtensionsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetVMExtensionsDeleteFuture, err error) {
+ var resp *http.Response
+ 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 VirtualMachineScaleSetVMExtensionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get the operation to get the VMSS VM extension.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+// VMExtensionName - the name of the virtual machine extension.
+// expand - the expand expression to apply on the operation.
+func (client VirtualMachineScaleSetVMExtensionsClient) Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string, expand string) (result VirtualMachineExtension, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMExtensionsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, VMExtensionName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client VirtualMachineScaleSetVMExtensionsClient) GetPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string, expand string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmExtensionName": autorest.Encode("path", VMExtensionName),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2019-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.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMExtensionsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMExtensionsClient) GetResponder(resp *http.Response) (result VirtualMachineExtension, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List the operation to get all extensions of an instance in Virtual Machine Scaleset.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+// expand - the expand expression to apply on the operation.
+func (client VirtualMachineScaleSetVMExtensionsClient) List(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, expand string) (result VirtualMachineExtensionsListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMExtensionsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ListPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client VirtualMachineScaleSetVMExtensionsClient) ListPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, expand string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2019-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.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMExtensionsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMExtensionsClient) ListResponder(resp *http.Response) (result VirtualMachineExtensionsListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Update the operation to update the VMSS VM extension.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+// VMExtensionName - the name of the virtual machine extension.
+// extensionParameters - parameters supplied to the Update Virtual Machine Extension operation.
+func (client VirtualMachineScaleSetVMExtensionsClient) Update(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string, extensionParameters VirtualMachineExtensionUpdate) (result VirtualMachineScaleSetVMExtensionsUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMExtensionsClient.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, instanceID, VMExtensionName, extensionParameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client VirtualMachineScaleSetVMExtensionsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string, extensionParameters VirtualMachineExtensionUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmExtensionName": autorest.Encode("path", VMExtensionName),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2019-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.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}", pathParameters),
+ autorest.WithJSON(extensionParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMExtensionsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetVMExtensionsUpdateFuture, err error) {
+ var resp *http.Response
+ 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 VirtualMachineScaleSetVMExtensionsClient) UpdateResponder(resp *http.Response) (result VirtualMachineExtension, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/2019-12-01/compute/virtualmachinescalesetvms.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetvms.go
new file mode 100644
index 000000000..7e611cfb1
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetvms.go
@@ -0,0 +1,1313 @@
+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"
+)
+
+// 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", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeallocatePreparer prepares the Deallocate request.
+func (client VirtualMachineScaleSetVMsClient) DeallocatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/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
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeallocateResponder handles the response to the Deallocate request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMsClient) DeallocateResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Delete deletes a virtual machine from a VM scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+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", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client VirtualMachineScaleSetVMsClient) DeletePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (*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 = "2019-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.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
+ }
+ 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 VirtualMachineScaleSetVMsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get gets a virtual machine from a VM scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+// expand - the expand expression to apply on the operation.
+func (client VirtualMachineScaleSetVMsClient) Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, expand InstanceViewTypes) (result VirtualMachineScaleSetVM, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client VirtualMachineScaleSetVMsClient) GetPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, expand InstanceViewTypes) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(string(expand)) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMsClient) GetResponder(resp *http.Response) (result VirtualMachineScaleSetVM, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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
+}
+
+// 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 = "2019-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.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,
+ client.ByInspecting(),
+ 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.
+// selectParameter - the list parameters.
+// expand - the expand expression to apply to the operation.
+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
+}
+
+// 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 = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+ if len(selectParameter) > 0 {
+ queryParameters["$select"] = autorest.Encode("query", selectParameter)
+ }
+ if len(expand) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMsClient) ListResponder(resp *http.Response) (result VirtualMachineScaleSetVMListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client VirtualMachineScaleSetVMsClient) listNextResults(ctx context.Context, lastResults VirtualMachineScaleSetVMListResult) (result VirtualMachineScaleSetVMListResult, err error) {
+ req, err := lastResults.virtualMachineScaleSetVMListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client VirtualMachineScaleSetVMsClient) ListComplete(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, filter string, selectParameter string, expand string) (result VirtualMachineScaleSetVMListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx, resourceGroupName, virtualMachineScaleSetName, filter, selectParameter, expand)
+ return
+}
+
+// PerformMaintenance performs maintenance on a virtual machine in a VM scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+func (client VirtualMachineScaleSetVMsClient) PerformMaintenance(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMsPerformMaintenanceFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.PerformMaintenance")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.PerformMaintenancePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "PerformMaintenance", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.PerformMaintenanceSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "PerformMaintenance", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// PerformMaintenancePreparer prepares the PerformMaintenance request.
+func (client VirtualMachineScaleSetVMsClient) PerformMaintenancePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/performMaintenance", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// PerformMaintenanceSender sends the PerformMaintenance request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMsClient) PerformMaintenanceSender(req *http.Request) (future VirtualMachineScaleSetVMsPerformMaintenanceFuture, err error) {
+ var resp *http.Response
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// PerformMaintenanceResponder handles the response to the PerformMaintenance request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMsClient) PerformMaintenanceResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// PowerOff power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are
+// getting charged for the resources. Instead, use deallocate to release resources and avoid charges.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+// skipShutdown - the parameter to request non-graceful VM shutdown. True value for this flag indicates
+// non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not
+// specified
+func (client VirtualMachineScaleSetVMsClient) PowerOff(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, skipShutdown *bool) (result VirtualMachineScaleSetVMsPowerOffFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.PowerOff")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.PowerOffPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, skipShutdown)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "PowerOff", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.PowerOffSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "PowerOff", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// PowerOffPreparer prepares the PowerOff request.
+func (client VirtualMachineScaleSetVMsClient) PowerOffPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, skipShutdown *bool) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if skipShutdown != nil {
+ queryParameters["skipShutdown"] = autorest.Encode("query", *skipShutdown)
+ } else {
+ queryParameters["skipShutdown"] = autorest.Encode("query", false)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/poweroff", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// PowerOffSender sends the PowerOff request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMsClient) PowerOffSender(req *http.Request) (future VirtualMachineScaleSetVMsPowerOffFuture, err error) {
+ var resp *http.Response
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// PowerOffResponder handles the response to the PowerOff request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMsClient) PowerOffResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Redeploy shuts down the virtual machine in the virtual machine scale set, moves it to a new node, and powers it back
+// on.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+func (client VirtualMachineScaleSetVMsClient) Redeploy(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMsRedeployFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Redeploy")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.RedeployPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Redeploy", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.RedeploySender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Redeploy", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// RedeployPreparer prepares the Redeploy request.
+func (client VirtualMachineScaleSetVMsClient) RedeployPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/redeploy", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// RedeploySender sends the Redeploy request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMsClient) RedeploySender(req *http.Request) (future VirtualMachineScaleSetVMsRedeployFuture, err error) {
+ var resp *http.Response
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// RedeployResponder handles the response to the Redeploy request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMsClient) RedeployResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Reimage reimages (upgrade the operating system) a specific virtual machine in a VM scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+// VMScaleSetVMReimageInput - parameters for the Reimaging Virtual machine in ScaleSet.
+func (client VirtualMachineScaleSetVMsClient) Reimage(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMScaleSetVMReimageInput *VirtualMachineScaleSetVMReimageParameters) (result VirtualMachineScaleSetVMsReimageFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Reimage")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ReimagePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, VMScaleSetVMReimageInput)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Reimage", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.ReimageSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Reimage", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// ReimagePreparer prepares the Reimage request.
+func (client VirtualMachineScaleSetVMsClient) ReimagePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMScaleSetVMReimageInput *VirtualMachineScaleSetVMReimageParameters) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimage", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if VMScaleSetVMReimageInput != nil {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithJSON(VMScaleSetVMReimageInput))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ReimageSender sends the Reimage request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMsClient) ReimageSender(req *http.Request) (future VirtualMachineScaleSetVMsReimageFuture, err error) {
+ var resp *http.Response
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// ReimageResponder handles the response to the Reimage request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMsClient) ReimageResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// ReimageAll allows you to re-image all the disks ( including data disks ) in the a VM scale set instance. This
+// operation is only supported for managed disks.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+func (client VirtualMachineScaleSetVMsClient) ReimageAll(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMsReimageAllFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.ReimageAll")
+ defer func() {
+ sc := -1
+ if result.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", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// ReimageAllPreparer prepares the ReimageAll request.
+func (client VirtualMachineScaleSetVMsClient) ReimageAllPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/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
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// ReimageAllResponder handles the response to the ReimageAll request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMsClient) ReimageAllResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Restart restarts a virtual machine in a VM scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+func (client VirtualMachineScaleSetVMsClient) Restart(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMsRestartFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Restart")
+ defer func() {
+ sc := -1
+ if result.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", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// RestartPreparer prepares the Restart request.
+func (client VirtualMachineScaleSetVMsClient) RestartPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/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
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// RestartResponder handles the response to the Restart request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMsClient) RestartResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// RunCommand run command on a virtual machine in a VM scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+// parameters - parameters supplied to the Run command operation.
+func (client VirtualMachineScaleSetVMsClient) RunCommand(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, parameters RunCommandInput) (result VirtualMachineScaleSetVMsRunCommandFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.RunCommand")
+ defer func() {
+ sc := -1
+ if result.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.VirtualMachineScaleSetVMsClient", "RunCommand", err.Error())
+ }
+
+ req, err := client.RunCommandPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "RunCommand", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.RunCommandSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "RunCommand", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// RunCommandPreparer prepares the RunCommand request.
+func (client VirtualMachineScaleSetVMsClient) RunCommandPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, parameters RunCommandInput) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/runCommand", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// RunCommandSender sends the RunCommand request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMsClient) RunCommandSender(req *http.Request) (future VirtualMachineScaleSetVMsRunCommandFuture, err error) {
+ var resp *http.Response
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// RunCommandResponder handles the response to the RunCommand request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMsClient) RunCommandResponder(resp *http.Response) (result RunCommandResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// SimulateEviction the operation to simulate the eviction of spot virtual machine in a VM scale set. The eviction will
+// occur within 30 minutes of calling the API
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+func (client VirtualMachineScaleSetVMsClient) SimulateEviction(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.SimulateEviction")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.SimulateEvictionPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "SimulateEviction", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.SimulateEvictionSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "SimulateEviction", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.SimulateEvictionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "SimulateEviction", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// SimulateEvictionPreparer prepares the SimulateEviction request.
+func (client VirtualMachineScaleSetVMsClient) SimulateEvictionPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/simulateEviction", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// SimulateEvictionSender sends the SimulateEviction request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMsClient) SimulateEvictionSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// SimulateEvictionResponder handles the response to the SimulateEviction request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMsClient) SimulateEvictionResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Start starts a virtual machine in a VM scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+func (client VirtualMachineScaleSetVMsClient) Start(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMsStartFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Start")
+ defer func() {
+ sc := -1
+ if result.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", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// StartPreparer prepares the Start request.
+func (client VirtualMachineScaleSetVMsClient) StartPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/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
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// StartResponder handles the response to the Start request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMsClient) StartResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Update updates a virtual machine of a VM scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set where the extension should be create or updated.
+// instanceID - the instance ID of the virtual machine.
+// parameters - parameters supplied to the Update Virtual Machine Scale Sets VM operation.
+func (client VirtualMachineScaleSetVMsClient) Update(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, parameters VirtualMachineScaleSetVM) (result VirtualMachineScaleSetVMsUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetVMProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetVMProperties.StorageProfile", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetVMProperties.StorageProfile.OsDisk", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetVMProperties.StorageProfile.OsDisk.EncryptionSettings", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetVMProperties.StorageProfile.OsDisk.EncryptionSettings.DiskEncryptionKey", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetVMProperties.StorageProfile.OsDisk.EncryptionSettings.DiskEncryptionKey.SecretURL", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.VirtualMachineScaleSetVMProperties.StorageProfile.OsDisk.EncryptionSettings.DiskEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil},
+ }},
+ {Target: "parameters.VirtualMachineScaleSetVMProperties.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetVMProperties.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey.KeyURL", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.VirtualMachineScaleSetVMProperties.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil},
+ }},
+ }},
+ }},
+ }},
+ }}}}}); err != nil {
+ return result, validation.NewError("compute.VirtualMachineScaleSetVMsClient", "Update", err.Error())
+ }
+
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client VirtualMachineScaleSetVMsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, parameters VirtualMachineScaleSetVM) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ parameters.InstanceID = nil
+ parameters.Sku = nil
+ parameters.Resources = nil
+ parameters.Zones = nil
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetVMsUpdateFuture, err error) {
+ var resp *http.Response
+ 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 VirtualMachineScaleSetVMsClient) UpdateResponder(resp *http.Response) (result VirtualMachineScaleSetVM, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/2019-12-01/compute/virtualmachinesizes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinesizes.go
new file mode 100644
index 000000000..0eb7702a3
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinesizes.go
@@ -0,0 +1,125 @@
+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 this API is deprecated. Use [Resources
+// Skus](https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list)
+// Parameters:
+// location - the location upon which virtual-machine-sizes is queried.
+func (client VirtualMachineSizesClient) List(ctx context.Context, location string) (result VirtualMachineSizeListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineSizesClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: location,
+ Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("compute.VirtualMachineSizesClient", "List", err.Error())
+ }
+
+ req, err := client.ListPreparer(ctx, location)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineSizesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineSizesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineSizesClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// 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 = "2019-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/vmSizes", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineSizesClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineSizesClient) ListResponder(resp *http.Response) (result VirtualMachineSizeListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/containerregistry/mgmt/2019-05-01/containerregistry/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/client.go
index b463ed537..578a43823 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/client.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/client.go
@@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient {
return NewWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewWithBaseURI creates an instance of the BaseClient client.
+// 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()),
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/operations.go
index 66c8936b9..901490055 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/operations.go
@@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient {
return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client.
+// 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)}
}
@@ -92,8 +93,7 @@ func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request,
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/registries.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/registries.go
index 2c6601a22..4ba0f940e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/registries.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/registries.go
@@ -36,7 +36,8 @@ func NewRegistriesClient(subscriptionID string) RegistriesClient {
return NewRegistriesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewRegistriesClientWithBaseURI creates an instance of the RegistriesClient client.
+// NewRegistriesClientWithBaseURI creates an instance of the RegistriesClient 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 NewRegistriesClientWithBaseURI(baseURI string, subscriptionID string) RegistriesClient {
return RegistriesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -112,8 +113,7 @@ func (client RegistriesClient) CheckNameAvailabilityPreparer(ctx context.Context
// CheckNameAvailabilitySender sends the CheckNameAvailability request. The method will close the
// http.Response Body if it receives an error.
func (client RegistriesClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always
@@ -202,9 +202,8 @@ func (client RegistriesClient) CreatePreparer(ctx context.Context, resourceGroup
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client RegistriesClient) CreateSender(req *http.Request) (future RegistriesCreateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -289,9 +288,8 @@ func (client RegistriesClient) DeletePreparer(ctx context.Context, resourceGroup
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RegistriesClient) DeleteSender(req *http.Request) (future RegistriesDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -381,8 +379,7 @@ func (client RegistriesClient) GetPreparer(ctx context.Context, resourceGroupNam
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client RegistriesClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -468,8 +465,7 @@ func (client RegistriesClient) GetBuildSourceUploadURLPreparer(ctx context.Conte
// GetBuildSourceUploadURLSender sends the GetBuildSourceUploadURL request. The method will close the
// http.Response Body if it receives an error.
func (client RegistriesClient) GetBuildSourceUploadURLSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetBuildSourceUploadURLResponder handles the response to the GetBuildSourceUploadURL request. The method always
@@ -558,9 +554,8 @@ func (client RegistriesClient) ImportImagePreparer(ctx context.Context, resource
// ImportImageSender sends the ImportImage request. The method will close the
// http.Response Body if it receives an error.
func (client RegistriesClient) ImportImageSender(req *http.Request) (future RegistriesImportImageFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -636,8 +631,7 @@ func (client RegistriesClient) ListPreparer(ctx context.Context) (*http.Request,
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client RegistriesClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -755,8 +749,7 @@ func (client RegistriesClient) ListByResourceGroupPreparer(ctx context.Context,
// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
// http.Response Body if it receives an error.
func (client RegistriesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
@@ -879,8 +872,7 @@ func (client RegistriesClient) ListCredentialsPreparer(ctx context.Context, reso
// ListCredentialsSender sends the ListCredentials request. The method will close the
// http.Response Body if it receives an error.
func (client RegistriesClient) ListCredentialsSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListCredentialsResponder handles the response to the ListCredentials request. The method always
@@ -966,8 +958,7 @@ func (client RegistriesClient) ListUsagesPreparer(ctx context.Context, resourceG
// ListUsagesSender sends the ListUsages request. The method will close the
// http.Response Body if it receives an error.
func (client RegistriesClient) ListUsagesSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListUsagesResponder handles the response to the ListUsages request. The method always
@@ -1057,8 +1048,7 @@ func (client RegistriesClient) RegenerateCredentialPreparer(ctx context.Context,
// RegenerateCredentialSender sends the RegenerateCredential request. The method will close the
// http.Response Body if it receives an error.
func (client RegistriesClient) RegenerateCredentialSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// RegenerateCredentialResponder handles the response to the RegenerateCredential request. The method always
@@ -1141,9 +1131,8 @@ func (client RegistriesClient) ScheduleRunPreparer(ctx context.Context, resource
// ScheduleRunSender sends the ScheduleRun request. The method will close the
// http.Response Body if it receives an error.
func (client RegistriesClient) ScheduleRunSender(req *http.Request) (future RegistriesScheduleRunFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -1231,9 +1220,8 @@ func (client RegistriesClient) UpdatePreparer(ctx context.Context, resourceGroup
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client RegistriesClient) UpdateSender(req *http.Request) (future RegistriesUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/replications.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/replications.go
index 352d05a6a..045c66b79 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/replications.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/replications.go
@@ -36,7 +36,8 @@ func NewReplicationsClient(subscriptionID string) ReplicationsClient {
return NewReplicationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewReplicationsClientWithBaseURI creates an instance of the ReplicationsClient client.
+// NewReplicationsClientWithBaseURI creates an instance of the ReplicationsClient 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 NewReplicationsClientWithBaseURI(baseURI string, subscriptionID string) ReplicationsClient {
return ReplicationsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -114,9 +115,8 @@ func (client ReplicationsClient) CreatePreparer(ctx context.Context, resourceGro
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationsClient) CreateSender(req *http.Request) (future ReplicationsCreateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -207,9 +207,8 @@ func (client ReplicationsClient) DeletePreparer(ctx context.Context, resourceGro
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationsClient) DeleteSender(req *http.Request) (future ReplicationsDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -305,8 +304,7 @@ func (client ReplicationsClient) GetPreparer(ctx context.Context, resourceGroupN
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationsClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -393,8 +391,7 @@ func (client ReplicationsClient) ListPreparer(ctx context.Context, resourceGroup
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationsClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -520,9 +517,8 @@ func (client ReplicationsClient) UpdatePreparer(ctx context.Context, resourceGro
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client ReplicationsClient) UpdateSender(req *http.Request) (future ReplicationsUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/runs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/runs.go
index 2e5d77339..91c393f0c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/runs.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/runs.go
@@ -36,7 +36,8 @@ func NewRunsClient(subscriptionID string) RunsClient {
return NewRunsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewRunsClientWithBaseURI creates an instance of the RunsClient client.
+// NewRunsClientWithBaseURI creates an instance of the RunsClient 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 NewRunsClientWithBaseURI(baseURI string, subscriptionID string) RunsClient {
return RunsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -107,9 +108,8 @@ func (client RunsClient) CancelPreparer(ctx context.Context, resourceGroupName s
// CancelSender sends the Cancel request. The method will close the
// http.Response Body if it receives an error.
func (client RunsClient) CancelSender(req *http.Request) (future RunsCancelFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -201,8 +201,7 @@ func (client RunsClient) GetPreparer(ctx context.Context, resourceGroupName stri
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client RunsClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -290,8 +289,7 @@ func (client RunsClient) GetLogSasURLPreparer(ctx context.Context, resourceGroup
// GetLogSasURLSender sends the GetLogSasURL request. The method will close the
// http.Response Body if it receives an error.
func (client RunsClient) GetLogSasURLSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetLogSasURLResponder handles the response to the GetLogSasURL request. The method always
@@ -387,8 +385,7 @@ func (client RunsClient) ListPreparer(ctx context.Context, resourceGroupName str
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client RunsClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -510,9 +507,8 @@ func (client RunsClient) UpdatePreparer(ctx context.Context, resourceGroupName s
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client RunsClient) UpdateSender(req *http.Request) (future RunsUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/tasks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/tasks.go
index 860e5f38a..fc11eb857 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/tasks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/tasks.go
@@ -36,7 +36,8 @@ func NewTasksClient(subscriptionID string) TasksClient {
return NewTasksClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewTasksClientWithBaseURI creates an instance of the TasksClient client.
+// NewTasksClientWithBaseURI creates an instance of the TasksClient 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 NewTasksClientWithBaseURI(baseURI string, subscriptionID string) TasksClient {
return TasksClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -74,7 +75,7 @@ func (client TasksClient) Create(ctx context.Context, resourceGroupName string,
Chain: []validation.Constraint{{Target: "taskCreateParameters.TaskProperties.Platform", Name: validation.Null, Rule: true, Chain: nil},
{Target: "taskCreateParameters.TaskProperties.Timeout", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "taskCreateParameters.TaskProperties.Timeout", Name: validation.InclusiveMaximum, Rule: int64(28800), Chain: nil},
- {Target: "taskCreateParameters.TaskProperties.Timeout", Name: validation.InclusiveMinimum, Rule: 300, Chain: nil},
+ {Target: "taskCreateParameters.TaskProperties.Timeout", Name: validation.InclusiveMinimum, Rule: int64(300), Chain: nil},
}},
{Target: "taskCreateParameters.TaskProperties.Step", Name: validation.Null, Rule: true, Chain: nil},
{Target: "taskCreateParameters.TaskProperties.Trigger", Name: validation.Null, Rule: false,
@@ -127,9 +128,8 @@ func (client TasksClient) CreatePreparer(ctx context.Context, resourceGroupName
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client TasksClient) CreateSender(req *http.Request) (future TasksCreateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -220,9 +220,8 @@ func (client TasksClient) DeletePreparer(ctx context.Context, resourceGroupName
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client TasksClient) DeleteSender(req *http.Request) (future TasksDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -318,8 +317,7 @@ func (client TasksClient) GetPreparer(ctx context.Context, resourceGroupName str
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client TasksClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -411,8 +409,7 @@ func (client TasksClient) GetDetailsPreparer(ctx context.Context, resourceGroupN
// GetDetailsSender sends the GetDetails request. The method will close the
// http.Response Body if it receives an error.
func (client TasksClient) GetDetailsSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetDetailsResponder handles the response to the GetDetails request. The method always
@@ -499,8 +496,7 @@ func (client TasksClient) ListPreparer(ctx context.Context, resourceGroupName st
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client TasksClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -626,9 +622,8 @@ func (client TasksClient) UpdatePreparer(ctx context.Context, resourceGroupName
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client TasksClient) UpdateSender(req *http.Request) (future TasksUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/version.go
index b5d92b740..8c51fa478 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/version.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/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.Number + " containerregistry/2019-05-01"
+ return "Azure-SDK-For-Go/" + Version() + " containerregistry/2019-05-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/containerregistry/mgmt/2019-05-01/containerregistry/webhooks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/webhooks.go
index 156bbfefb..7de5c13ec 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/webhooks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/webhooks.go
@@ -36,7 +36,8 @@ func NewWebhooksClient(subscriptionID string) WebhooksClient {
return NewWebhooksClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewWebhooksClientWithBaseURI creates an instance of the WebhooksClient client.
+// NewWebhooksClientWithBaseURI creates an instance of the WebhooksClient 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 NewWebhooksClientWithBaseURI(baseURI string, subscriptionID string) WebhooksClient {
return WebhooksClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -120,9 +121,8 @@ func (client WebhooksClient) CreatePreparer(ctx context.Context, resourceGroupNa
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client WebhooksClient) CreateSender(req *http.Request) (future WebhooksCreateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -213,9 +213,8 @@ func (client WebhooksClient) DeletePreparer(ctx context.Context, resourceGroupNa
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client WebhooksClient) DeleteSender(req *http.Request) (future WebhooksDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -311,8 +310,7 @@ func (client WebhooksClient) GetPreparer(ctx context.Context, resourceGroupName
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client WebhooksClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -404,8 +402,7 @@ func (client WebhooksClient) GetCallbackConfigPreparer(ctx context.Context, reso
// GetCallbackConfigSender sends the GetCallbackConfig request. The method will close the
// http.Response Body if it receives an error.
func (client WebhooksClient) GetCallbackConfigSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetCallbackConfigResponder handles the response to the GetCallbackConfig request. The method always
@@ -492,8 +489,7 @@ func (client WebhooksClient) ListPreparer(ctx context.Context, resourceGroupName
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client WebhooksClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -623,8 +619,7 @@ func (client WebhooksClient) ListEventsPreparer(ctx context.Context, resourceGro
// ListEventsSender sends the ListEvents request. The method will close the
// http.Response Body if it receives an error.
func (client WebhooksClient) ListEventsSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListEventsResponder handles the response to the ListEvents request. The method always
@@ -753,8 +748,7 @@ func (client WebhooksClient) PingPreparer(ctx context.Context, resourceGroupName
// PingSender sends the Ping request. The method will close the
// http.Response Body if it receives an error.
func (client WebhooksClient) PingSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// PingResponder handles the response to the Ping request. The method always
@@ -843,9 +837,8 @@ func (client WebhooksClient) UpdatePreparer(ctx context.Context, resourceGroupNa
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client WebhooksClient) UpdateSender(req *http.Request) (future WebhooksUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/agentpools.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/agentpools.go
new file mode 100644
index 000000000..65f696ef5
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/agentpools.go
@@ -0,0 +1,609 @@
+package containerservice
+
+// 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"
+)
+
+// AgentPoolsClient is the the Container Service Client.
+type AgentPoolsClient struct {
+ BaseClient
+}
+
+// NewAgentPoolsClient creates an instance of the AgentPoolsClient client.
+func NewAgentPoolsClient(subscriptionID string) AgentPoolsClient {
+ return NewAgentPoolsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewAgentPoolsClientWithBaseURI creates an instance of the AgentPoolsClient client using a custom endpoint. Use this
+// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
+func NewAgentPoolsClientWithBaseURI(baseURI string, subscriptionID string) AgentPoolsClient {
+ return AgentPoolsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates an agent pool in the specified managed cluster.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+// agentPoolName - the name of the agent pool.
+// parameters - parameters supplied to the Create or Update an agent pool operation.
+func (client AgentPoolsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, parameters AgentPool) (result AgentPoolsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.AgentPoolsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, resourceName, agentPoolName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client AgentPoolsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, parameters AgentPool) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "agentPoolName": autorest.Encode("path", agentPoolName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2020-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.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client AgentPoolsClient) CreateOrUpdateSender(req *http.Request) (future AgentPoolsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ 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 AgentPoolsClient) CreateOrUpdateResponder(resp *http.Response) (result AgentPool, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete deletes the agent pool in the specified managed cluster.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+// agentPoolName - the name of the agent pool.
+func (client AgentPoolsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (result AgentPoolsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.AgentPoolsClient", "Delete", err.Error())
+ }
+
+ req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName, agentPoolName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client AgentPoolsClient) DeletePreparer(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "agentPoolName": autorest.Encode("path", agentPoolName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2020-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.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client AgentPoolsClient) DeleteSender(req *http.Request) (future AgentPoolsDeleteFuture, err error) {
+ var resp *http.Response
+ 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 AgentPoolsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get gets the details of the agent pool by managed cluster and resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+// agentPoolName - the name of the agent pool.
+func (client AgentPoolsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (result AgentPool, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.AgentPoolsClient", "Get", err.Error())
+ }
+
+ req, err := client.GetPreparer(ctx, resourceGroupName, resourceName, agentPoolName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client AgentPoolsClient) GetPreparer(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "agentPoolName": autorest.Encode("path", agentPoolName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2020-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.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client AgentPoolsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client AgentPoolsClient) GetResponder(resp *http.Response) (result AgentPool, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetAvailableAgentPoolVersions gets a list of supported versions for the specified agent pool.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+func (client AgentPoolsClient) GetAvailableAgentPoolVersions(ctx context.Context, resourceGroupName string, resourceName string) (result AgentPoolAvailableVersions, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolsClient.GetAvailableAgentPoolVersions")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.AgentPoolsClient", "GetAvailableAgentPoolVersions", err.Error())
+ }
+
+ req, err := client.GetAvailableAgentPoolVersionsPreparer(ctx, resourceGroupName, resourceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "GetAvailableAgentPoolVersions", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetAvailableAgentPoolVersionsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "GetAvailableAgentPoolVersions", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetAvailableAgentPoolVersionsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "GetAvailableAgentPoolVersions", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetAvailableAgentPoolVersionsPreparer prepares the GetAvailableAgentPoolVersions request.
+func (client AgentPoolsClient) GetAvailableAgentPoolVersionsPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2020-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.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetAvailableAgentPoolVersionsSender sends the GetAvailableAgentPoolVersions request. The method will close the
+// http.Response Body if it receives an error.
+func (client AgentPoolsClient) GetAvailableAgentPoolVersionsSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetAvailableAgentPoolVersionsResponder handles the response to the GetAvailableAgentPoolVersions request. The method always
+// closes the http.Response Body.
+func (client AgentPoolsClient) GetAvailableAgentPoolVersionsResponder(resp *http.Response) (result AgentPoolAvailableVersions, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetUpgradeProfile gets the details of the upgrade profile for an agent pool with a specified resource group and
+// managed cluster name.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+// agentPoolName - the name of the agent pool.
+func (client AgentPoolsClient) GetUpgradeProfile(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (result AgentPoolUpgradeProfile, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolsClient.GetUpgradeProfile")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.AgentPoolsClient", "GetUpgradeProfile", err.Error())
+ }
+
+ req, err := client.GetUpgradeProfilePreparer(ctx, resourceGroupName, resourceName, agentPoolName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "GetUpgradeProfile", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetUpgradeProfileSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "GetUpgradeProfile", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetUpgradeProfileResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "GetUpgradeProfile", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetUpgradeProfilePreparer prepares the GetUpgradeProfile request.
+func (client AgentPoolsClient) GetUpgradeProfilePreparer(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "agentPoolName": autorest.Encode("path", agentPoolName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2020-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.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetUpgradeProfileSender sends the GetUpgradeProfile request. The method will close the
+// http.Response Body if it receives an error.
+func (client AgentPoolsClient) GetUpgradeProfileSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetUpgradeProfileResponder handles the response to the GetUpgradeProfile request. The method always
+// closes the http.Response Body.
+func (client AgentPoolsClient) GetUpgradeProfileResponder(resp *http.Response) (result AgentPoolUpgradeProfile, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List gets a list of agent pools in the specified managed cluster. The operation returns properties of each agent
+// pool.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+func (client AgentPoolsClient) List(ctx context.Context, resourceGroupName string, resourceName string) (result AgentPoolListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolsClient.List")
+ defer func() {
+ sc := -1
+ if result.aplr.Response.Response != nil {
+ sc = result.aplr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.AgentPoolsClient", "List", err.Error())
+ }
+
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName, resourceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.aplr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.aplr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client AgentPoolsClient) ListPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2020-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.ContainerService/managedClusters/{resourceName}/agentPools", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client AgentPoolsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client AgentPoolsClient) ListResponder(resp *http.Response) (result AgentPoolListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client AgentPoolsClient) listNextResults(ctx context.Context, lastResults AgentPoolListResult) (result AgentPoolListResult, err error) {
+ req, err := lastResults.agentPoolListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client AgentPoolsClient) ListComplete(ctx context.Context, resourceGroupName string, resourceName string) (result AgentPoolListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx, resourceGroupName, resourceName)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/client.go
new file mode 100644
index 000000000..858e168f2
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/client.go
@@ -0,0 +1,52 @@
+// Package containerservice implements the Azure ARM Containerservice service API version .
+//
+// The Container Service Client.
+package containerservice
+
+// 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 Containerservice
+ DefaultBaseURI = "https://management.azure.com"
+)
+
+// BaseClient is the base client for Containerservice.
+type BaseClient struct {
+ autorest.Client
+ BaseURI string
+ SubscriptionID string
+}
+
+// New creates an instance of the BaseClient client.
+func New(subscriptionID string) BaseClient {
+ return NewWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with
+// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
+func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
+ return BaseClient{
+ Client: autorest.NewClientWithUserAgent(UserAgent()),
+ BaseURI: baseURI,
+ SubscriptionID: subscriptionID,
+ }
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/containerservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/containerservices.go
new file mode 100644
index 000000000..c059245f0
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/containerservices.go
@@ -0,0 +1,618 @@
+package containerservice
+
+// 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"
+)
+
+// ContainerServicesClient is the the Container Service Client.
+type ContainerServicesClient struct {
+ BaseClient
+}
+
+// NewContainerServicesClient creates an instance of the ContainerServicesClient client.
+func NewContainerServicesClient(subscriptionID string) ContainerServicesClient {
+ return NewContainerServicesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient 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 NewContainerServicesClientWithBaseURI(baseURI string, subscriptionID string) ContainerServicesClient {
+ return ContainerServicesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates a container service with the specified configuration of orchestrator, masters, and
+// agents.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// containerServiceName - the name of the container service in the specified subscription and resource group.
+// parameters - parameters supplied to the Create or Update a Container Service operation.
+func (client ContainerServicesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, containerServiceName string, parameters ContainerService) (result ContainerServicesCreateOrUpdateFutureType, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.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.Properties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.Properties.OrchestratorProfile", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.Properties.CustomProfile", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.Properties.CustomProfile.Orchestrator", Name: validation.Null, Rule: true, Chain: nil}}},
+ {Target: "parameters.Properties.ServicePrincipalProfile", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.Properties.ServicePrincipalProfile.ClientID", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.Properties.ServicePrincipalProfile.KeyVaultSecretRef", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.Properties.ServicePrincipalProfile.KeyVaultSecretRef.VaultID", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.Properties.ServicePrincipalProfile.KeyVaultSecretRef.SecretName", Name: validation.Null, Rule: true, Chain: nil},
+ }},
+ }},
+ {Target: "parameters.Properties.MasterProfile", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.Properties.MasterProfile.DNSPrefix", Name: validation.Null, Rule: true, Chain: nil}}},
+ {Target: "parameters.Properties.WindowsProfile", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.Properties.WindowsProfile.AdminUsername", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.Properties.WindowsProfile.AdminUsername", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$`, Chain: nil}}},
+ {Target: "parameters.Properties.WindowsProfile.AdminPassword", Name: validation.Null, Rule: true, Chain: nil},
+ }},
+ {Target: "parameters.Properties.LinuxProfile", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.Properties.LinuxProfile.AdminUsername", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.Properties.LinuxProfile.AdminUsername", Name: validation.Pattern, Rule: `^[A-Za-z][-A-Za-z0-9_]*$`, Chain: nil}}},
+ {Target: "parameters.Properties.LinuxProfile.SSH", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.Properties.LinuxProfile.SSH.PublicKeys", Name: validation.Null, Rule: true, Chain: nil}}},
+ }},
+ {Target: "parameters.Properties.DiagnosticsProfile", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.Properties.DiagnosticsProfile.VMDiagnostics", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.Properties.DiagnosticsProfile.VMDiagnostics.Enabled", Name: validation.Null, Rule: true, Chain: nil}}},
+ }},
+ }}}}}); err != nil {
+ return result, validation.NewError("containerservice.ContainerServicesClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, containerServiceName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client ContainerServicesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, containerServiceName string, parameters ContainerService) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "containerServiceName": autorest.Encode("path", containerServiceName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}", 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 ContainerServicesClient) CreateOrUpdateSender(req *http.Request) (future ContainerServicesCreateOrUpdateFutureType, 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 ContainerServicesClient) CreateOrUpdateResponder(resp *http.Response) (result ContainerService, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete deletes the specified container service in the specified subscription and resource group. The operation does
+// not delete other resources created as part of creating a container service, including storage accounts, VMs, and
+// availability sets. All the other resources created with the container service are part of the same resource group
+// and can be deleted individually.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// containerServiceName - the name of the container service in the specified subscription and resource group.
+func (client ContainerServicesClient) Delete(ctx context.Context, resourceGroupName string, containerServiceName string) (result ContainerServicesDeleteFutureType, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, containerServiceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client ContainerServicesClient) DeletePreparer(ctx context.Context, resourceGroupName string, containerServiceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "containerServiceName": autorest.Encode("path", containerServiceName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}", 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 ContainerServicesClient) DeleteSender(req *http.Request) (future ContainerServicesDeleteFutureType, 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 ContainerServicesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get gets the properties of the specified container service in the specified subscription and resource group. The
+// operation returns the properties including state, orchestrator, number of masters and agents, and FQDNs of masters
+// and agents.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// containerServiceName - the name of the container service in the specified subscription and resource group.
+func (client ContainerServicesClient) Get(ctx context.Context, resourceGroupName string, containerServiceName string) (result ContainerService, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.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, containerServiceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client ContainerServicesClient) GetPreparer(ctx context.Context, resourceGroupName string, containerServiceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "containerServiceName": autorest.Encode("path", containerServiceName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}", 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 ContainerServicesClient) 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 ContainerServicesClient) GetResponder(resp *http.Response) (result ContainerService, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List gets a list of container services in the specified subscription. The operation returns properties of each
+// container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents.
+func (client ContainerServicesClient) List(ctx context.Context) (result ListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.List")
+ defer func() {
+ sc := -1
+ if result.lr.Response.Response != nil {
+ sc = result.lr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.lr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.lr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client ContainerServicesClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/containerServices", 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 ContainerServicesClient) 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 ContainerServicesClient) ListResponder(resp *http.Response) (result ListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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 ContainerServicesClient) listNextResults(ctx context.Context, lastResults ListResult) (result ListResult, err error) {
+ req, err := lastResults.listResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ContainerServicesClient) ListComplete(ctx context.Context) (result ListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.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 a list of container services in the specified subscription and resource group. The
+// operation returns properties of each container service including state, orchestrator, number of masters and agents,
+// and FQDNs of masters and agents.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client ContainerServicesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.lr.Response.Response != nil {
+ sc = result.lr.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, "containerservice.ContainerServicesClient", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.lr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.lr, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "ListByResourceGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client ContainerServicesClient) 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-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices", 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 ContainerServicesClient) 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 ContainerServicesClient) ListByResourceGroupResponder(resp *http.Response) (result ListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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 ContainerServicesClient) listByResourceGroupNextResults(ctx context.Context, lastResults ListResult) (result ListResult, err error) {
+ req, err := lastResults.listResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ContainerServicesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.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
+}
+
+// ListOrchestrators gets a list of supported orchestrators in the specified subscription. The operation returns
+// properties of each orchestrator including version, available upgrades and whether that version or upgrades are in
+// preview.
+// Parameters:
+// location - the name of a supported Azure region.
+// resourceType - resource type for which the list of orchestrators needs to be returned
+func (client ContainerServicesClient) ListOrchestrators(ctx context.Context, location string, resourceType string) (result OrchestratorVersionProfileListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.ListOrchestrators")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ListOrchestratorsPreparer(ctx, location, resourceType)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "ListOrchestrators", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListOrchestratorsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "ListOrchestrators", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListOrchestratorsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "ListOrchestrators", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListOrchestratorsPreparer prepares the ListOrchestrators request.
+func (client ContainerServicesClient) ListOrchestratorsPreparer(ctx context.Context, location string, resourceType string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-08-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(resourceType) > 0 {
+ queryParameters["resource-type"] = autorest.Encode("query", resourceType)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/orchestrators", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListOrchestratorsSender sends the ListOrchestrators request. The method will close the
+// http.Response Body if it receives an error.
+func (client ContainerServicesClient) ListOrchestratorsSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListOrchestratorsResponder handles the response to the ListOrchestrators request. The method always
+// closes the http.Response Body.
+func (client ContainerServicesClient) ListOrchestratorsResponder(resp *http.Response) (result OrchestratorVersionProfileListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/containerservice/mgmt/2020-04-01/containerservice/managedclusters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/managedclusters.go
new file mode 100644
index 000000000..2e2955fa9
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/managedclusters.go
@@ -0,0 +1,1367 @@
+package containerservice
+
+// 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"
+)
+
+// ManagedClustersClient is the the Container Service Client.
+type ManagedClustersClient struct {
+ BaseClient
+}
+
+// NewManagedClustersClient creates an instance of the ManagedClustersClient client.
+func NewManagedClustersClient(subscriptionID string) ManagedClustersClient {
+ return NewManagedClustersClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewManagedClustersClientWithBaseURI creates an instance of the ManagedClustersClient client using a custom endpoint.
+// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
+func NewManagedClustersClientWithBaseURI(baseURI string, subscriptionID string) ManagedClustersClient {
+ return ManagedClustersClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates a managed cluster with the specified configuration for agents and Kubernetes
+// version.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+// parameters - parameters supplied to the Create or Update a Managed Cluster operation.
+func (client ManagedClustersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedCluster) (result ManagedClustersCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}},
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.ManagedClusterProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile.AdminUsername", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile.AdminUsername", Name: validation.Pattern, Rule: `^[A-Za-z][-A-Za-z0-9_]*$`, Chain: nil}}},
+ {Target: "parameters.ManagedClusterProperties.LinuxProfile.SSH", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile.SSH.PublicKeys", Name: validation.Null, Rule: true, Chain: nil}}},
+ }},
+ {Target: "parameters.ManagedClusterProperties.WindowsProfile", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.WindowsProfile.AdminUsername", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.WindowsProfile.AdminUsername", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$`, Chain: nil}}},
+ }},
+ {Target: "parameters.ManagedClusterProperties.ServicePrincipalProfile", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.ServicePrincipalProfile.ClientID", Name: validation.Null, Rule: true, Chain: nil}}},
+ {Target: "parameters.ManagedClusterProperties.NetworkProfile", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.PodCidr", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.PodCidr", Name: validation.Pattern, Rule: `^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$`, Chain: nil}}},
+ {Target: "parameters.ManagedClusterProperties.NetworkProfile.ServiceCidr", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.ServiceCidr", Name: validation.Pattern, Rule: `^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$`, Chain: nil}}},
+ {Target: "parameters.ManagedClusterProperties.NetworkProfile.DNSServiceIP", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.DNSServiceIP", Name: validation.Pattern, Rule: `^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$`, Chain: nil}}},
+ {Target: "parameters.ManagedClusterProperties.NetworkProfile.DockerBridgeCidr", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.DockerBridgeCidr", Name: validation.Pattern, Rule: `^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$`, Chain: nil}}},
+ {Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.ManagedOutboundIPs", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.ManagedOutboundIPs.Count", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.ManagedOutboundIPs.Count", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil},
+ {Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.ManagedOutboundIPs.Count", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil},
+ }},
+ }},
+ {Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.AllocatedOutboundPorts", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.AllocatedOutboundPorts", Name: validation.InclusiveMaximum, Rule: int64(64000), Chain: nil},
+ {Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.AllocatedOutboundPorts", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
+ }},
+ {Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.IdleTimeoutInMinutes", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.IdleTimeoutInMinutes", Name: validation.InclusiveMaximum, Rule: int64(120), Chain: nil},
+ {Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.IdleTimeoutInMinutes", Name: validation.InclusiveMinimum, Rule: int64(4), Chain: nil},
+ }},
+ }},
+ }},
+ }}}}}); err != nil {
+ return result, validation.NewError("containerservice.ManagedClustersClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, resourceName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client ManagedClustersClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedCluster) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2020-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.ContainerService/managedClusters/{resourceName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client ManagedClustersClient) CreateOrUpdateSender(req *http.Request) (future ManagedClustersCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ 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 ManagedClustersClient) CreateOrUpdateResponder(resp *http.Response) (result ManagedCluster, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete deletes the managed cluster with a specified resource group and name.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+func (client ManagedClustersClient) Delete(ctx context.Context, resourceGroupName string, resourceName string) (result ManagedClustersDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.ManagedClustersClient", "Delete", err.Error())
+ }
+
+ req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client ManagedClustersClient) DeletePreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2020-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.ContainerService/managedClusters/{resourceName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client ManagedClustersClient) DeleteSender(req *http.Request) (future ManagedClustersDeleteFuture, err error) {
+ var resp *http.Response
+ 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 ManagedClustersClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get gets the details of the managed cluster with a specified resource group and name.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+func (client ManagedClustersClient) Get(ctx context.Context, resourceGroupName string, resourceName string) (result ManagedCluster, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.ManagedClustersClient", "Get", err.Error())
+ }
+
+ req, err := client.GetPreparer(ctx, resourceGroupName, resourceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client ManagedClustersClient) GetPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2020-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.ContainerService/managedClusters/{resourceName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client ManagedClustersClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client ManagedClustersClient) GetResponder(resp *http.Response) (result ManagedCluster, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetAccessProfile gets the accessProfile for the specified role name of the managed cluster with a specified resource
+// group and name. **WARNING**: This API will be deprecated. Instead use
+// [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials)
+// or
+// [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials)
+// .
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+// roleName - the name of the role for managed cluster accessProfile resource.
+func (client ManagedClustersClient) GetAccessProfile(ctx context.Context, resourceGroupName string, resourceName string, roleName string) (result ManagedClusterAccessProfile, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.GetAccessProfile")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.ManagedClustersClient", "GetAccessProfile", err.Error())
+ }
+
+ req, err := client.GetAccessProfilePreparer(ctx, resourceGroupName, resourceName, roleName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetAccessProfile", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetAccessProfileSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetAccessProfile", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetAccessProfileResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetAccessProfile", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetAccessProfilePreparer prepares the GetAccessProfile request.
+func (client ManagedClustersClient) GetAccessProfilePreparer(ctx context.Context, resourceGroupName string, resourceName string, roleName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "roleName": autorest.Encode("path", roleName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2020-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetAccessProfileSender sends the GetAccessProfile request. The method will close the
+// http.Response Body if it receives an error.
+func (client ManagedClustersClient) GetAccessProfileSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetAccessProfileResponder handles the response to the GetAccessProfile request. The method always
+// closes the http.Response Body.
+func (client ManagedClustersClient) GetAccessProfileResponder(resp *http.Response) (result ManagedClusterAccessProfile, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetUpgradeProfile gets the details of the upgrade profile for a managed cluster with a specified resource group and
+// name.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+func (client ManagedClustersClient) GetUpgradeProfile(ctx context.Context, resourceGroupName string, resourceName string) (result ManagedClusterUpgradeProfile, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.GetUpgradeProfile")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.ManagedClustersClient", "GetUpgradeProfile", err.Error())
+ }
+
+ req, err := client.GetUpgradeProfilePreparer(ctx, resourceGroupName, resourceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetUpgradeProfile", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetUpgradeProfileSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetUpgradeProfile", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetUpgradeProfileResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetUpgradeProfile", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetUpgradeProfilePreparer prepares the GetUpgradeProfile request.
+func (client ManagedClustersClient) GetUpgradeProfilePreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2020-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.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetUpgradeProfileSender sends the GetUpgradeProfile request. The method will close the
+// http.Response Body if it receives an error.
+func (client ManagedClustersClient) GetUpgradeProfileSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetUpgradeProfileResponder handles the response to the GetUpgradeProfile request. The method always
+// closes the http.Response Body.
+func (client ManagedClustersClient) GetUpgradeProfileResponder(resp *http.Response) (result ManagedClusterUpgradeProfile, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List gets a list of managed clusters in the specified subscription. The operation returns properties of each managed
+// cluster.
+func (client ManagedClustersClient) List(ctx context.Context) (result ManagedClusterListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.List")
+ defer func() {
+ sc := -1
+ if result.mclr.Response.Response != nil {
+ sc = result.mclr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.mclr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.mclr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client ManagedClustersClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2020-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client ManagedClustersClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client ManagedClustersClient) ListResponder(resp *http.Response) (result ManagedClusterListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client ManagedClustersClient) listNextResults(ctx context.Context, lastResults ManagedClusterListResult) (result ManagedClusterListResult, err error) {
+ req, err := lastResults.managedClusterListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ManagedClustersClient) ListComplete(ctx context.Context) (result ManagedClusterListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx)
+ return
+}
+
+// ListByResourceGroup lists managed clusters in the specified subscription and resource group. The operation returns
+// properties of each managed cluster.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client ManagedClustersClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ManagedClusterListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.mclr.Response.Response != nil {
+ sc = result.mclr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.ManagedClustersClient", "ListByResourceGroup", err.Error())
+ }
+
+ result.fn = client.listByResourceGroupNextResults
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.mclr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.mclr, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListByResourceGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client ManagedClustersClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2020-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.ContainerService/managedClusters", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client ManagedClustersClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
+// closes the http.Response Body.
+func (client ManagedClustersClient) ListByResourceGroupResponder(resp *http.Response) (result ManagedClusterListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByResourceGroupNextResults retrieves the next set of results, if any.
+func (client ManagedClustersClient) listByResourceGroupNextResults(ctx context.Context, lastResults ManagedClusterListResult) (result ManagedClusterListResult, err error) {
+ req, err := lastResults.managedClusterListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ManagedClustersClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ManagedClusterListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByResourceGroup(ctx, resourceGroupName)
+ return
+}
+
+// ListClusterAdminCredentials gets cluster admin credential of the managed cluster with a specified resource group and
+// name.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+func (client ManagedClustersClient) ListClusterAdminCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result CredentialResults, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ListClusterAdminCredentials")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.ManagedClustersClient", "ListClusterAdminCredentials", err.Error())
+ }
+
+ req, err := client.ListClusterAdminCredentialsPreparer(ctx, resourceGroupName, resourceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterAdminCredentials", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListClusterAdminCredentialsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterAdminCredentials", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListClusterAdminCredentialsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterAdminCredentials", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListClusterAdminCredentialsPreparer prepares the ListClusterAdminCredentials request.
+func (client ManagedClustersClient) ListClusterAdminCredentialsPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2020-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListClusterAdminCredentialsSender sends the ListClusterAdminCredentials request. The method will close the
+// http.Response Body if it receives an error.
+func (client ManagedClustersClient) ListClusterAdminCredentialsSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListClusterAdminCredentialsResponder handles the response to the ListClusterAdminCredentials request. The method always
+// closes the http.Response Body.
+func (client ManagedClustersClient) ListClusterAdminCredentialsResponder(resp *http.Response) (result CredentialResults, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListClusterMonitoringUserCredentials gets cluster monitoring user credential of the managed cluster with a specified
+// resource group and name.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+func (client ManagedClustersClient) ListClusterMonitoringUserCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result CredentialResults, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ListClusterMonitoringUserCredentials")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.ManagedClustersClient", "ListClusterMonitoringUserCredentials", err.Error())
+ }
+
+ req, err := client.ListClusterMonitoringUserCredentialsPreparer(ctx, resourceGroupName, resourceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterMonitoringUserCredentials", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListClusterMonitoringUserCredentialsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterMonitoringUserCredentials", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListClusterMonitoringUserCredentialsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterMonitoringUserCredentials", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListClusterMonitoringUserCredentialsPreparer prepares the ListClusterMonitoringUserCredentials request.
+func (client ManagedClustersClient) ListClusterMonitoringUserCredentialsPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2020-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListClusterMonitoringUserCredentialsSender sends the ListClusterMonitoringUserCredentials request. The method will close the
+// http.Response Body if it receives an error.
+func (client ManagedClustersClient) ListClusterMonitoringUserCredentialsSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListClusterMonitoringUserCredentialsResponder handles the response to the ListClusterMonitoringUserCredentials request. The method always
+// closes the http.Response Body.
+func (client ManagedClustersClient) ListClusterMonitoringUserCredentialsResponder(resp *http.Response) (result CredentialResults, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListClusterUserCredentials gets cluster user credential of the managed cluster with a specified resource group and
+// name.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+func (client ManagedClustersClient) ListClusterUserCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result CredentialResults, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ListClusterUserCredentials")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.ManagedClustersClient", "ListClusterUserCredentials", err.Error())
+ }
+
+ req, err := client.ListClusterUserCredentialsPreparer(ctx, resourceGroupName, resourceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterUserCredentials", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListClusterUserCredentialsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterUserCredentials", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListClusterUserCredentialsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterUserCredentials", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListClusterUserCredentialsPreparer prepares the ListClusterUserCredentials request.
+func (client ManagedClustersClient) ListClusterUserCredentialsPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2020-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListClusterUserCredentialsSender sends the ListClusterUserCredentials request. The method will close the
+// http.Response Body if it receives an error.
+func (client ManagedClustersClient) ListClusterUserCredentialsSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListClusterUserCredentialsResponder handles the response to the ListClusterUserCredentials request. The method always
+// closes the http.Response Body.
+func (client ManagedClustersClient) ListClusterUserCredentialsResponder(resp *http.Response) (result CredentialResults, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ResetAADProfile update the AAD Profile for a managed cluster.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+// parameters - parameters supplied to the Reset AAD Profile operation for a Managed Cluster.
+func (client ManagedClustersClient) ResetAADProfile(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedClusterAADProfile) (result ManagedClustersResetAADProfileFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ResetAADProfile")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.ManagedClustersClient", "ResetAADProfile", err.Error())
+ }
+
+ req, err := client.ResetAADProfilePreparer(ctx, resourceGroupName, resourceName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ResetAADProfile", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.ResetAADProfileSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ResetAADProfile", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// ResetAADProfilePreparer prepares the ResetAADProfile request.
+func (client ManagedClustersClient) ResetAADProfilePreparer(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedClusterAADProfile) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2020-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ResetAADProfileSender sends the ResetAADProfile request. The method will close the
+// http.Response Body if it receives an error.
+func (client ManagedClustersClient) ResetAADProfileSender(req *http.Request) (future ManagedClustersResetAADProfileFuture, err error) {
+ var resp *http.Response
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// ResetAADProfileResponder handles the response to the ResetAADProfile request. The method always
+// closes the http.Response Body.
+func (client ManagedClustersClient) ResetAADProfileResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// ResetServicePrincipalProfile update the service principal Profile for a managed cluster.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+// parameters - parameters supplied to the Reset Service Principal Profile operation for a Managed Cluster.
+func (client ManagedClustersClient) ResetServicePrincipalProfile(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedClusterServicePrincipalProfile) (result ManagedClustersResetServicePrincipalProfileFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ResetServicePrincipalProfile")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}},
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.ClientID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.ManagedClustersClient", "ResetServicePrincipalProfile", err.Error())
+ }
+
+ req, err := client.ResetServicePrincipalProfilePreparer(ctx, resourceGroupName, resourceName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ResetServicePrincipalProfile", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.ResetServicePrincipalProfileSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ResetServicePrincipalProfile", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// ResetServicePrincipalProfilePreparer prepares the ResetServicePrincipalProfile request.
+func (client ManagedClustersClient) ResetServicePrincipalProfilePreparer(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedClusterServicePrincipalProfile) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2020-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ResetServicePrincipalProfileSender sends the ResetServicePrincipalProfile request. The method will close the
+// http.Response Body if it receives an error.
+func (client ManagedClustersClient) ResetServicePrincipalProfileSender(req *http.Request) (future ManagedClustersResetServicePrincipalProfileFuture, err error) {
+ var resp *http.Response
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// ResetServicePrincipalProfileResponder handles the response to the ResetServicePrincipalProfile request. The method always
+// closes the http.Response Body.
+func (client ManagedClustersClient) ResetServicePrincipalProfileResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// RotateClusterCertificates rotate certificates of a managed cluster.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+func (client ManagedClustersClient) RotateClusterCertificates(ctx context.Context, resourceGroupName string, resourceName string) (result ManagedClustersRotateClusterCertificatesFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.RotateClusterCertificates")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.ManagedClustersClient", "RotateClusterCertificates", err.Error())
+ }
+
+ req, err := client.RotateClusterCertificatesPreparer(ctx, resourceGroupName, resourceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "RotateClusterCertificates", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.RotateClusterCertificatesSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "RotateClusterCertificates", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// RotateClusterCertificatesPreparer prepares the RotateClusterCertificates request.
+func (client ManagedClustersClient) RotateClusterCertificatesPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2020-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// RotateClusterCertificatesSender sends the RotateClusterCertificates request. The method will close the
+// http.Response Body if it receives an error.
+func (client ManagedClustersClient) RotateClusterCertificatesSender(req *http.Request) (future ManagedClustersRotateClusterCertificatesFuture, err error) {
+ var resp *http.Response
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// RotateClusterCertificatesResponder handles the response to the RotateClusterCertificates request. The method always
+// closes the http.Response Body.
+func (client ManagedClustersClient) RotateClusterCertificatesResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// UpdateTags updates a managed cluster with the specified tags.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+// parameters - parameters supplied to the Update Managed Cluster Tags operation.
+func (client ManagedClustersClient) UpdateTags(ctx context.Context, resourceGroupName string, resourceName string, parameters TagsObject) (result ManagedClustersUpdateTagsFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.UpdateTags")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.ManagedClustersClient", "UpdateTags", err.Error())
+ }
+
+ req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, resourceName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "UpdateTags", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateTagsSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "UpdateTags", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdateTagsPreparer prepares the UpdateTags request.
+func (client ManagedClustersClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, resourceName string, parameters TagsObject) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2020-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.ContainerService/managedClusters/{resourceName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateTagsSender sends the UpdateTags request. The method will close the
+// http.Response Body if it receives an error.
+func (client ManagedClustersClient) UpdateTagsSender(req *http.Request) (future ManagedClustersUpdateTagsFuture, err error) {
+ var resp *http.Response
+ 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 ManagedClustersClient) UpdateTagsResponder(resp *http.Response) (result ManagedCluster, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/containerservice/mgmt/2020-04-01/containerservice/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/models.go
new file mode 100644
index 000000000..3d30ed739
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/models.go
@@ -0,0 +1,3669 @@
+package containerservice
+
+// 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/containerservice/mgmt/2020-04-01/containerservice"
+
+// AgentPoolMode enumerates the values for agent pool mode.
+type AgentPoolMode string
+
+const (
+ // System ...
+ System AgentPoolMode = "System"
+ // User ...
+ User AgentPoolMode = "User"
+)
+
+// PossibleAgentPoolModeValues returns an array of possible values for the AgentPoolMode const type.
+func PossibleAgentPoolModeValues() []AgentPoolMode {
+ return []AgentPoolMode{System, User}
+}
+
+// AgentPoolType enumerates the values for agent pool type.
+type AgentPoolType string
+
+const (
+ // AvailabilitySet ...
+ AvailabilitySet AgentPoolType = "AvailabilitySet"
+ // VirtualMachineScaleSets ...
+ VirtualMachineScaleSets AgentPoolType = "VirtualMachineScaleSets"
+)
+
+// PossibleAgentPoolTypeValues returns an array of possible values for the AgentPoolType const type.
+func PossibleAgentPoolTypeValues() []AgentPoolType {
+ return []AgentPoolType{AvailabilitySet, VirtualMachineScaleSets}
+}
+
+// Kind enumerates the values for kind.
+type Kind string
+
+const (
+ // KindAADIdentityProvider ...
+ KindAADIdentityProvider Kind = "AADIdentityProvider"
+ // KindOpenShiftManagedClusterBaseIdentityProvider ...
+ KindOpenShiftManagedClusterBaseIdentityProvider Kind = "OpenShiftManagedClusterBaseIdentityProvider"
+)
+
+// PossibleKindValues returns an array of possible values for the Kind const type.
+func PossibleKindValues() []Kind {
+ return []Kind{KindAADIdentityProvider, KindOpenShiftManagedClusterBaseIdentityProvider}
+}
+
+// LoadBalancerSku enumerates the values for load balancer sku.
+type LoadBalancerSku string
+
+const (
+ // Basic ...
+ Basic LoadBalancerSku = "basic"
+ // Standard ...
+ Standard LoadBalancerSku = "standard"
+)
+
+// PossibleLoadBalancerSkuValues returns an array of possible values for the LoadBalancerSku const type.
+func PossibleLoadBalancerSkuValues() []LoadBalancerSku {
+ return []LoadBalancerSku{Basic, Standard}
+}
+
+// ManagedClusterSKUName enumerates the values for managed cluster sku name.
+type ManagedClusterSKUName string
+
+const (
+ // ManagedClusterSKUNameBasic ...
+ ManagedClusterSKUNameBasic ManagedClusterSKUName = "Basic"
+)
+
+// PossibleManagedClusterSKUNameValues returns an array of possible values for the ManagedClusterSKUName const type.
+func PossibleManagedClusterSKUNameValues() []ManagedClusterSKUName {
+ return []ManagedClusterSKUName{ManagedClusterSKUNameBasic}
+}
+
+// ManagedClusterSKUTier enumerates the values for managed cluster sku tier.
+type ManagedClusterSKUTier string
+
+const (
+ // Free ...
+ Free ManagedClusterSKUTier = "Free"
+ // Paid ...
+ Paid ManagedClusterSKUTier = "Paid"
+)
+
+// PossibleManagedClusterSKUTierValues returns an array of possible values for the ManagedClusterSKUTier const type.
+func PossibleManagedClusterSKUTierValues() []ManagedClusterSKUTier {
+ return []ManagedClusterSKUTier{Free, Paid}
+}
+
+// NetworkMode enumerates the values for network mode.
+type NetworkMode string
+
+const (
+ // Bridge ...
+ Bridge NetworkMode = "bridge"
+ // Transparent ...
+ Transparent NetworkMode = "transparent"
+)
+
+// PossibleNetworkModeValues returns an array of possible values for the NetworkMode const type.
+func PossibleNetworkModeValues() []NetworkMode {
+ return []NetworkMode{Bridge, Transparent}
+}
+
+// NetworkPlugin enumerates the values for network plugin.
+type NetworkPlugin string
+
+const (
+ // Azure ...
+ Azure NetworkPlugin = "azure"
+ // Kubenet ...
+ Kubenet NetworkPlugin = "kubenet"
+)
+
+// PossibleNetworkPluginValues returns an array of possible values for the NetworkPlugin const type.
+func PossibleNetworkPluginValues() []NetworkPlugin {
+ return []NetworkPlugin{Azure, Kubenet}
+}
+
+// NetworkPolicy enumerates the values for network policy.
+type NetworkPolicy string
+
+const (
+ // NetworkPolicyAzure ...
+ NetworkPolicyAzure NetworkPolicy = "azure"
+ // NetworkPolicyCalico ...
+ NetworkPolicyCalico NetworkPolicy = "calico"
+)
+
+// PossibleNetworkPolicyValues returns an array of possible values for the NetworkPolicy const type.
+func PossibleNetworkPolicyValues() []NetworkPolicy {
+ return []NetworkPolicy{NetworkPolicyAzure, NetworkPolicyCalico}
+}
+
+// OpenShiftAgentPoolProfileRole enumerates the values for open shift agent pool profile role.
+type OpenShiftAgentPoolProfileRole string
+
+const (
+ // Compute ...
+ Compute OpenShiftAgentPoolProfileRole = "compute"
+ // Infra ...
+ Infra OpenShiftAgentPoolProfileRole = "infra"
+)
+
+// PossibleOpenShiftAgentPoolProfileRoleValues returns an array of possible values for the OpenShiftAgentPoolProfileRole const type.
+func PossibleOpenShiftAgentPoolProfileRoleValues() []OpenShiftAgentPoolProfileRole {
+ return []OpenShiftAgentPoolProfileRole{Compute, Infra}
+}
+
+// OpenShiftContainerServiceVMSize enumerates the values for open shift container service vm size.
+type OpenShiftContainerServiceVMSize string
+
+const (
+ // StandardD16sV3 ...
+ StandardD16sV3 OpenShiftContainerServiceVMSize = "Standard_D16s_v3"
+ // StandardD2sV3 ...
+ StandardD2sV3 OpenShiftContainerServiceVMSize = "Standard_D2s_v3"
+ // StandardD32sV3 ...
+ StandardD32sV3 OpenShiftContainerServiceVMSize = "Standard_D32s_v3"
+ // StandardD4sV3 ...
+ StandardD4sV3 OpenShiftContainerServiceVMSize = "Standard_D4s_v3"
+ // StandardD64sV3 ...
+ StandardD64sV3 OpenShiftContainerServiceVMSize = "Standard_D64s_v3"
+ // StandardD8sV3 ...
+ StandardD8sV3 OpenShiftContainerServiceVMSize = "Standard_D8s_v3"
+ // StandardDS12V2 ...
+ StandardDS12V2 OpenShiftContainerServiceVMSize = "Standard_DS12_v2"
+ // StandardDS13V2 ...
+ StandardDS13V2 OpenShiftContainerServiceVMSize = "Standard_DS13_v2"
+ // StandardDS14V2 ...
+ StandardDS14V2 OpenShiftContainerServiceVMSize = "Standard_DS14_v2"
+ // StandardDS15V2 ...
+ StandardDS15V2 OpenShiftContainerServiceVMSize = "Standard_DS15_v2"
+ // StandardDS4V2 ...
+ StandardDS4V2 OpenShiftContainerServiceVMSize = "Standard_DS4_v2"
+ // StandardDS5V2 ...
+ StandardDS5V2 OpenShiftContainerServiceVMSize = "Standard_DS5_v2"
+ // StandardE16sV3 ...
+ StandardE16sV3 OpenShiftContainerServiceVMSize = "Standard_E16s_v3"
+ // StandardE20sV3 ...
+ StandardE20sV3 OpenShiftContainerServiceVMSize = "Standard_E20s_v3"
+ // StandardE32sV3 ...
+ StandardE32sV3 OpenShiftContainerServiceVMSize = "Standard_E32s_v3"
+ // StandardE4sV3 ...
+ StandardE4sV3 OpenShiftContainerServiceVMSize = "Standard_E4s_v3"
+ // StandardE64sV3 ...
+ StandardE64sV3 OpenShiftContainerServiceVMSize = "Standard_E64s_v3"
+ // StandardE8sV3 ...
+ StandardE8sV3 OpenShiftContainerServiceVMSize = "Standard_E8s_v3"
+ // StandardF16s ...
+ StandardF16s OpenShiftContainerServiceVMSize = "Standard_F16s"
+ // StandardF16sV2 ...
+ StandardF16sV2 OpenShiftContainerServiceVMSize = "Standard_F16s_v2"
+ // StandardF32sV2 ...
+ StandardF32sV2 OpenShiftContainerServiceVMSize = "Standard_F32s_v2"
+ // StandardF64sV2 ...
+ StandardF64sV2 OpenShiftContainerServiceVMSize = "Standard_F64s_v2"
+ // StandardF72sV2 ...
+ StandardF72sV2 OpenShiftContainerServiceVMSize = "Standard_F72s_v2"
+ // StandardF8s ...
+ StandardF8s OpenShiftContainerServiceVMSize = "Standard_F8s"
+ // StandardF8sV2 ...
+ StandardF8sV2 OpenShiftContainerServiceVMSize = "Standard_F8s_v2"
+ // StandardGS2 ...
+ StandardGS2 OpenShiftContainerServiceVMSize = "Standard_GS2"
+ // StandardGS3 ...
+ StandardGS3 OpenShiftContainerServiceVMSize = "Standard_GS3"
+ // StandardGS4 ...
+ StandardGS4 OpenShiftContainerServiceVMSize = "Standard_GS4"
+ // StandardGS5 ...
+ StandardGS5 OpenShiftContainerServiceVMSize = "Standard_GS5"
+ // StandardL16s ...
+ StandardL16s OpenShiftContainerServiceVMSize = "Standard_L16s"
+ // StandardL32s ...
+ StandardL32s OpenShiftContainerServiceVMSize = "Standard_L32s"
+ // StandardL4s ...
+ StandardL4s OpenShiftContainerServiceVMSize = "Standard_L4s"
+ // StandardL8s ...
+ StandardL8s OpenShiftContainerServiceVMSize = "Standard_L8s"
+)
+
+// PossibleOpenShiftContainerServiceVMSizeValues returns an array of possible values for the OpenShiftContainerServiceVMSize const type.
+func PossibleOpenShiftContainerServiceVMSizeValues() []OpenShiftContainerServiceVMSize {
+ return []OpenShiftContainerServiceVMSize{StandardD16sV3, StandardD2sV3, StandardD32sV3, StandardD4sV3, StandardD64sV3, StandardD8sV3, StandardDS12V2, StandardDS13V2, StandardDS14V2, StandardDS15V2, StandardDS4V2, StandardDS5V2, StandardE16sV3, StandardE20sV3, StandardE32sV3, StandardE4sV3, StandardE64sV3, StandardE8sV3, StandardF16s, StandardF16sV2, StandardF32sV2, StandardF64sV2, StandardF72sV2, StandardF8s, StandardF8sV2, StandardGS2, StandardGS3, StandardGS4, StandardGS5, StandardL16s, StandardL32s, StandardL4s, StandardL8s}
+}
+
+// OrchestratorTypes enumerates the values for orchestrator types.
+type OrchestratorTypes string
+
+const (
+ // Custom ...
+ Custom OrchestratorTypes = "Custom"
+ // DCOS ...
+ DCOS OrchestratorTypes = "DCOS"
+ // DockerCE ...
+ DockerCE OrchestratorTypes = "DockerCE"
+ // Kubernetes ...
+ Kubernetes OrchestratorTypes = "Kubernetes"
+ // Swarm ...
+ Swarm OrchestratorTypes = "Swarm"
+)
+
+// PossibleOrchestratorTypesValues returns an array of possible values for the OrchestratorTypes const type.
+func PossibleOrchestratorTypesValues() []OrchestratorTypes {
+ return []OrchestratorTypes{Custom, DCOS, DockerCE, Kubernetes, Swarm}
+}
+
+// OSType enumerates the values for os type.
+type OSType string
+
+const (
+ // Linux ...
+ Linux OSType = "Linux"
+ // Windows ...
+ Windows OSType = "Windows"
+)
+
+// PossibleOSTypeValues returns an array of possible values for the OSType const type.
+func PossibleOSTypeValues() []OSType {
+ return []OSType{Linux, Windows}
+}
+
+// OutboundType enumerates the values for outbound type.
+type OutboundType string
+
+const (
+ // LoadBalancer ...
+ LoadBalancer OutboundType = "loadBalancer"
+ // UserDefinedRouting ...
+ UserDefinedRouting OutboundType = "userDefinedRouting"
+)
+
+// PossibleOutboundTypeValues returns an array of possible values for the OutboundType const type.
+func PossibleOutboundTypeValues() []OutboundType {
+ return []OutboundType{LoadBalancer, UserDefinedRouting}
+}
+
+// ResourceIdentityType enumerates the values for resource identity type.
+type ResourceIdentityType string
+
+const (
+ // None ...
+ None ResourceIdentityType = "None"
+ // SystemAssigned ...
+ SystemAssigned ResourceIdentityType = "SystemAssigned"
+)
+
+// PossibleResourceIdentityTypeValues returns an array of possible values for the ResourceIdentityType const type.
+func PossibleResourceIdentityTypeValues() []ResourceIdentityType {
+ return []ResourceIdentityType{None, SystemAssigned}
+}
+
+// ScaleSetEvictionPolicy enumerates the values for scale set eviction policy.
+type ScaleSetEvictionPolicy string
+
+const (
+ // Deallocate ...
+ Deallocate ScaleSetEvictionPolicy = "Deallocate"
+ // Delete ...
+ Delete ScaleSetEvictionPolicy = "Delete"
+)
+
+// PossibleScaleSetEvictionPolicyValues returns an array of possible values for the ScaleSetEvictionPolicy const type.
+func PossibleScaleSetEvictionPolicyValues() []ScaleSetEvictionPolicy {
+ return []ScaleSetEvictionPolicy{Deallocate, Delete}
+}
+
+// ScaleSetPriority enumerates the values for scale set priority.
+type ScaleSetPriority string
+
+const (
+ // Regular ...
+ Regular ScaleSetPriority = "Regular"
+ // Spot ...
+ Spot ScaleSetPriority = "Spot"
+)
+
+// PossibleScaleSetPriorityValues returns an array of possible values for the ScaleSetPriority const type.
+func PossibleScaleSetPriorityValues() []ScaleSetPriority {
+ return []ScaleSetPriority{Regular, Spot}
+}
+
+// StorageProfileTypes enumerates the values for storage profile types.
+type StorageProfileTypes string
+
+const (
+ // ManagedDisks ...
+ ManagedDisks StorageProfileTypes = "ManagedDisks"
+ // StorageAccount ...
+ StorageAccount StorageProfileTypes = "StorageAccount"
+)
+
+// PossibleStorageProfileTypesValues returns an array of possible values for the StorageProfileTypes const type.
+func PossibleStorageProfileTypesValues() []StorageProfileTypes {
+ return []StorageProfileTypes{ManagedDisks, StorageAccount}
+}
+
+// VMSizeTypes enumerates the values for vm size types.
+type VMSizeTypes string
+
+const (
+ // VMSizeTypesStandardA1 ...
+ VMSizeTypesStandardA1 VMSizeTypes = "Standard_A1"
+ // VMSizeTypesStandardA10 ...
+ VMSizeTypesStandardA10 VMSizeTypes = "Standard_A10"
+ // VMSizeTypesStandardA11 ...
+ VMSizeTypesStandardA11 VMSizeTypes = "Standard_A11"
+ // VMSizeTypesStandardA1V2 ...
+ VMSizeTypesStandardA1V2 VMSizeTypes = "Standard_A1_v2"
+ // VMSizeTypesStandardA2 ...
+ VMSizeTypesStandardA2 VMSizeTypes = "Standard_A2"
+ // VMSizeTypesStandardA2mV2 ...
+ VMSizeTypesStandardA2mV2 VMSizeTypes = "Standard_A2m_v2"
+ // VMSizeTypesStandardA2V2 ...
+ VMSizeTypesStandardA2V2 VMSizeTypes = "Standard_A2_v2"
+ // VMSizeTypesStandardA3 ...
+ VMSizeTypesStandardA3 VMSizeTypes = "Standard_A3"
+ // VMSizeTypesStandardA4 ...
+ VMSizeTypesStandardA4 VMSizeTypes = "Standard_A4"
+ // VMSizeTypesStandardA4mV2 ...
+ VMSizeTypesStandardA4mV2 VMSizeTypes = "Standard_A4m_v2"
+ // VMSizeTypesStandardA4V2 ...
+ VMSizeTypesStandardA4V2 VMSizeTypes = "Standard_A4_v2"
+ // VMSizeTypesStandardA5 ...
+ VMSizeTypesStandardA5 VMSizeTypes = "Standard_A5"
+ // VMSizeTypesStandardA6 ...
+ VMSizeTypesStandardA6 VMSizeTypes = "Standard_A6"
+ // VMSizeTypesStandardA7 ...
+ VMSizeTypesStandardA7 VMSizeTypes = "Standard_A7"
+ // VMSizeTypesStandardA8 ...
+ VMSizeTypesStandardA8 VMSizeTypes = "Standard_A8"
+ // VMSizeTypesStandardA8mV2 ...
+ VMSizeTypesStandardA8mV2 VMSizeTypes = "Standard_A8m_v2"
+ // VMSizeTypesStandardA8V2 ...
+ VMSizeTypesStandardA8V2 VMSizeTypes = "Standard_A8_v2"
+ // VMSizeTypesStandardA9 ...
+ VMSizeTypesStandardA9 VMSizeTypes = "Standard_A9"
+ // VMSizeTypesStandardB2ms ...
+ VMSizeTypesStandardB2ms VMSizeTypes = "Standard_B2ms"
+ // VMSizeTypesStandardB2s ...
+ VMSizeTypesStandardB2s VMSizeTypes = "Standard_B2s"
+ // VMSizeTypesStandardB4ms ...
+ VMSizeTypesStandardB4ms VMSizeTypes = "Standard_B4ms"
+ // VMSizeTypesStandardB8ms ...
+ VMSizeTypesStandardB8ms VMSizeTypes = "Standard_B8ms"
+ // VMSizeTypesStandardD1 ...
+ VMSizeTypesStandardD1 VMSizeTypes = "Standard_D1"
+ // VMSizeTypesStandardD11 ...
+ VMSizeTypesStandardD11 VMSizeTypes = "Standard_D11"
+ // VMSizeTypesStandardD11V2 ...
+ VMSizeTypesStandardD11V2 VMSizeTypes = "Standard_D11_v2"
+ // VMSizeTypesStandardD11V2Promo ...
+ VMSizeTypesStandardD11V2Promo VMSizeTypes = "Standard_D11_v2_Promo"
+ // VMSizeTypesStandardD12 ...
+ VMSizeTypesStandardD12 VMSizeTypes = "Standard_D12"
+ // VMSizeTypesStandardD12V2 ...
+ VMSizeTypesStandardD12V2 VMSizeTypes = "Standard_D12_v2"
+ // VMSizeTypesStandardD12V2Promo ...
+ VMSizeTypesStandardD12V2Promo VMSizeTypes = "Standard_D12_v2_Promo"
+ // VMSizeTypesStandardD13 ...
+ VMSizeTypesStandardD13 VMSizeTypes = "Standard_D13"
+ // VMSizeTypesStandardD13V2 ...
+ VMSizeTypesStandardD13V2 VMSizeTypes = "Standard_D13_v2"
+ // VMSizeTypesStandardD13V2Promo ...
+ VMSizeTypesStandardD13V2Promo VMSizeTypes = "Standard_D13_v2_Promo"
+ // VMSizeTypesStandardD14 ...
+ VMSizeTypesStandardD14 VMSizeTypes = "Standard_D14"
+ // VMSizeTypesStandardD14V2 ...
+ VMSizeTypesStandardD14V2 VMSizeTypes = "Standard_D14_v2"
+ // VMSizeTypesStandardD14V2Promo ...
+ VMSizeTypesStandardD14V2Promo VMSizeTypes = "Standard_D14_v2_Promo"
+ // VMSizeTypesStandardD15V2 ...
+ VMSizeTypesStandardD15V2 VMSizeTypes = "Standard_D15_v2"
+ // VMSizeTypesStandardD16sV3 ...
+ VMSizeTypesStandardD16sV3 VMSizeTypes = "Standard_D16s_v3"
+ // VMSizeTypesStandardD16V3 ...
+ VMSizeTypesStandardD16V3 VMSizeTypes = "Standard_D16_v3"
+ // VMSizeTypesStandardD1V2 ...
+ VMSizeTypesStandardD1V2 VMSizeTypes = "Standard_D1_v2"
+ // VMSizeTypesStandardD2 ...
+ VMSizeTypesStandardD2 VMSizeTypes = "Standard_D2"
+ // VMSizeTypesStandardD2sV3 ...
+ VMSizeTypesStandardD2sV3 VMSizeTypes = "Standard_D2s_v3"
+ // VMSizeTypesStandardD2V2 ...
+ VMSizeTypesStandardD2V2 VMSizeTypes = "Standard_D2_v2"
+ // VMSizeTypesStandardD2V2Promo ...
+ VMSizeTypesStandardD2V2Promo VMSizeTypes = "Standard_D2_v2_Promo"
+ // VMSizeTypesStandardD2V3 ...
+ VMSizeTypesStandardD2V3 VMSizeTypes = "Standard_D2_v3"
+ // VMSizeTypesStandardD3 ...
+ VMSizeTypesStandardD3 VMSizeTypes = "Standard_D3"
+ // VMSizeTypesStandardD32sV3 ...
+ VMSizeTypesStandardD32sV3 VMSizeTypes = "Standard_D32s_v3"
+ // VMSizeTypesStandardD32V3 ...
+ VMSizeTypesStandardD32V3 VMSizeTypes = "Standard_D32_v3"
+ // VMSizeTypesStandardD3V2 ...
+ VMSizeTypesStandardD3V2 VMSizeTypes = "Standard_D3_v2"
+ // VMSizeTypesStandardD3V2Promo ...
+ VMSizeTypesStandardD3V2Promo VMSizeTypes = "Standard_D3_v2_Promo"
+ // VMSizeTypesStandardD4 ...
+ VMSizeTypesStandardD4 VMSizeTypes = "Standard_D4"
+ // VMSizeTypesStandardD4sV3 ...
+ VMSizeTypesStandardD4sV3 VMSizeTypes = "Standard_D4s_v3"
+ // VMSizeTypesStandardD4V2 ...
+ VMSizeTypesStandardD4V2 VMSizeTypes = "Standard_D4_v2"
+ // VMSizeTypesStandardD4V2Promo ...
+ VMSizeTypesStandardD4V2Promo VMSizeTypes = "Standard_D4_v2_Promo"
+ // VMSizeTypesStandardD4V3 ...
+ VMSizeTypesStandardD4V3 VMSizeTypes = "Standard_D4_v3"
+ // VMSizeTypesStandardD5V2 ...
+ VMSizeTypesStandardD5V2 VMSizeTypes = "Standard_D5_v2"
+ // VMSizeTypesStandardD5V2Promo ...
+ VMSizeTypesStandardD5V2Promo VMSizeTypes = "Standard_D5_v2_Promo"
+ // VMSizeTypesStandardD64sV3 ...
+ VMSizeTypesStandardD64sV3 VMSizeTypes = "Standard_D64s_v3"
+ // VMSizeTypesStandardD64V3 ...
+ VMSizeTypesStandardD64V3 VMSizeTypes = "Standard_D64_v3"
+ // VMSizeTypesStandardD8sV3 ...
+ VMSizeTypesStandardD8sV3 VMSizeTypes = "Standard_D8s_v3"
+ // VMSizeTypesStandardD8V3 ...
+ VMSizeTypesStandardD8V3 VMSizeTypes = "Standard_D8_v3"
+ // VMSizeTypesStandardDS1 ...
+ VMSizeTypesStandardDS1 VMSizeTypes = "Standard_DS1"
+ // VMSizeTypesStandardDS11 ...
+ VMSizeTypesStandardDS11 VMSizeTypes = "Standard_DS11"
+ // VMSizeTypesStandardDS11V2 ...
+ VMSizeTypesStandardDS11V2 VMSizeTypes = "Standard_DS11_v2"
+ // VMSizeTypesStandardDS11V2Promo ...
+ VMSizeTypesStandardDS11V2Promo VMSizeTypes = "Standard_DS11_v2_Promo"
+ // VMSizeTypesStandardDS12 ...
+ VMSizeTypesStandardDS12 VMSizeTypes = "Standard_DS12"
+ // VMSizeTypesStandardDS12V2 ...
+ VMSizeTypesStandardDS12V2 VMSizeTypes = "Standard_DS12_v2"
+ // VMSizeTypesStandardDS12V2Promo ...
+ VMSizeTypesStandardDS12V2Promo VMSizeTypes = "Standard_DS12_v2_Promo"
+ // VMSizeTypesStandardDS13 ...
+ VMSizeTypesStandardDS13 VMSizeTypes = "Standard_DS13"
+ // VMSizeTypesStandardDS132V2 ...
+ VMSizeTypesStandardDS132V2 VMSizeTypes = "Standard_DS13-2_v2"
+ // VMSizeTypesStandardDS134V2 ...
+ VMSizeTypesStandardDS134V2 VMSizeTypes = "Standard_DS13-4_v2"
+ // VMSizeTypesStandardDS13V2 ...
+ VMSizeTypesStandardDS13V2 VMSizeTypes = "Standard_DS13_v2"
+ // VMSizeTypesStandardDS13V2Promo ...
+ VMSizeTypesStandardDS13V2Promo VMSizeTypes = "Standard_DS13_v2_Promo"
+ // VMSizeTypesStandardDS14 ...
+ VMSizeTypesStandardDS14 VMSizeTypes = "Standard_DS14"
+ // VMSizeTypesStandardDS144V2 ...
+ VMSizeTypesStandardDS144V2 VMSizeTypes = "Standard_DS14-4_v2"
+ // VMSizeTypesStandardDS148V2 ...
+ VMSizeTypesStandardDS148V2 VMSizeTypes = "Standard_DS14-8_v2"
+ // VMSizeTypesStandardDS14V2 ...
+ VMSizeTypesStandardDS14V2 VMSizeTypes = "Standard_DS14_v2"
+ // VMSizeTypesStandardDS14V2Promo ...
+ VMSizeTypesStandardDS14V2Promo VMSizeTypes = "Standard_DS14_v2_Promo"
+ // VMSizeTypesStandardDS15V2 ...
+ VMSizeTypesStandardDS15V2 VMSizeTypes = "Standard_DS15_v2"
+ // VMSizeTypesStandardDS1V2 ...
+ VMSizeTypesStandardDS1V2 VMSizeTypes = "Standard_DS1_v2"
+ // VMSizeTypesStandardDS2 ...
+ VMSizeTypesStandardDS2 VMSizeTypes = "Standard_DS2"
+ // VMSizeTypesStandardDS2V2 ...
+ VMSizeTypesStandardDS2V2 VMSizeTypes = "Standard_DS2_v2"
+ // VMSizeTypesStandardDS2V2Promo ...
+ VMSizeTypesStandardDS2V2Promo VMSizeTypes = "Standard_DS2_v2_Promo"
+ // VMSizeTypesStandardDS3 ...
+ VMSizeTypesStandardDS3 VMSizeTypes = "Standard_DS3"
+ // VMSizeTypesStandardDS3V2 ...
+ VMSizeTypesStandardDS3V2 VMSizeTypes = "Standard_DS3_v2"
+ // VMSizeTypesStandardDS3V2Promo ...
+ VMSizeTypesStandardDS3V2Promo VMSizeTypes = "Standard_DS3_v2_Promo"
+ // VMSizeTypesStandardDS4 ...
+ VMSizeTypesStandardDS4 VMSizeTypes = "Standard_DS4"
+ // VMSizeTypesStandardDS4V2 ...
+ VMSizeTypesStandardDS4V2 VMSizeTypes = "Standard_DS4_v2"
+ // VMSizeTypesStandardDS4V2Promo ...
+ VMSizeTypesStandardDS4V2Promo VMSizeTypes = "Standard_DS4_v2_Promo"
+ // VMSizeTypesStandardDS5V2 ...
+ VMSizeTypesStandardDS5V2 VMSizeTypes = "Standard_DS5_v2"
+ // VMSizeTypesStandardDS5V2Promo ...
+ VMSizeTypesStandardDS5V2Promo VMSizeTypes = "Standard_DS5_v2_Promo"
+ // VMSizeTypesStandardE16sV3 ...
+ VMSizeTypesStandardE16sV3 VMSizeTypes = "Standard_E16s_v3"
+ // VMSizeTypesStandardE16V3 ...
+ VMSizeTypesStandardE16V3 VMSizeTypes = "Standard_E16_v3"
+ // VMSizeTypesStandardE2sV3 ...
+ VMSizeTypesStandardE2sV3 VMSizeTypes = "Standard_E2s_v3"
+ // VMSizeTypesStandardE2V3 ...
+ VMSizeTypesStandardE2V3 VMSizeTypes = "Standard_E2_v3"
+ // VMSizeTypesStandardE3216sV3 ...
+ VMSizeTypesStandardE3216sV3 VMSizeTypes = "Standard_E32-16s_v3"
+ // VMSizeTypesStandardE328sV3 ...
+ VMSizeTypesStandardE328sV3 VMSizeTypes = "Standard_E32-8s_v3"
+ // VMSizeTypesStandardE32sV3 ...
+ VMSizeTypesStandardE32sV3 VMSizeTypes = "Standard_E32s_v3"
+ // VMSizeTypesStandardE32V3 ...
+ VMSizeTypesStandardE32V3 VMSizeTypes = "Standard_E32_v3"
+ // VMSizeTypesStandardE4sV3 ...
+ VMSizeTypesStandardE4sV3 VMSizeTypes = "Standard_E4s_v3"
+ // VMSizeTypesStandardE4V3 ...
+ VMSizeTypesStandardE4V3 VMSizeTypes = "Standard_E4_v3"
+ // VMSizeTypesStandardE6416sV3 ...
+ VMSizeTypesStandardE6416sV3 VMSizeTypes = "Standard_E64-16s_v3"
+ // VMSizeTypesStandardE6432sV3 ...
+ VMSizeTypesStandardE6432sV3 VMSizeTypes = "Standard_E64-32s_v3"
+ // VMSizeTypesStandardE64sV3 ...
+ VMSizeTypesStandardE64sV3 VMSizeTypes = "Standard_E64s_v3"
+ // VMSizeTypesStandardE64V3 ...
+ VMSizeTypesStandardE64V3 VMSizeTypes = "Standard_E64_v3"
+ // VMSizeTypesStandardE8sV3 ...
+ VMSizeTypesStandardE8sV3 VMSizeTypes = "Standard_E8s_v3"
+ // VMSizeTypesStandardE8V3 ...
+ VMSizeTypesStandardE8V3 VMSizeTypes = "Standard_E8_v3"
+ // VMSizeTypesStandardF1 ...
+ VMSizeTypesStandardF1 VMSizeTypes = "Standard_F1"
+ // VMSizeTypesStandardF16 ...
+ VMSizeTypesStandardF16 VMSizeTypes = "Standard_F16"
+ // VMSizeTypesStandardF16s ...
+ VMSizeTypesStandardF16s VMSizeTypes = "Standard_F16s"
+ // VMSizeTypesStandardF16sV2 ...
+ VMSizeTypesStandardF16sV2 VMSizeTypes = "Standard_F16s_v2"
+ // VMSizeTypesStandardF1s ...
+ VMSizeTypesStandardF1s VMSizeTypes = "Standard_F1s"
+ // VMSizeTypesStandardF2 ...
+ VMSizeTypesStandardF2 VMSizeTypes = "Standard_F2"
+ // VMSizeTypesStandardF2s ...
+ VMSizeTypesStandardF2s VMSizeTypes = "Standard_F2s"
+ // VMSizeTypesStandardF2sV2 ...
+ VMSizeTypesStandardF2sV2 VMSizeTypes = "Standard_F2s_v2"
+ // VMSizeTypesStandardF32sV2 ...
+ VMSizeTypesStandardF32sV2 VMSizeTypes = "Standard_F32s_v2"
+ // VMSizeTypesStandardF4 ...
+ VMSizeTypesStandardF4 VMSizeTypes = "Standard_F4"
+ // VMSizeTypesStandardF4s ...
+ VMSizeTypesStandardF4s VMSizeTypes = "Standard_F4s"
+ // VMSizeTypesStandardF4sV2 ...
+ VMSizeTypesStandardF4sV2 VMSizeTypes = "Standard_F4s_v2"
+ // VMSizeTypesStandardF64sV2 ...
+ VMSizeTypesStandardF64sV2 VMSizeTypes = "Standard_F64s_v2"
+ // VMSizeTypesStandardF72sV2 ...
+ VMSizeTypesStandardF72sV2 VMSizeTypes = "Standard_F72s_v2"
+ // VMSizeTypesStandardF8 ...
+ VMSizeTypesStandardF8 VMSizeTypes = "Standard_F8"
+ // VMSizeTypesStandardF8s ...
+ VMSizeTypesStandardF8s VMSizeTypes = "Standard_F8s"
+ // VMSizeTypesStandardF8sV2 ...
+ VMSizeTypesStandardF8sV2 VMSizeTypes = "Standard_F8s_v2"
+ // VMSizeTypesStandardG1 ...
+ VMSizeTypesStandardG1 VMSizeTypes = "Standard_G1"
+ // VMSizeTypesStandardG2 ...
+ VMSizeTypesStandardG2 VMSizeTypes = "Standard_G2"
+ // VMSizeTypesStandardG3 ...
+ VMSizeTypesStandardG3 VMSizeTypes = "Standard_G3"
+ // VMSizeTypesStandardG4 ...
+ VMSizeTypesStandardG4 VMSizeTypes = "Standard_G4"
+ // VMSizeTypesStandardG5 ...
+ VMSizeTypesStandardG5 VMSizeTypes = "Standard_G5"
+ // VMSizeTypesStandardGS1 ...
+ VMSizeTypesStandardGS1 VMSizeTypes = "Standard_GS1"
+ // VMSizeTypesStandardGS2 ...
+ VMSizeTypesStandardGS2 VMSizeTypes = "Standard_GS2"
+ // VMSizeTypesStandardGS3 ...
+ VMSizeTypesStandardGS3 VMSizeTypes = "Standard_GS3"
+ // VMSizeTypesStandardGS4 ...
+ VMSizeTypesStandardGS4 VMSizeTypes = "Standard_GS4"
+ // VMSizeTypesStandardGS44 ...
+ VMSizeTypesStandardGS44 VMSizeTypes = "Standard_GS4-4"
+ // VMSizeTypesStandardGS48 ...
+ VMSizeTypesStandardGS48 VMSizeTypes = "Standard_GS4-8"
+ // VMSizeTypesStandardGS5 ...
+ VMSizeTypesStandardGS5 VMSizeTypes = "Standard_GS5"
+ // VMSizeTypesStandardGS516 ...
+ VMSizeTypesStandardGS516 VMSizeTypes = "Standard_GS5-16"
+ // VMSizeTypesStandardGS58 ...
+ VMSizeTypesStandardGS58 VMSizeTypes = "Standard_GS5-8"
+ // VMSizeTypesStandardH16 ...
+ VMSizeTypesStandardH16 VMSizeTypes = "Standard_H16"
+ // VMSizeTypesStandardH16m ...
+ VMSizeTypesStandardH16m VMSizeTypes = "Standard_H16m"
+ // VMSizeTypesStandardH16mr ...
+ VMSizeTypesStandardH16mr VMSizeTypes = "Standard_H16mr"
+ // VMSizeTypesStandardH16r ...
+ VMSizeTypesStandardH16r VMSizeTypes = "Standard_H16r"
+ // VMSizeTypesStandardH8 ...
+ VMSizeTypesStandardH8 VMSizeTypes = "Standard_H8"
+ // VMSizeTypesStandardH8m ...
+ VMSizeTypesStandardH8m VMSizeTypes = "Standard_H8m"
+ // VMSizeTypesStandardL16s ...
+ VMSizeTypesStandardL16s VMSizeTypes = "Standard_L16s"
+ // VMSizeTypesStandardL32s ...
+ VMSizeTypesStandardL32s VMSizeTypes = "Standard_L32s"
+ // VMSizeTypesStandardL4s ...
+ VMSizeTypesStandardL4s VMSizeTypes = "Standard_L4s"
+ // VMSizeTypesStandardL8s ...
+ VMSizeTypesStandardL8s VMSizeTypes = "Standard_L8s"
+ // VMSizeTypesStandardM12832ms ...
+ VMSizeTypesStandardM12832ms VMSizeTypes = "Standard_M128-32ms"
+ // VMSizeTypesStandardM12864ms ...
+ VMSizeTypesStandardM12864ms VMSizeTypes = "Standard_M128-64ms"
+ // VMSizeTypesStandardM128ms ...
+ VMSizeTypesStandardM128ms VMSizeTypes = "Standard_M128ms"
+ // VMSizeTypesStandardM128s ...
+ VMSizeTypesStandardM128s VMSizeTypes = "Standard_M128s"
+ // VMSizeTypesStandardM6416ms ...
+ VMSizeTypesStandardM6416ms VMSizeTypes = "Standard_M64-16ms"
+ // VMSizeTypesStandardM6432ms ...
+ VMSizeTypesStandardM6432ms VMSizeTypes = "Standard_M64-32ms"
+ // VMSizeTypesStandardM64ms ...
+ VMSizeTypesStandardM64ms VMSizeTypes = "Standard_M64ms"
+ // VMSizeTypesStandardM64s ...
+ VMSizeTypesStandardM64s VMSizeTypes = "Standard_M64s"
+ // VMSizeTypesStandardNC12 ...
+ VMSizeTypesStandardNC12 VMSizeTypes = "Standard_NC12"
+ // VMSizeTypesStandardNC12sV2 ...
+ VMSizeTypesStandardNC12sV2 VMSizeTypes = "Standard_NC12s_v2"
+ // VMSizeTypesStandardNC12sV3 ...
+ VMSizeTypesStandardNC12sV3 VMSizeTypes = "Standard_NC12s_v3"
+ // VMSizeTypesStandardNC24 ...
+ VMSizeTypesStandardNC24 VMSizeTypes = "Standard_NC24"
+ // VMSizeTypesStandardNC24r ...
+ VMSizeTypesStandardNC24r VMSizeTypes = "Standard_NC24r"
+ // VMSizeTypesStandardNC24rsV2 ...
+ VMSizeTypesStandardNC24rsV2 VMSizeTypes = "Standard_NC24rs_v2"
+ // VMSizeTypesStandardNC24rsV3 ...
+ VMSizeTypesStandardNC24rsV3 VMSizeTypes = "Standard_NC24rs_v3"
+ // VMSizeTypesStandardNC24sV2 ...
+ VMSizeTypesStandardNC24sV2 VMSizeTypes = "Standard_NC24s_v2"
+ // VMSizeTypesStandardNC24sV3 ...
+ VMSizeTypesStandardNC24sV3 VMSizeTypes = "Standard_NC24s_v3"
+ // VMSizeTypesStandardNC6 ...
+ VMSizeTypesStandardNC6 VMSizeTypes = "Standard_NC6"
+ // VMSizeTypesStandardNC6sV2 ...
+ VMSizeTypesStandardNC6sV2 VMSizeTypes = "Standard_NC6s_v2"
+ // VMSizeTypesStandardNC6sV3 ...
+ VMSizeTypesStandardNC6sV3 VMSizeTypes = "Standard_NC6s_v3"
+ // VMSizeTypesStandardND12s ...
+ VMSizeTypesStandardND12s VMSizeTypes = "Standard_ND12s"
+ // VMSizeTypesStandardND24rs ...
+ VMSizeTypesStandardND24rs VMSizeTypes = "Standard_ND24rs"
+ // VMSizeTypesStandardND24s ...
+ VMSizeTypesStandardND24s VMSizeTypes = "Standard_ND24s"
+ // VMSizeTypesStandardND6s ...
+ VMSizeTypesStandardND6s VMSizeTypes = "Standard_ND6s"
+ // VMSizeTypesStandardNV12 ...
+ VMSizeTypesStandardNV12 VMSizeTypes = "Standard_NV12"
+ // VMSizeTypesStandardNV24 ...
+ VMSizeTypesStandardNV24 VMSizeTypes = "Standard_NV24"
+ // VMSizeTypesStandardNV6 ...
+ VMSizeTypesStandardNV6 VMSizeTypes = "Standard_NV6"
+)
+
+// PossibleVMSizeTypesValues returns an array of possible values for the VMSizeTypes const type.
+func PossibleVMSizeTypesValues() []VMSizeTypes {
+ return []VMSizeTypes{VMSizeTypesStandardA1, VMSizeTypesStandardA10, VMSizeTypesStandardA11, VMSizeTypesStandardA1V2, VMSizeTypesStandardA2, VMSizeTypesStandardA2mV2, VMSizeTypesStandardA2V2, VMSizeTypesStandardA3, VMSizeTypesStandardA4, VMSizeTypesStandardA4mV2, VMSizeTypesStandardA4V2, VMSizeTypesStandardA5, VMSizeTypesStandardA6, VMSizeTypesStandardA7, VMSizeTypesStandardA8, VMSizeTypesStandardA8mV2, VMSizeTypesStandardA8V2, VMSizeTypesStandardA9, VMSizeTypesStandardB2ms, VMSizeTypesStandardB2s, VMSizeTypesStandardB4ms, VMSizeTypesStandardB8ms, VMSizeTypesStandardD1, VMSizeTypesStandardD11, VMSizeTypesStandardD11V2, VMSizeTypesStandardD11V2Promo, VMSizeTypesStandardD12, VMSizeTypesStandardD12V2, VMSizeTypesStandardD12V2Promo, VMSizeTypesStandardD13, VMSizeTypesStandardD13V2, VMSizeTypesStandardD13V2Promo, VMSizeTypesStandardD14, VMSizeTypesStandardD14V2, VMSizeTypesStandardD14V2Promo, VMSizeTypesStandardD15V2, VMSizeTypesStandardD16sV3, VMSizeTypesStandardD16V3, VMSizeTypesStandardD1V2, VMSizeTypesStandardD2, VMSizeTypesStandardD2sV3, VMSizeTypesStandardD2V2, VMSizeTypesStandardD2V2Promo, VMSizeTypesStandardD2V3, VMSizeTypesStandardD3, VMSizeTypesStandardD32sV3, VMSizeTypesStandardD32V3, VMSizeTypesStandardD3V2, VMSizeTypesStandardD3V2Promo, VMSizeTypesStandardD4, VMSizeTypesStandardD4sV3, VMSizeTypesStandardD4V2, VMSizeTypesStandardD4V2Promo, VMSizeTypesStandardD4V3, VMSizeTypesStandardD5V2, VMSizeTypesStandardD5V2Promo, VMSizeTypesStandardD64sV3, VMSizeTypesStandardD64V3, VMSizeTypesStandardD8sV3, VMSizeTypesStandardD8V3, VMSizeTypesStandardDS1, VMSizeTypesStandardDS11, VMSizeTypesStandardDS11V2, VMSizeTypesStandardDS11V2Promo, VMSizeTypesStandardDS12, VMSizeTypesStandardDS12V2, VMSizeTypesStandardDS12V2Promo, VMSizeTypesStandardDS13, VMSizeTypesStandardDS132V2, VMSizeTypesStandardDS134V2, VMSizeTypesStandardDS13V2, VMSizeTypesStandardDS13V2Promo, VMSizeTypesStandardDS14, VMSizeTypesStandardDS144V2, VMSizeTypesStandardDS148V2, VMSizeTypesStandardDS14V2, VMSizeTypesStandardDS14V2Promo, VMSizeTypesStandardDS15V2, VMSizeTypesStandardDS1V2, VMSizeTypesStandardDS2, VMSizeTypesStandardDS2V2, VMSizeTypesStandardDS2V2Promo, VMSizeTypesStandardDS3, VMSizeTypesStandardDS3V2, VMSizeTypesStandardDS3V2Promo, VMSizeTypesStandardDS4, VMSizeTypesStandardDS4V2, VMSizeTypesStandardDS4V2Promo, VMSizeTypesStandardDS5V2, VMSizeTypesStandardDS5V2Promo, VMSizeTypesStandardE16sV3, VMSizeTypesStandardE16V3, VMSizeTypesStandardE2sV3, VMSizeTypesStandardE2V3, VMSizeTypesStandardE3216sV3, VMSizeTypesStandardE328sV3, VMSizeTypesStandardE32sV3, VMSizeTypesStandardE32V3, VMSizeTypesStandardE4sV3, VMSizeTypesStandardE4V3, VMSizeTypesStandardE6416sV3, VMSizeTypesStandardE6432sV3, VMSizeTypesStandardE64sV3, VMSizeTypesStandardE64V3, VMSizeTypesStandardE8sV3, VMSizeTypesStandardE8V3, VMSizeTypesStandardF1, VMSizeTypesStandardF16, VMSizeTypesStandardF16s, VMSizeTypesStandardF16sV2, VMSizeTypesStandardF1s, VMSizeTypesStandardF2, VMSizeTypesStandardF2s, VMSizeTypesStandardF2sV2, VMSizeTypesStandardF32sV2, VMSizeTypesStandardF4, VMSizeTypesStandardF4s, VMSizeTypesStandardF4sV2, VMSizeTypesStandardF64sV2, VMSizeTypesStandardF72sV2, VMSizeTypesStandardF8, VMSizeTypesStandardF8s, VMSizeTypesStandardF8sV2, VMSizeTypesStandardG1, VMSizeTypesStandardG2, VMSizeTypesStandardG3, VMSizeTypesStandardG4, VMSizeTypesStandardG5, VMSizeTypesStandardGS1, VMSizeTypesStandardGS2, VMSizeTypesStandardGS3, VMSizeTypesStandardGS4, VMSizeTypesStandardGS44, VMSizeTypesStandardGS48, VMSizeTypesStandardGS5, VMSizeTypesStandardGS516, VMSizeTypesStandardGS58, VMSizeTypesStandardH16, VMSizeTypesStandardH16m, VMSizeTypesStandardH16mr, VMSizeTypesStandardH16r, VMSizeTypesStandardH8, VMSizeTypesStandardH8m, VMSizeTypesStandardL16s, VMSizeTypesStandardL32s, VMSizeTypesStandardL4s, VMSizeTypesStandardL8s, VMSizeTypesStandardM12832ms, VMSizeTypesStandardM12864ms, VMSizeTypesStandardM128ms, VMSizeTypesStandardM128s, VMSizeTypesStandardM6416ms, VMSizeTypesStandardM6432ms, VMSizeTypesStandardM64ms, VMSizeTypesStandardM64s, VMSizeTypesStandardNC12, VMSizeTypesStandardNC12sV2, VMSizeTypesStandardNC12sV3, VMSizeTypesStandardNC24, VMSizeTypesStandardNC24r, VMSizeTypesStandardNC24rsV2, VMSizeTypesStandardNC24rsV3, VMSizeTypesStandardNC24sV2, VMSizeTypesStandardNC24sV3, VMSizeTypesStandardNC6, VMSizeTypesStandardNC6sV2, VMSizeTypesStandardNC6sV3, VMSizeTypesStandardND12s, VMSizeTypesStandardND24rs, VMSizeTypesStandardND24s, VMSizeTypesStandardND6s, VMSizeTypesStandardNV12, VMSizeTypesStandardNV24, VMSizeTypesStandardNV6}
+}
+
+// AccessProfile profile for enabling a user to access a managed cluster.
+type AccessProfile struct {
+ // KubeConfig - Base64-encoded Kubernetes configuration file.
+ KubeConfig *[]byte `json:"kubeConfig,omitempty"`
+}
+
+// AgentPool agent Pool.
+type AgentPool struct {
+ autorest.Response `json:"-"`
+ // ManagedClusterAgentPoolProfileProperties - Properties of an agent pool.
+ *ManagedClusterAgentPoolProfileProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for AgentPool.
+func (ap AgentPool) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ap.ManagedClusterAgentPoolProfileProperties != nil {
+ objectMap["properties"] = ap.ManagedClusterAgentPoolProfileProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for AgentPool struct.
+func (ap *AgentPool) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var managedClusterAgentPoolProfileProperties ManagedClusterAgentPoolProfileProperties
+ err = json.Unmarshal(*v, &managedClusterAgentPoolProfileProperties)
+ if err != nil {
+ return err
+ }
+ ap.ManagedClusterAgentPoolProfileProperties = &managedClusterAgentPoolProfileProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ ap.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ ap.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ ap.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// AgentPoolAvailableVersions the list of available versions for an agent pool.
+type AgentPoolAvailableVersions struct {
+ autorest.Response `json:"-"`
+ // ID - READ-ONLY; Id of the agent pool available versions.
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Name of the agent pool available versions.
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Type of the agent pool available versions.
+ Type *string `json:"type,omitempty"`
+ // AgentPoolAvailableVersionsProperties - Properties of agent pool available versions.
+ *AgentPoolAvailableVersionsProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for AgentPoolAvailableVersions.
+func (apav AgentPoolAvailableVersions) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if apav.AgentPoolAvailableVersionsProperties != nil {
+ objectMap["properties"] = apav.AgentPoolAvailableVersionsProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for AgentPoolAvailableVersions struct.
+func (apav *AgentPoolAvailableVersions) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ apav.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ apav.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ apav.Type = &typeVar
+ }
+ case "properties":
+ if v != nil {
+ var agentPoolAvailableVersionsProperties AgentPoolAvailableVersionsProperties
+ err = json.Unmarshal(*v, &agentPoolAvailableVersionsProperties)
+ if err != nil {
+ return err
+ }
+ apav.AgentPoolAvailableVersionsProperties = &agentPoolAvailableVersionsProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// AgentPoolAvailableVersionsProperties the list of available agent pool versions.
+type AgentPoolAvailableVersionsProperties struct {
+ // AgentPoolVersions - List of versions available for agent pool.
+ AgentPoolVersions *[]AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem `json:"agentPoolVersions,omitempty"`
+}
+
+// AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem ...
+type AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem struct {
+ // Default - Whether this version is the default agent pool version.
+ Default *bool `json:"default,omitempty"`
+ // KubernetesVersion - Kubernetes version (major, minor, patch).
+ KubernetesVersion *string `json:"kubernetesVersion,omitempty"`
+ // IsPreview - Whether Kubernetes version is currently in preview.
+ IsPreview *bool `json:"isPreview,omitempty"`
+}
+
+// AgentPoolListResult the response from the List Agent Pools operation.
+type AgentPoolListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of agent pools.
+ Value *[]AgentPool `json:"value,omitempty"`
+ // NextLink - READ-ONLY; The URL to get the next set of agent pool results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// AgentPoolListResultIterator provides access to a complete listing of AgentPool values.
+type AgentPoolListResultIterator struct {
+ i int
+ page AgentPoolListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *AgentPoolListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *AgentPoolListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter AgentPoolListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter AgentPoolListResultIterator) Response() AgentPoolListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter AgentPoolListResultIterator) Value() AgentPool {
+ if !iter.page.NotDone() {
+ return AgentPool{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the AgentPoolListResultIterator type.
+func NewAgentPoolListResultIterator(page AgentPoolListResultPage) AgentPoolListResultIterator {
+ return AgentPoolListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (aplr AgentPoolListResult) IsEmpty() bool {
+ return aplr.Value == nil || len(*aplr.Value) == 0
+}
+
+// agentPoolListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (aplr AgentPoolListResult) agentPoolListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if aplr.NextLink == nil || len(to.String(aplr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(aplr.NextLink)))
+}
+
+// AgentPoolListResultPage contains a page of AgentPool values.
+type AgentPoolListResultPage struct {
+ fn func(context.Context, AgentPoolListResult) (AgentPoolListResult, error)
+ aplr AgentPoolListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *AgentPoolListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.aplr)
+ if err != nil {
+ return err
+ }
+ page.aplr = next
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *AgentPoolListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page AgentPoolListResultPage) NotDone() bool {
+ return !page.aplr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page AgentPoolListResultPage) Response() AgentPoolListResult {
+ return page.aplr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page AgentPoolListResultPage) Values() []AgentPool {
+ if page.aplr.IsEmpty() {
+ return nil
+ }
+ return *page.aplr.Value
+}
+
+// Creates a new instance of the AgentPoolListResultPage type.
+func NewAgentPoolListResultPage(getNextPage func(context.Context, AgentPoolListResult) (AgentPoolListResult, error)) AgentPoolListResultPage {
+ return AgentPoolListResultPage{fn: getNextPage}
+}
+
+// AgentPoolProfile profile for the container service agent pool.
+type AgentPoolProfile struct {
+ // Name - Unique name of the agent pool profile in the context of the subscription and resource group.
+ Name *string `json:"name,omitempty"`
+ // Count - Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1.
+ Count *int32 `json:"count,omitempty"`
+ // VMSize - Size of agent VMs. Possible values include: 'VMSizeTypesStandardA1', 'VMSizeTypesStandardA10', 'VMSizeTypesStandardA11', 'VMSizeTypesStandardA1V2', 'VMSizeTypesStandardA2', 'VMSizeTypesStandardA2V2', 'VMSizeTypesStandardA2mV2', 'VMSizeTypesStandardA3', 'VMSizeTypesStandardA4', 'VMSizeTypesStandardA4V2', 'VMSizeTypesStandardA4mV2', 'VMSizeTypesStandardA5', 'VMSizeTypesStandardA6', 'VMSizeTypesStandardA7', 'VMSizeTypesStandardA8', 'VMSizeTypesStandardA8V2', 'VMSizeTypesStandardA8mV2', 'VMSizeTypesStandardA9', 'VMSizeTypesStandardB2ms', 'VMSizeTypesStandardB2s', 'VMSizeTypesStandardB4ms', 'VMSizeTypesStandardB8ms', 'VMSizeTypesStandardD1', 'VMSizeTypesStandardD11', 'VMSizeTypesStandardD11V2', 'VMSizeTypesStandardD11V2Promo', 'VMSizeTypesStandardD12', 'VMSizeTypesStandardD12V2', 'VMSizeTypesStandardD12V2Promo', 'VMSizeTypesStandardD13', 'VMSizeTypesStandardD13V2', 'VMSizeTypesStandardD13V2Promo', 'VMSizeTypesStandardD14', 'VMSizeTypesStandardD14V2', 'VMSizeTypesStandardD14V2Promo', 'VMSizeTypesStandardD15V2', 'VMSizeTypesStandardD16V3', 'VMSizeTypesStandardD16sV3', 'VMSizeTypesStandardD1V2', 'VMSizeTypesStandardD2', 'VMSizeTypesStandardD2V2', 'VMSizeTypesStandardD2V2Promo', 'VMSizeTypesStandardD2V3', 'VMSizeTypesStandardD2sV3', 'VMSizeTypesStandardD3', 'VMSizeTypesStandardD32V3', 'VMSizeTypesStandardD32sV3', 'VMSizeTypesStandardD3V2', 'VMSizeTypesStandardD3V2Promo', 'VMSizeTypesStandardD4', 'VMSizeTypesStandardD4V2', 'VMSizeTypesStandardD4V2Promo', 'VMSizeTypesStandardD4V3', 'VMSizeTypesStandardD4sV3', 'VMSizeTypesStandardD5V2', 'VMSizeTypesStandardD5V2Promo', 'VMSizeTypesStandardD64V3', 'VMSizeTypesStandardD64sV3', 'VMSizeTypesStandardD8V3', 'VMSizeTypesStandardD8sV3', 'VMSizeTypesStandardDS1', 'VMSizeTypesStandardDS11', 'VMSizeTypesStandardDS11V2', 'VMSizeTypesStandardDS11V2Promo', 'VMSizeTypesStandardDS12', 'VMSizeTypesStandardDS12V2', 'VMSizeTypesStandardDS12V2Promo', 'VMSizeTypesStandardDS13', 'VMSizeTypesStandardDS132V2', 'VMSizeTypesStandardDS134V2', 'VMSizeTypesStandardDS13V2', 'VMSizeTypesStandardDS13V2Promo', 'VMSizeTypesStandardDS14', 'VMSizeTypesStandardDS144V2', 'VMSizeTypesStandardDS148V2', 'VMSizeTypesStandardDS14V2', 'VMSizeTypesStandardDS14V2Promo', 'VMSizeTypesStandardDS15V2', 'VMSizeTypesStandardDS1V2', 'VMSizeTypesStandardDS2', 'VMSizeTypesStandardDS2V2', 'VMSizeTypesStandardDS2V2Promo', 'VMSizeTypesStandardDS3', 'VMSizeTypesStandardDS3V2', 'VMSizeTypesStandardDS3V2Promo', 'VMSizeTypesStandardDS4', 'VMSizeTypesStandardDS4V2', 'VMSizeTypesStandardDS4V2Promo', 'VMSizeTypesStandardDS5V2', 'VMSizeTypesStandardDS5V2Promo', 'VMSizeTypesStandardE16V3', 'VMSizeTypesStandardE16sV3', 'VMSizeTypesStandardE2V3', 'VMSizeTypesStandardE2sV3', 'VMSizeTypesStandardE3216sV3', 'VMSizeTypesStandardE328sV3', 'VMSizeTypesStandardE32V3', 'VMSizeTypesStandardE32sV3', 'VMSizeTypesStandardE4V3', 'VMSizeTypesStandardE4sV3', 'VMSizeTypesStandardE6416sV3', 'VMSizeTypesStandardE6432sV3', 'VMSizeTypesStandardE64V3', 'VMSizeTypesStandardE64sV3', 'VMSizeTypesStandardE8V3', 'VMSizeTypesStandardE8sV3', 'VMSizeTypesStandardF1', 'VMSizeTypesStandardF16', 'VMSizeTypesStandardF16s', 'VMSizeTypesStandardF16sV2', 'VMSizeTypesStandardF1s', 'VMSizeTypesStandardF2', 'VMSizeTypesStandardF2s', 'VMSizeTypesStandardF2sV2', 'VMSizeTypesStandardF32sV2', 'VMSizeTypesStandardF4', 'VMSizeTypesStandardF4s', 'VMSizeTypesStandardF4sV2', 'VMSizeTypesStandardF64sV2', 'VMSizeTypesStandardF72sV2', 'VMSizeTypesStandardF8', 'VMSizeTypesStandardF8s', 'VMSizeTypesStandardF8sV2', 'VMSizeTypesStandardG1', 'VMSizeTypesStandardG2', 'VMSizeTypesStandardG3', 'VMSizeTypesStandardG4', 'VMSizeTypesStandardG5', 'VMSizeTypesStandardGS1', 'VMSizeTypesStandardGS2', 'VMSizeTypesStandardGS3', 'VMSizeTypesStandardGS4', 'VMSizeTypesStandardGS44', 'VMSizeTypesStandardGS48', 'VMSizeTypesStandardGS5', 'VMSizeTypesStandardGS516', 'VMSizeTypesStandardGS58', 'VMSizeTypesStandardH16', 'VMSizeTypesStandardH16m', 'VMSizeTypesStandardH16mr', 'VMSizeTypesStandardH16r', 'VMSizeTypesStandardH8', 'VMSizeTypesStandardH8m', 'VMSizeTypesStandardL16s', 'VMSizeTypesStandardL32s', 'VMSizeTypesStandardL4s', 'VMSizeTypesStandardL8s', 'VMSizeTypesStandardM12832ms', 'VMSizeTypesStandardM12864ms', 'VMSizeTypesStandardM128ms', 'VMSizeTypesStandardM128s', 'VMSizeTypesStandardM6416ms', 'VMSizeTypesStandardM6432ms', 'VMSizeTypesStandardM64ms', 'VMSizeTypesStandardM64s', 'VMSizeTypesStandardNC12', 'VMSizeTypesStandardNC12sV2', 'VMSizeTypesStandardNC12sV3', 'VMSizeTypesStandardNC24', 'VMSizeTypesStandardNC24r', 'VMSizeTypesStandardNC24rsV2', 'VMSizeTypesStandardNC24rsV3', 'VMSizeTypesStandardNC24sV2', 'VMSizeTypesStandardNC24sV3', 'VMSizeTypesStandardNC6', 'VMSizeTypesStandardNC6sV2', 'VMSizeTypesStandardNC6sV3', 'VMSizeTypesStandardND12s', 'VMSizeTypesStandardND24rs', 'VMSizeTypesStandardND24s', 'VMSizeTypesStandardND6s', 'VMSizeTypesStandardNV12', 'VMSizeTypesStandardNV24', 'VMSizeTypesStandardNV6'
+ VMSize VMSizeTypes `json:"vmSize,omitempty"`
+ // OsDiskSizeGB - OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified.
+ OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"`
+ // DNSPrefix - DNS prefix to be used to create the FQDN for the agent pool.
+ DNSPrefix *string `json:"dnsPrefix,omitempty"`
+ // Fqdn - READ-ONLY; FQDN for the agent pool.
+ Fqdn *string `json:"fqdn,omitempty"`
+ // Ports - Ports number array used to expose on this agent pool. The default opened ports are different based on your choice of orchestrator.
+ Ports *[]int32 `json:"ports,omitempty"`
+ // StorageProfile - Storage profile specifies what kind of storage used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the orchestrator choice. Possible values include: 'StorageAccount', 'ManagedDisks'
+ StorageProfile StorageProfileTypes `json:"storageProfile,omitempty"`
+ // VnetSubnetID - VNet SubnetID specifies the VNet's subnet identifier.
+ VnetSubnetID *string `json:"vnetSubnetID,omitempty"`
+ // OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows'
+ OsType OSType `json:"osType,omitempty"`
+}
+
+// AgentPoolsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type AgentPoolsCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *AgentPoolsCreateOrUpdateFuture) Result(client AgentPoolsClient) (ap AgentPool, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("containerservice.AgentPoolsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ap.Response.Response, err = future.GetResult(sender); err == nil && ap.Response.Response.StatusCode != http.StatusNoContent {
+ ap, err = client.CreateOrUpdateResponder(ap.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsCreateOrUpdateFuture", "Result", ap.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// AgentPoolsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type AgentPoolsDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *AgentPoolsDeleteFuture) Result(client AgentPoolsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("containerservice.AgentPoolsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// AgentPoolUpgradeProfile the list of available upgrades for an agent pool.
+type AgentPoolUpgradeProfile struct {
+ autorest.Response `json:"-"`
+ // ID - READ-ONLY; Id of the agent pool upgrade profile.
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Name of the agent pool upgrade profile.
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Type of the agent pool upgrade profile.
+ Type *string `json:"type,omitempty"`
+ // AgentPoolUpgradeProfileProperties - Properties of agent pool upgrade profile.
+ *AgentPoolUpgradeProfileProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for AgentPoolUpgradeProfile.
+func (apup AgentPoolUpgradeProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if apup.AgentPoolUpgradeProfileProperties != nil {
+ objectMap["properties"] = apup.AgentPoolUpgradeProfileProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for AgentPoolUpgradeProfile struct.
+func (apup *AgentPoolUpgradeProfile) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ apup.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ apup.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ apup.Type = &typeVar
+ }
+ case "properties":
+ if v != nil {
+ var agentPoolUpgradeProfileProperties AgentPoolUpgradeProfileProperties
+ err = json.Unmarshal(*v, &agentPoolUpgradeProfileProperties)
+ if err != nil {
+ return err
+ }
+ apup.AgentPoolUpgradeProfileProperties = &agentPoolUpgradeProfileProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// AgentPoolUpgradeProfileProperties the list of available upgrade versions.
+type AgentPoolUpgradeProfileProperties struct {
+ // KubernetesVersion - Kubernetes version (major, minor, patch).
+ KubernetesVersion *string `json:"kubernetesVersion,omitempty"`
+ // OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows'
+ OsType OSType `json:"osType,omitempty"`
+ // Upgrades - List of orchestrator types and versions available for upgrade.
+ Upgrades *[]AgentPoolUpgradeProfilePropertiesUpgradesItem `json:"upgrades,omitempty"`
+ // LatestNodeImageVersion - LatestNodeImageVersion is the latest AKS supported node image version.
+ LatestNodeImageVersion *string `json:"latestNodeImageVersion,omitempty"`
+}
+
+// AgentPoolUpgradeProfilePropertiesUpgradesItem ...
+type AgentPoolUpgradeProfilePropertiesUpgradesItem struct {
+ // KubernetesVersion - Kubernetes version (major, minor, patch).
+ KubernetesVersion *string `json:"kubernetesVersion,omitempty"`
+ // IsPreview - Whether Kubernetes version is currently in preview.
+ IsPreview *bool `json:"isPreview,omitempty"`
+}
+
+// AgentPoolUpgradeSettings settings for upgrading an agentpool
+type AgentPoolUpgradeSettings struct {
+ // MaxSurge - Count or percentage of additional nodes to be added during upgrade. If empty uses AKS default
+ MaxSurge *string `json:"maxSurge,omitempty"`
+}
+
+// CloudError an error response from the Container service.
+type CloudError struct {
+ // Error - Details about the error.
+ Error *CloudErrorBody `json:"error,omitempty"`
+}
+
+// CloudErrorBody an error response from the Container service.
+type CloudErrorBody struct {
+ // Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
+ Code *string `json:"code,omitempty"`
+ // Message - A message describing the error, intended to be suitable for display in a user interface.
+ Message *string `json:"message,omitempty"`
+ // Target - The target of the particular error. For example, the name of the property in error.
+ Target *string `json:"target,omitempty"`
+ // Details - A list of additional details about the error.
+ Details *[]CloudErrorBody `json:"details,omitempty"`
+}
+
+// ContainerService container service.
+type ContainerService struct {
+ autorest.Response `json:"-"`
+ // Properties - Properties of the container service.
+ *Properties `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 ContainerService.
+func (cs ContainerService) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if cs.Properties != nil {
+ objectMap["properties"] = cs.Properties
+ }
+ if cs.Location != nil {
+ objectMap["location"] = cs.Location
+ }
+ if cs.Tags != nil {
+ objectMap["tags"] = cs.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ContainerService struct.
+func (cs *ContainerService) UnmarshalJSON(body []byte) error {
+ 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 properties Properties
+ err = json.Unmarshal(*v, &properties)
+ if err != nil {
+ return err
+ }
+ cs.Properties = &properties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ cs.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ cs.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ cs.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ cs.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ cs.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// ContainerServicesCreateOrUpdateFutureType an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ContainerServicesCreateOrUpdateFutureType struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ContainerServicesCreateOrUpdateFutureType) Result(client ContainerServicesClient) (cs ContainerService, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesCreateOrUpdateFutureType")
+ 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, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", cs.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ContainerServicesDeleteFutureType an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ContainerServicesDeleteFutureType struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ContainerServicesDeleteFutureType) 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, "containerservice.ContainerServicesDeleteFutureType", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesDeleteFutureType")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// CredentialResult the credential result response.
+type CredentialResult struct {
+ // Name - READ-ONLY; The name of the credential.
+ Name *string `json:"name,omitempty"`
+ // Value - READ-ONLY; Base64-encoded Kubernetes configuration file.
+ Value *[]byte `json:"value,omitempty"`
+}
+
+// CredentialResults the list of credential result response.
+type CredentialResults struct {
+ autorest.Response `json:"-"`
+ // Kubeconfigs - READ-ONLY; Base64-encoded Kubernetes configuration file.
+ Kubeconfigs *[]CredentialResult `json:"kubeconfigs,omitempty"`
+}
+
+// CustomProfile properties to configure a custom container service cluster.
+type CustomProfile struct {
+ // Orchestrator - The name of the custom orchestrator to use.
+ Orchestrator *string `json:"orchestrator,omitempty"`
+}
+
+// DiagnosticsProfile profile for diagnostics on the container service cluster.
+type DiagnosticsProfile struct {
+ // VMDiagnostics - Profile for diagnostics on the container service VMs.
+ VMDiagnostics *VMDiagnostics `json:"vmDiagnostics,omitempty"`
+}
+
+// KeyVaultSecretRef reference to a secret stored in Azure Key Vault.
+type KeyVaultSecretRef struct {
+ // VaultID - Key vault identifier.
+ VaultID *string `json:"vaultID,omitempty"`
+ // SecretName - The secret name.
+ SecretName *string `json:"secretName,omitempty"`
+ // Version - The secret version.
+ Version *string `json:"version,omitempty"`
+}
+
+// LinuxProfile profile for Linux VMs in the container service cluster.
+type LinuxProfile struct {
+ // AdminUsername - The administrator username to use for Linux VMs.
+ AdminUsername *string `json:"adminUsername,omitempty"`
+ // SSH - SSH configuration for Linux-based VMs running on Azure.
+ SSH *SSHConfiguration `json:"ssh,omitempty"`
+}
+
+// ListResult the response from the List Container Services operation.
+type ListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of container services.
+ Value *[]ContainerService `json:"value,omitempty"`
+ // NextLink - READ-ONLY; The URL to get the next set of container service results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ListResultIterator provides access to a complete listing of ContainerService values.
+type ListResultIterator struct {
+ i int
+ page ListResultPage
+}
+
+// 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 *ListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListResultIterator.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 *ListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ListResultIterator) 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 ListResultIterator) Response() ListResult {
+ 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 ListResultIterator) Value() ContainerService {
+ if !iter.page.NotDone() {
+ return ContainerService{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the ListResultIterator type.
+func NewListResultIterator(page ListResultPage) ListResultIterator {
+ return ListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (lr ListResult) IsEmpty() bool {
+ return lr.Value == nil || len(*lr.Value) == 0
+}
+
+// listResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (lr ListResult) listResultPreparer(ctx context.Context) (*http.Request, error) {
+ if lr.NextLink == nil || len(to.String(lr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(lr.NextLink)))
+}
+
+// ListResultPage contains a page of ContainerService values.
+type ListResultPage struct {
+ fn func(context.Context, ListResult) (ListResult, error)
+ lr ListResult
+}
+
+// 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 *ListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.lr)
+ if err != nil {
+ return err
+ }
+ page.lr = next
+ 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 *ListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ListResultPage) NotDone() bool {
+ return !page.lr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ListResultPage) Response() ListResult {
+ return page.lr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ListResultPage) Values() []ContainerService {
+ if page.lr.IsEmpty() {
+ return nil
+ }
+ return *page.lr.Value
+}
+
+// Creates a new instance of the ListResultPage type.
+func NewListResultPage(getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage {
+ return ListResultPage{fn: getNextPage}
+}
+
+// ManagedCluster managed cluster.
+type ManagedCluster struct {
+ autorest.Response `json:"-"`
+ // ManagedClusterProperties - Properties of a managed cluster.
+ *ManagedClusterProperties `json:"properties,omitempty"`
+ // Identity - The identity of the managed cluster, if configured.
+ Identity *ManagedClusterIdentity `json:"identity,omitempty"`
+ // Sku - The managed cluster SKU.
+ Sku *ManagedClusterSKU `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 ManagedCluster.
+func (mc ManagedCluster) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if mc.ManagedClusterProperties != nil {
+ objectMap["properties"] = mc.ManagedClusterProperties
+ }
+ if mc.Identity != nil {
+ objectMap["identity"] = mc.Identity
+ }
+ if mc.Sku != nil {
+ objectMap["sku"] = mc.Sku
+ }
+ if mc.Location != nil {
+ objectMap["location"] = mc.Location
+ }
+ if mc.Tags != nil {
+ objectMap["tags"] = mc.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ManagedCluster struct.
+func (mc *ManagedCluster) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var managedClusterProperties ManagedClusterProperties
+ err = json.Unmarshal(*v, &managedClusterProperties)
+ if err != nil {
+ return err
+ }
+ mc.ManagedClusterProperties = &managedClusterProperties
+ }
+ case "identity":
+ if v != nil {
+ var identity ManagedClusterIdentity
+ err = json.Unmarshal(*v, &identity)
+ if err != nil {
+ return err
+ }
+ mc.Identity = &identity
+ }
+ case "sku":
+ if v != nil {
+ var sku ManagedClusterSKU
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ mc.Sku = &sku
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ mc.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ mc.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ mc.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ mc.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ mc.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// ManagedClusterAADProfile aADProfile specifies attributes for Azure Active Directory integration.
+type ManagedClusterAADProfile struct {
+ // Managed - Whether to enable managed AAD.
+ Managed *bool `json:"managed,omitempty"`
+ // AdminGroupObjectIDs - AAD group object IDs that will have admin role of the cluster.
+ AdminGroupObjectIDs *[]string `json:"adminGroupObjectIDs,omitempty"`
+ // ClientAppID - The client AAD application ID.
+ ClientAppID *string `json:"clientAppID,omitempty"`
+ // ServerAppID - The server AAD application ID.
+ ServerAppID *string `json:"serverAppID,omitempty"`
+ // ServerAppSecret - The server AAD application secret.
+ ServerAppSecret *string `json:"serverAppSecret,omitempty"`
+ // TenantID - The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription.
+ TenantID *string `json:"tenantID,omitempty"`
+}
+
+// ManagedClusterAccessProfile managed cluster Access Profile.
+type ManagedClusterAccessProfile struct {
+ autorest.Response `json:"-"`
+ // AccessProfile - AccessProfile of a managed cluster.
+ *AccessProfile `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for ManagedClusterAccessProfile.
+func (mcap ManagedClusterAccessProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if mcap.AccessProfile != nil {
+ objectMap["properties"] = mcap.AccessProfile
+ }
+ if mcap.Location != nil {
+ objectMap["location"] = mcap.Location
+ }
+ if mcap.Tags != nil {
+ objectMap["tags"] = mcap.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ManagedClusterAccessProfile struct.
+func (mcap *ManagedClusterAccessProfile) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var accessProfile AccessProfile
+ err = json.Unmarshal(*v, &accessProfile)
+ if err != nil {
+ return err
+ }
+ mcap.AccessProfile = &accessProfile
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ mcap.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ mcap.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ mcap.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ mcap.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ mcap.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// ManagedClusterAddonProfile a Kubernetes add-on profile for a managed cluster.
+type ManagedClusterAddonProfile struct {
+ // Enabled - Whether the add-on is enabled or not.
+ Enabled *bool `json:"enabled,omitempty"`
+ // Config - Key-value pairs for configuring an add-on.
+ Config map[string]*string `json:"config"`
+ // Identity - READ-ONLY; Information of user assigned identity used by this add-on.
+ Identity *ManagedClusterAddonProfileIdentity `json:"identity,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ManagedClusterAddonProfile.
+func (mcap ManagedClusterAddonProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if mcap.Enabled != nil {
+ objectMap["enabled"] = mcap.Enabled
+ }
+ if mcap.Config != nil {
+ objectMap["config"] = mcap.Config
+ }
+ return json.Marshal(objectMap)
+}
+
+// ManagedClusterAddonProfileIdentity information of user assigned identity used by this add-on.
+type ManagedClusterAddonProfileIdentity struct {
+ // ResourceID - The resource id of the user assigned identity.
+ ResourceID *string `json:"resourceId,omitempty"`
+ // ClientID - The client id of the user assigned identity.
+ ClientID *string `json:"clientId,omitempty"`
+ // ObjectID - The object id of the user assigned identity.
+ ObjectID *string `json:"objectId,omitempty"`
+}
+
+// ManagedClusterAgentPoolProfile profile for the container service agent pool.
+type ManagedClusterAgentPoolProfile struct {
+ // Name - Unique name of the agent pool profile in the context of the subscription and resource group.
+ Name *string `json:"name,omitempty"`
+ // Count - Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for system pools. The default value is 1.
+ Count *int32 `json:"count,omitempty"`
+ // VMSize - Size of agent VMs. Possible values include: 'VMSizeTypesStandardA1', 'VMSizeTypesStandardA10', 'VMSizeTypesStandardA11', 'VMSizeTypesStandardA1V2', 'VMSizeTypesStandardA2', 'VMSizeTypesStandardA2V2', 'VMSizeTypesStandardA2mV2', 'VMSizeTypesStandardA3', 'VMSizeTypesStandardA4', 'VMSizeTypesStandardA4V2', 'VMSizeTypesStandardA4mV2', 'VMSizeTypesStandardA5', 'VMSizeTypesStandardA6', 'VMSizeTypesStandardA7', 'VMSizeTypesStandardA8', 'VMSizeTypesStandardA8V2', 'VMSizeTypesStandardA8mV2', 'VMSizeTypesStandardA9', 'VMSizeTypesStandardB2ms', 'VMSizeTypesStandardB2s', 'VMSizeTypesStandardB4ms', 'VMSizeTypesStandardB8ms', 'VMSizeTypesStandardD1', 'VMSizeTypesStandardD11', 'VMSizeTypesStandardD11V2', 'VMSizeTypesStandardD11V2Promo', 'VMSizeTypesStandardD12', 'VMSizeTypesStandardD12V2', 'VMSizeTypesStandardD12V2Promo', 'VMSizeTypesStandardD13', 'VMSizeTypesStandardD13V2', 'VMSizeTypesStandardD13V2Promo', 'VMSizeTypesStandardD14', 'VMSizeTypesStandardD14V2', 'VMSizeTypesStandardD14V2Promo', 'VMSizeTypesStandardD15V2', 'VMSizeTypesStandardD16V3', 'VMSizeTypesStandardD16sV3', 'VMSizeTypesStandardD1V2', 'VMSizeTypesStandardD2', 'VMSizeTypesStandardD2V2', 'VMSizeTypesStandardD2V2Promo', 'VMSizeTypesStandardD2V3', 'VMSizeTypesStandardD2sV3', 'VMSizeTypesStandardD3', 'VMSizeTypesStandardD32V3', 'VMSizeTypesStandardD32sV3', 'VMSizeTypesStandardD3V2', 'VMSizeTypesStandardD3V2Promo', 'VMSizeTypesStandardD4', 'VMSizeTypesStandardD4V2', 'VMSizeTypesStandardD4V2Promo', 'VMSizeTypesStandardD4V3', 'VMSizeTypesStandardD4sV3', 'VMSizeTypesStandardD5V2', 'VMSizeTypesStandardD5V2Promo', 'VMSizeTypesStandardD64V3', 'VMSizeTypesStandardD64sV3', 'VMSizeTypesStandardD8V3', 'VMSizeTypesStandardD8sV3', 'VMSizeTypesStandardDS1', 'VMSizeTypesStandardDS11', 'VMSizeTypesStandardDS11V2', 'VMSizeTypesStandardDS11V2Promo', 'VMSizeTypesStandardDS12', 'VMSizeTypesStandardDS12V2', 'VMSizeTypesStandardDS12V2Promo', 'VMSizeTypesStandardDS13', 'VMSizeTypesStandardDS132V2', 'VMSizeTypesStandardDS134V2', 'VMSizeTypesStandardDS13V2', 'VMSizeTypesStandardDS13V2Promo', 'VMSizeTypesStandardDS14', 'VMSizeTypesStandardDS144V2', 'VMSizeTypesStandardDS148V2', 'VMSizeTypesStandardDS14V2', 'VMSizeTypesStandardDS14V2Promo', 'VMSizeTypesStandardDS15V2', 'VMSizeTypesStandardDS1V2', 'VMSizeTypesStandardDS2', 'VMSizeTypesStandardDS2V2', 'VMSizeTypesStandardDS2V2Promo', 'VMSizeTypesStandardDS3', 'VMSizeTypesStandardDS3V2', 'VMSizeTypesStandardDS3V2Promo', 'VMSizeTypesStandardDS4', 'VMSizeTypesStandardDS4V2', 'VMSizeTypesStandardDS4V2Promo', 'VMSizeTypesStandardDS5V2', 'VMSizeTypesStandardDS5V2Promo', 'VMSizeTypesStandardE16V3', 'VMSizeTypesStandardE16sV3', 'VMSizeTypesStandardE2V3', 'VMSizeTypesStandardE2sV3', 'VMSizeTypesStandardE3216sV3', 'VMSizeTypesStandardE328sV3', 'VMSizeTypesStandardE32V3', 'VMSizeTypesStandardE32sV3', 'VMSizeTypesStandardE4V3', 'VMSizeTypesStandardE4sV3', 'VMSizeTypesStandardE6416sV3', 'VMSizeTypesStandardE6432sV3', 'VMSizeTypesStandardE64V3', 'VMSizeTypesStandardE64sV3', 'VMSizeTypesStandardE8V3', 'VMSizeTypesStandardE8sV3', 'VMSizeTypesStandardF1', 'VMSizeTypesStandardF16', 'VMSizeTypesStandardF16s', 'VMSizeTypesStandardF16sV2', 'VMSizeTypesStandardF1s', 'VMSizeTypesStandardF2', 'VMSizeTypesStandardF2s', 'VMSizeTypesStandardF2sV2', 'VMSizeTypesStandardF32sV2', 'VMSizeTypesStandardF4', 'VMSizeTypesStandardF4s', 'VMSizeTypesStandardF4sV2', 'VMSizeTypesStandardF64sV2', 'VMSizeTypesStandardF72sV2', 'VMSizeTypesStandardF8', 'VMSizeTypesStandardF8s', 'VMSizeTypesStandardF8sV2', 'VMSizeTypesStandardG1', 'VMSizeTypesStandardG2', 'VMSizeTypesStandardG3', 'VMSizeTypesStandardG4', 'VMSizeTypesStandardG5', 'VMSizeTypesStandardGS1', 'VMSizeTypesStandardGS2', 'VMSizeTypesStandardGS3', 'VMSizeTypesStandardGS4', 'VMSizeTypesStandardGS44', 'VMSizeTypesStandardGS48', 'VMSizeTypesStandardGS5', 'VMSizeTypesStandardGS516', 'VMSizeTypesStandardGS58', 'VMSizeTypesStandardH16', 'VMSizeTypesStandardH16m', 'VMSizeTypesStandardH16mr', 'VMSizeTypesStandardH16r', 'VMSizeTypesStandardH8', 'VMSizeTypesStandardH8m', 'VMSizeTypesStandardL16s', 'VMSizeTypesStandardL32s', 'VMSizeTypesStandardL4s', 'VMSizeTypesStandardL8s', 'VMSizeTypesStandardM12832ms', 'VMSizeTypesStandardM12864ms', 'VMSizeTypesStandardM128ms', 'VMSizeTypesStandardM128s', 'VMSizeTypesStandardM6416ms', 'VMSizeTypesStandardM6432ms', 'VMSizeTypesStandardM64ms', 'VMSizeTypesStandardM64s', 'VMSizeTypesStandardNC12', 'VMSizeTypesStandardNC12sV2', 'VMSizeTypesStandardNC12sV3', 'VMSizeTypesStandardNC24', 'VMSizeTypesStandardNC24r', 'VMSizeTypesStandardNC24rsV2', 'VMSizeTypesStandardNC24rsV3', 'VMSizeTypesStandardNC24sV2', 'VMSizeTypesStandardNC24sV3', 'VMSizeTypesStandardNC6', 'VMSizeTypesStandardNC6sV2', 'VMSizeTypesStandardNC6sV3', 'VMSizeTypesStandardND12s', 'VMSizeTypesStandardND24rs', 'VMSizeTypesStandardND24s', 'VMSizeTypesStandardND6s', 'VMSizeTypesStandardNV12', 'VMSizeTypesStandardNV24', 'VMSizeTypesStandardNV6'
+ VMSize VMSizeTypes `json:"vmSize,omitempty"`
+ // OsDiskSizeGB - OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified.
+ OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"`
+ // VnetSubnetID - VNet SubnetID specifies the VNet's subnet identifier.
+ VnetSubnetID *string `json:"vnetSubnetID,omitempty"`
+ // MaxPods - Maximum number of pods that can run on a node.
+ MaxPods *int32 `json:"maxPods,omitempty"`
+ // OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows'
+ OsType OSType `json:"osType,omitempty"`
+ // MaxCount - Maximum number of nodes for auto-scaling
+ MaxCount *int32 `json:"maxCount,omitempty"`
+ // MinCount - Minimum number of nodes for auto-scaling
+ MinCount *int32 `json:"minCount,omitempty"`
+ // EnableAutoScaling - Whether to enable auto-scaler
+ EnableAutoScaling *bool `json:"enableAutoScaling,omitempty"`
+ // Type - AgentPoolType represents types of an agent pool. Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet'
+ Type AgentPoolType `json:"type,omitempty"`
+ // Mode - AgentPoolMode represents mode of an agent pool. Possible values include: 'System', 'User'
+ Mode AgentPoolMode `json:"mode,omitempty"`
+ // OrchestratorVersion - Version of orchestrator specified when creating the managed cluster.
+ OrchestratorVersion *string `json:"orchestratorVersion,omitempty"`
+ // NodeImageVersion - Version of node image
+ NodeImageVersion *string `json:"nodeImageVersion,omitempty"`
+ // UpgradeSettings - Settings for upgrading the agentpool
+ UpgradeSettings *AgentPoolUpgradeSettings `json:"upgradeSettings,omitempty"`
+ // ProvisioningState - READ-ONLY; The current deployment or provisioning state, which only appears in the response.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // AvailabilityZones - Availability zones for nodes. Must use VirtualMachineScaleSets AgentPoolType.
+ AvailabilityZones *[]string `json:"availabilityZones,omitempty"`
+ // EnableNodePublicIP - Enable public IP for nodes
+ EnableNodePublicIP *bool `json:"enableNodePublicIP,omitempty"`
+ // ScaleSetPriority - ScaleSetPriority to be used to specify virtual machine scale set priority. Default to regular. Possible values include: 'Spot', 'Regular'
+ ScaleSetPriority ScaleSetPriority `json:"scaleSetPriority,omitempty"`
+ // ScaleSetEvictionPolicy - ScaleSetEvictionPolicy to be used to specify eviction policy for Spot virtual machine scale set. Default to Delete. Possible values include: 'Delete', 'Deallocate'
+ ScaleSetEvictionPolicy ScaleSetEvictionPolicy `json:"scaleSetEvictionPolicy,omitempty"`
+ // SpotMaxPrice - SpotMaxPrice to be used to specify the maximum price you are willing to pay in US Dollars. Possible values are any decimal value greater than zero or -1 which indicates default price to be up-to on-demand.
+ SpotMaxPrice *float64 `json:"spotMaxPrice,omitempty"`
+ // Tags - Agent pool tags to be persisted on the agent pool virtual machine scale set.
+ Tags map[string]*string `json:"tags"`
+ // NodeLabels - Agent pool node labels to be persisted across all nodes in agent pool.
+ NodeLabels map[string]*string `json:"nodeLabels"`
+ // NodeTaints - Taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule.
+ NodeTaints *[]string `json:"nodeTaints,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ManagedClusterAgentPoolProfile.
+func (mcapp ManagedClusterAgentPoolProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if mcapp.Name != nil {
+ objectMap["name"] = mcapp.Name
+ }
+ if mcapp.Count != nil {
+ objectMap["count"] = mcapp.Count
+ }
+ if mcapp.VMSize != "" {
+ objectMap["vmSize"] = mcapp.VMSize
+ }
+ if mcapp.OsDiskSizeGB != nil {
+ objectMap["osDiskSizeGB"] = mcapp.OsDiskSizeGB
+ }
+ if mcapp.VnetSubnetID != nil {
+ objectMap["vnetSubnetID"] = mcapp.VnetSubnetID
+ }
+ if mcapp.MaxPods != nil {
+ objectMap["maxPods"] = mcapp.MaxPods
+ }
+ if mcapp.OsType != "" {
+ objectMap["osType"] = mcapp.OsType
+ }
+ if mcapp.MaxCount != nil {
+ objectMap["maxCount"] = mcapp.MaxCount
+ }
+ if mcapp.MinCount != nil {
+ objectMap["minCount"] = mcapp.MinCount
+ }
+ if mcapp.EnableAutoScaling != nil {
+ objectMap["enableAutoScaling"] = mcapp.EnableAutoScaling
+ }
+ if mcapp.Type != "" {
+ objectMap["type"] = mcapp.Type
+ }
+ if mcapp.Mode != "" {
+ objectMap["mode"] = mcapp.Mode
+ }
+ if mcapp.OrchestratorVersion != nil {
+ objectMap["orchestratorVersion"] = mcapp.OrchestratorVersion
+ }
+ if mcapp.NodeImageVersion != nil {
+ objectMap["nodeImageVersion"] = mcapp.NodeImageVersion
+ }
+ if mcapp.UpgradeSettings != nil {
+ objectMap["upgradeSettings"] = mcapp.UpgradeSettings
+ }
+ if mcapp.AvailabilityZones != nil {
+ objectMap["availabilityZones"] = mcapp.AvailabilityZones
+ }
+ if mcapp.EnableNodePublicIP != nil {
+ objectMap["enableNodePublicIP"] = mcapp.EnableNodePublicIP
+ }
+ if mcapp.ScaleSetPriority != "" {
+ objectMap["scaleSetPriority"] = mcapp.ScaleSetPriority
+ }
+ if mcapp.ScaleSetEvictionPolicy != "" {
+ objectMap["scaleSetEvictionPolicy"] = mcapp.ScaleSetEvictionPolicy
+ }
+ if mcapp.SpotMaxPrice != nil {
+ objectMap["spotMaxPrice"] = mcapp.SpotMaxPrice
+ }
+ if mcapp.Tags != nil {
+ objectMap["tags"] = mcapp.Tags
+ }
+ if mcapp.NodeLabels != nil {
+ objectMap["nodeLabels"] = mcapp.NodeLabels
+ }
+ if mcapp.NodeTaints != nil {
+ objectMap["nodeTaints"] = mcapp.NodeTaints
+ }
+ return json.Marshal(objectMap)
+}
+
+// ManagedClusterAgentPoolProfileProperties properties for the container service agent pool profile.
+type ManagedClusterAgentPoolProfileProperties struct {
+ // Count - Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for system pools. The default value is 1.
+ Count *int32 `json:"count,omitempty"`
+ // VMSize - Size of agent VMs. Possible values include: 'VMSizeTypesStandardA1', 'VMSizeTypesStandardA10', 'VMSizeTypesStandardA11', 'VMSizeTypesStandardA1V2', 'VMSizeTypesStandardA2', 'VMSizeTypesStandardA2V2', 'VMSizeTypesStandardA2mV2', 'VMSizeTypesStandardA3', 'VMSizeTypesStandardA4', 'VMSizeTypesStandardA4V2', 'VMSizeTypesStandardA4mV2', 'VMSizeTypesStandardA5', 'VMSizeTypesStandardA6', 'VMSizeTypesStandardA7', 'VMSizeTypesStandardA8', 'VMSizeTypesStandardA8V2', 'VMSizeTypesStandardA8mV2', 'VMSizeTypesStandardA9', 'VMSizeTypesStandardB2ms', 'VMSizeTypesStandardB2s', 'VMSizeTypesStandardB4ms', 'VMSizeTypesStandardB8ms', 'VMSizeTypesStandardD1', 'VMSizeTypesStandardD11', 'VMSizeTypesStandardD11V2', 'VMSizeTypesStandardD11V2Promo', 'VMSizeTypesStandardD12', 'VMSizeTypesStandardD12V2', 'VMSizeTypesStandardD12V2Promo', 'VMSizeTypesStandardD13', 'VMSizeTypesStandardD13V2', 'VMSizeTypesStandardD13V2Promo', 'VMSizeTypesStandardD14', 'VMSizeTypesStandardD14V2', 'VMSizeTypesStandardD14V2Promo', 'VMSizeTypesStandardD15V2', 'VMSizeTypesStandardD16V3', 'VMSizeTypesStandardD16sV3', 'VMSizeTypesStandardD1V2', 'VMSizeTypesStandardD2', 'VMSizeTypesStandardD2V2', 'VMSizeTypesStandardD2V2Promo', 'VMSizeTypesStandardD2V3', 'VMSizeTypesStandardD2sV3', 'VMSizeTypesStandardD3', 'VMSizeTypesStandardD32V3', 'VMSizeTypesStandardD32sV3', 'VMSizeTypesStandardD3V2', 'VMSizeTypesStandardD3V2Promo', 'VMSizeTypesStandardD4', 'VMSizeTypesStandardD4V2', 'VMSizeTypesStandardD4V2Promo', 'VMSizeTypesStandardD4V3', 'VMSizeTypesStandardD4sV3', 'VMSizeTypesStandardD5V2', 'VMSizeTypesStandardD5V2Promo', 'VMSizeTypesStandardD64V3', 'VMSizeTypesStandardD64sV3', 'VMSizeTypesStandardD8V3', 'VMSizeTypesStandardD8sV3', 'VMSizeTypesStandardDS1', 'VMSizeTypesStandardDS11', 'VMSizeTypesStandardDS11V2', 'VMSizeTypesStandardDS11V2Promo', 'VMSizeTypesStandardDS12', 'VMSizeTypesStandardDS12V2', 'VMSizeTypesStandardDS12V2Promo', 'VMSizeTypesStandardDS13', 'VMSizeTypesStandardDS132V2', 'VMSizeTypesStandardDS134V2', 'VMSizeTypesStandardDS13V2', 'VMSizeTypesStandardDS13V2Promo', 'VMSizeTypesStandardDS14', 'VMSizeTypesStandardDS144V2', 'VMSizeTypesStandardDS148V2', 'VMSizeTypesStandardDS14V2', 'VMSizeTypesStandardDS14V2Promo', 'VMSizeTypesStandardDS15V2', 'VMSizeTypesStandardDS1V2', 'VMSizeTypesStandardDS2', 'VMSizeTypesStandardDS2V2', 'VMSizeTypesStandardDS2V2Promo', 'VMSizeTypesStandardDS3', 'VMSizeTypesStandardDS3V2', 'VMSizeTypesStandardDS3V2Promo', 'VMSizeTypesStandardDS4', 'VMSizeTypesStandardDS4V2', 'VMSizeTypesStandardDS4V2Promo', 'VMSizeTypesStandardDS5V2', 'VMSizeTypesStandardDS5V2Promo', 'VMSizeTypesStandardE16V3', 'VMSizeTypesStandardE16sV3', 'VMSizeTypesStandardE2V3', 'VMSizeTypesStandardE2sV3', 'VMSizeTypesStandardE3216sV3', 'VMSizeTypesStandardE328sV3', 'VMSizeTypesStandardE32V3', 'VMSizeTypesStandardE32sV3', 'VMSizeTypesStandardE4V3', 'VMSizeTypesStandardE4sV3', 'VMSizeTypesStandardE6416sV3', 'VMSizeTypesStandardE6432sV3', 'VMSizeTypesStandardE64V3', 'VMSizeTypesStandardE64sV3', 'VMSizeTypesStandardE8V3', 'VMSizeTypesStandardE8sV3', 'VMSizeTypesStandardF1', 'VMSizeTypesStandardF16', 'VMSizeTypesStandardF16s', 'VMSizeTypesStandardF16sV2', 'VMSizeTypesStandardF1s', 'VMSizeTypesStandardF2', 'VMSizeTypesStandardF2s', 'VMSizeTypesStandardF2sV2', 'VMSizeTypesStandardF32sV2', 'VMSizeTypesStandardF4', 'VMSizeTypesStandardF4s', 'VMSizeTypesStandardF4sV2', 'VMSizeTypesStandardF64sV2', 'VMSizeTypesStandardF72sV2', 'VMSizeTypesStandardF8', 'VMSizeTypesStandardF8s', 'VMSizeTypesStandardF8sV2', 'VMSizeTypesStandardG1', 'VMSizeTypesStandardG2', 'VMSizeTypesStandardG3', 'VMSizeTypesStandardG4', 'VMSizeTypesStandardG5', 'VMSizeTypesStandardGS1', 'VMSizeTypesStandardGS2', 'VMSizeTypesStandardGS3', 'VMSizeTypesStandardGS4', 'VMSizeTypesStandardGS44', 'VMSizeTypesStandardGS48', 'VMSizeTypesStandardGS5', 'VMSizeTypesStandardGS516', 'VMSizeTypesStandardGS58', 'VMSizeTypesStandardH16', 'VMSizeTypesStandardH16m', 'VMSizeTypesStandardH16mr', 'VMSizeTypesStandardH16r', 'VMSizeTypesStandardH8', 'VMSizeTypesStandardH8m', 'VMSizeTypesStandardL16s', 'VMSizeTypesStandardL32s', 'VMSizeTypesStandardL4s', 'VMSizeTypesStandardL8s', 'VMSizeTypesStandardM12832ms', 'VMSizeTypesStandardM12864ms', 'VMSizeTypesStandardM128ms', 'VMSizeTypesStandardM128s', 'VMSizeTypesStandardM6416ms', 'VMSizeTypesStandardM6432ms', 'VMSizeTypesStandardM64ms', 'VMSizeTypesStandardM64s', 'VMSizeTypesStandardNC12', 'VMSizeTypesStandardNC12sV2', 'VMSizeTypesStandardNC12sV3', 'VMSizeTypesStandardNC24', 'VMSizeTypesStandardNC24r', 'VMSizeTypesStandardNC24rsV2', 'VMSizeTypesStandardNC24rsV3', 'VMSizeTypesStandardNC24sV2', 'VMSizeTypesStandardNC24sV3', 'VMSizeTypesStandardNC6', 'VMSizeTypesStandardNC6sV2', 'VMSizeTypesStandardNC6sV3', 'VMSizeTypesStandardND12s', 'VMSizeTypesStandardND24rs', 'VMSizeTypesStandardND24s', 'VMSizeTypesStandardND6s', 'VMSizeTypesStandardNV12', 'VMSizeTypesStandardNV24', 'VMSizeTypesStandardNV6'
+ VMSize VMSizeTypes `json:"vmSize,omitempty"`
+ // OsDiskSizeGB - OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified.
+ OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"`
+ // VnetSubnetID - VNet SubnetID specifies the VNet's subnet identifier.
+ VnetSubnetID *string `json:"vnetSubnetID,omitempty"`
+ // MaxPods - Maximum number of pods that can run on a node.
+ MaxPods *int32 `json:"maxPods,omitempty"`
+ // OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows'
+ OsType OSType `json:"osType,omitempty"`
+ // MaxCount - Maximum number of nodes for auto-scaling
+ MaxCount *int32 `json:"maxCount,omitempty"`
+ // MinCount - Minimum number of nodes for auto-scaling
+ MinCount *int32 `json:"minCount,omitempty"`
+ // EnableAutoScaling - Whether to enable auto-scaler
+ EnableAutoScaling *bool `json:"enableAutoScaling,omitempty"`
+ // Type - AgentPoolType represents types of an agent pool. Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet'
+ Type AgentPoolType `json:"type,omitempty"`
+ // Mode - AgentPoolMode represents mode of an agent pool. Possible values include: 'System', 'User'
+ Mode AgentPoolMode `json:"mode,omitempty"`
+ // OrchestratorVersion - Version of orchestrator specified when creating the managed cluster.
+ OrchestratorVersion *string `json:"orchestratorVersion,omitempty"`
+ // NodeImageVersion - Version of node image
+ NodeImageVersion *string `json:"nodeImageVersion,omitempty"`
+ // UpgradeSettings - Settings for upgrading the agentpool
+ UpgradeSettings *AgentPoolUpgradeSettings `json:"upgradeSettings,omitempty"`
+ // ProvisioningState - READ-ONLY; The current deployment or provisioning state, which only appears in the response.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // AvailabilityZones - Availability zones for nodes. Must use VirtualMachineScaleSets AgentPoolType.
+ AvailabilityZones *[]string `json:"availabilityZones,omitempty"`
+ // EnableNodePublicIP - Enable public IP for nodes
+ EnableNodePublicIP *bool `json:"enableNodePublicIP,omitempty"`
+ // ScaleSetPriority - ScaleSetPriority to be used to specify virtual machine scale set priority. Default to regular. Possible values include: 'Spot', 'Regular'
+ ScaleSetPriority ScaleSetPriority `json:"scaleSetPriority,omitempty"`
+ // ScaleSetEvictionPolicy - ScaleSetEvictionPolicy to be used to specify eviction policy for Spot virtual machine scale set. Default to Delete. Possible values include: 'Delete', 'Deallocate'
+ ScaleSetEvictionPolicy ScaleSetEvictionPolicy `json:"scaleSetEvictionPolicy,omitempty"`
+ // SpotMaxPrice - SpotMaxPrice to be used to specify the maximum price you are willing to pay in US Dollars. Possible values are any decimal value greater than zero or -1 which indicates default price to be up-to on-demand.
+ SpotMaxPrice *float64 `json:"spotMaxPrice,omitempty"`
+ // Tags - Agent pool tags to be persisted on the agent pool virtual machine scale set.
+ Tags map[string]*string `json:"tags"`
+ // NodeLabels - Agent pool node labels to be persisted across all nodes in agent pool.
+ NodeLabels map[string]*string `json:"nodeLabels"`
+ // NodeTaints - Taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule.
+ NodeTaints *[]string `json:"nodeTaints,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ManagedClusterAgentPoolProfileProperties.
+func (mcappp ManagedClusterAgentPoolProfileProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if mcappp.Count != nil {
+ objectMap["count"] = mcappp.Count
+ }
+ if mcappp.VMSize != "" {
+ objectMap["vmSize"] = mcappp.VMSize
+ }
+ if mcappp.OsDiskSizeGB != nil {
+ objectMap["osDiskSizeGB"] = mcappp.OsDiskSizeGB
+ }
+ if mcappp.VnetSubnetID != nil {
+ objectMap["vnetSubnetID"] = mcappp.VnetSubnetID
+ }
+ if mcappp.MaxPods != nil {
+ objectMap["maxPods"] = mcappp.MaxPods
+ }
+ if mcappp.OsType != "" {
+ objectMap["osType"] = mcappp.OsType
+ }
+ if mcappp.MaxCount != nil {
+ objectMap["maxCount"] = mcappp.MaxCount
+ }
+ if mcappp.MinCount != nil {
+ objectMap["minCount"] = mcappp.MinCount
+ }
+ if mcappp.EnableAutoScaling != nil {
+ objectMap["enableAutoScaling"] = mcappp.EnableAutoScaling
+ }
+ if mcappp.Type != "" {
+ objectMap["type"] = mcappp.Type
+ }
+ if mcappp.Mode != "" {
+ objectMap["mode"] = mcappp.Mode
+ }
+ if mcappp.OrchestratorVersion != nil {
+ objectMap["orchestratorVersion"] = mcappp.OrchestratorVersion
+ }
+ if mcappp.NodeImageVersion != nil {
+ objectMap["nodeImageVersion"] = mcappp.NodeImageVersion
+ }
+ if mcappp.UpgradeSettings != nil {
+ objectMap["upgradeSettings"] = mcappp.UpgradeSettings
+ }
+ if mcappp.AvailabilityZones != nil {
+ objectMap["availabilityZones"] = mcappp.AvailabilityZones
+ }
+ if mcappp.EnableNodePublicIP != nil {
+ objectMap["enableNodePublicIP"] = mcappp.EnableNodePublicIP
+ }
+ if mcappp.ScaleSetPriority != "" {
+ objectMap["scaleSetPriority"] = mcappp.ScaleSetPriority
+ }
+ if mcappp.ScaleSetEvictionPolicy != "" {
+ objectMap["scaleSetEvictionPolicy"] = mcappp.ScaleSetEvictionPolicy
+ }
+ if mcappp.SpotMaxPrice != nil {
+ objectMap["spotMaxPrice"] = mcappp.SpotMaxPrice
+ }
+ if mcappp.Tags != nil {
+ objectMap["tags"] = mcappp.Tags
+ }
+ if mcappp.NodeLabels != nil {
+ objectMap["nodeLabels"] = mcappp.NodeLabels
+ }
+ if mcappp.NodeTaints != nil {
+ objectMap["nodeTaints"] = mcappp.NodeTaints
+ }
+ return json.Marshal(objectMap)
+}
+
+// ManagedClusterAPIServerAccessProfile access profile for managed cluster API server.
+type ManagedClusterAPIServerAccessProfile struct {
+ // AuthorizedIPRanges - Authorized IP Ranges to kubernetes API server.
+ AuthorizedIPRanges *[]string `json:"authorizedIPRanges,omitempty"`
+ // EnablePrivateCluster - Whether to create the cluster as a private cluster or not.
+ EnablePrivateCluster *bool `json:"enablePrivateCluster,omitempty"`
+}
+
+// ManagedClusterIdentity identity for the managed cluster.
+type ManagedClusterIdentity struct {
+ // PrincipalID - READ-ONLY; The principal id of the system assigned identity which is used by master components.
+ PrincipalID *string `json:"principalId,omitempty"`
+ // TenantID - READ-ONLY; The tenant id of the system assigned identity which is used by master components.
+ TenantID *string `json:"tenantId,omitempty"`
+ // Type - The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly created identity in master components and an auto-created user assigned identity in MC_ resource group in agent nodes. Type 'None' will not use MSI for the managed cluster, service principal will be used instead. Possible values include: 'SystemAssigned', 'None'
+ Type ResourceIdentityType `json:"type,omitempty"`
+}
+
+// ManagedClusterListResult the response from the List Managed Clusters operation.
+type ManagedClusterListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of managed clusters.
+ Value *[]ManagedCluster `json:"value,omitempty"`
+ // NextLink - READ-ONLY; The URL to get the next set of managed cluster results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ManagedClusterListResultIterator provides access to a complete listing of ManagedCluster values.
+type ManagedClusterListResultIterator struct {
+ i int
+ page ManagedClusterListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *ManagedClusterListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClusterListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ManagedClusterListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ManagedClusterListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter ManagedClusterListResultIterator) Response() ManagedClusterListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter ManagedClusterListResultIterator) Value() ManagedCluster {
+ if !iter.page.NotDone() {
+ return ManagedCluster{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the ManagedClusterListResultIterator type.
+func NewManagedClusterListResultIterator(page ManagedClusterListResultPage) ManagedClusterListResultIterator {
+ return ManagedClusterListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (mclr ManagedClusterListResult) IsEmpty() bool {
+ return mclr.Value == nil || len(*mclr.Value) == 0
+}
+
+// managedClusterListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (mclr ManagedClusterListResult) managedClusterListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if mclr.NextLink == nil || len(to.String(mclr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(mclr.NextLink)))
+}
+
+// ManagedClusterListResultPage contains a page of ManagedCluster values.
+type ManagedClusterListResultPage struct {
+ fn func(context.Context, ManagedClusterListResult) (ManagedClusterListResult, error)
+ mclr ManagedClusterListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *ManagedClusterListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClusterListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.mclr)
+ if err != nil {
+ return err
+ }
+ page.mclr = next
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ManagedClusterListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ManagedClusterListResultPage) NotDone() bool {
+ return !page.mclr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ManagedClusterListResultPage) Response() ManagedClusterListResult {
+ return page.mclr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ManagedClusterListResultPage) Values() []ManagedCluster {
+ if page.mclr.IsEmpty() {
+ return nil
+ }
+ return *page.mclr.Value
+}
+
+// Creates a new instance of the ManagedClusterListResultPage type.
+func NewManagedClusterListResultPage(getNextPage func(context.Context, ManagedClusterListResult) (ManagedClusterListResult, error)) ManagedClusterListResultPage {
+ return ManagedClusterListResultPage{fn: getNextPage}
+}
+
+// ManagedClusterLoadBalancerProfile profile of the managed cluster load balancer.
+type ManagedClusterLoadBalancerProfile struct {
+ // ManagedOutboundIPs - Desired managed outbound IPs for the cluster load balancer.
+ ManagedOutboundIPs *ManagedClusterLoadBalancerProfileManagedOutboundIPs `json:"managedOutboundIPs,omitempty"`
+ // OutboundIPPrefixes - Desired outbound IP Prefix resources for the cluster load balancer.
+ OutboundIPPrefixes *ManagedClusterLoadBalancerProfileOutboundIPPrefixes `json:"outboundIPPrefixes,omitempty"`
+ // OutboundIPs - Desired outbound IP resources for the cluster load balancer.
+ OutboundIPs *ManagedClusterLoadBalancerProfileOutboundIPs `json:"outboundIPs,omitempty"`
+ // EffectiveOutboundIPs - The effective outbound IP resources of the cluster load balancer.
+ EffectiveOutboundIPs *[]ResourceReference `json:"effectiveOutboundIPs,omitempty"`
+ // AllocatedOutboundPorts - Desired number of allocated SNAT ports per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The default value is 0 which results in Azure dynamically allocating ports.
+ AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"`
+ // IdleTimeoutInMinutes - Desired outbound flow idle timeout in minutes. Allowed values must be in the range of 4 to 120 (inclusive). The default value is 30 minutes.
+ IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
+}
+
+// ManagedClusterLoadBalancerProfileManagedOutboundIPs desired managed outbound IPs for the cluster load
+// balancer.
+type ManagedClusterLoadBalancerProfileManagedOutboundIPs struct {
+ // Count - Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1.
+ Count *int32 `json:"count,omitempty"`
+}
+
+// ManagedClusterLoadBalancerProfileOutboundIPPrefixes desired outbound IP Prefix resources for the cluster
+// load balancer.
+type ManagedClusterLoadBalancerProfileOutboundIPPrefixes struct {
+ // PublicIPPrefixes - A list of public IP prefix resources.
+ PublicIPPrefixes *[]ResourceReference `json:"publicIPPrefixes,omitempty"`
+}
+
+// ManagedClusterLoadBalancerProfileOutboundIPs desired outbound IP resources for the cluster load
+// balancer.
+type ManagedClusterLoadBalancerProfileOutboundIPs struct {
+ // PublicIPs - A list of public IP resources.
+ PublicIPs *[]ResourceReference `json:"publicIPs,omitempty"`
+}
+
+// ManagedClusterPoolUpgradeProfile the list of available upgrade versions.
+type ManagedClusterPoolUpgradeProfile struct {
+ // KubernetesVersion - Kubernetes version (major, minor, patch).
+ KubernetesVersion *string `json:"kubernetesVersion,omitempty"`
+ // Name - Pool name.
+ Name *string `json:"name,omitempty"`
+ // OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows'
+ OsType OSType `json:"osType,omitempty"`
+ // Upgrades - List of orchestrator types and versions available for upgrade.
+ Upgrades *[]ManagedClusterPoolUpgradeProfileUpgradesItem `json:"upgrades,omitempty"`
+}
+
+// ManagedClusterPoolUpgradeProfileUpgradesItem ...
+type ManagedClusterPoolUpgradeProfileUpgradesItem struct {
+ // KubernetesVersion - Kubernetes version (major, minor, patch).
+ KubernetesVersion *string `json:"kubernetesVersion,omitempty"`
+ // IsPreview - Whether Kubernetes version is currently in preview.
+ IsPreview *bool `json:"isPreview,omitempty"`
+}
+
+// ManagedClusterProperties properties of the managed cluster.
+type ManagedClusterProperties struct {
+ // ProvisioningState - READ-ONLY; The current deployment or provisioning state, which only appears in the response.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // MaxAgentPools - READ-ONLY; The max number of agent pools for the managed cluster.
+ MaxAgentPools *int32 `json:"maxAgentPools,omitempty"`
+ // KubernetesVersion - Version of Kubernetes specified when creating the managed cluster.
+ KubernetesVersion *string `json:"kubernetesVersion,omitempty"`
+ // DNSPrefix - DNS prefix specified when creating the managed cluster.
+ DNSPrefix *string `json:"dnsPrefix,omitempty"`
+ // Fqdn - READ-ONLY; FQDN for the master pool.
+ Fqdn *string `json:"fqdn,omitempty"`
+ // PrivateFQDN - READ-ONLY; FQDN of private cluster.
+ PrivateFQDN *string `json:"privateFQDN,omitempty"`
+ // AgentPoolProfiles - Properties of the agent pool.
+ AgentPoolProfiles *[]ManagedClusterAgentPoolProfile `json:"agentPoolProfiles,omitempty"`
+ // LinuxProfile - Profile for Linux VMs in the container service cluster.
+ LinuxProfile *LinuxProfile `json:"linuxProfile,omitempty"`
+ // WindowsProfile - Profile for Windows VMs in the container service cluster.
+ WindowsProfile *ManagedClusterWindowsProfile `json:"windowsProfile,omitempty"`
+ // ServicePrincipalProfile - Information about a service principal identity for the cluster to use for manipulating Azure APIs.
+ ServicePrincipalProfile *ManagedClusterServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"`
+ // AddonProfiles - Profile of managed cluster add-on.
+ AddonProfiles map[string]*ManagedClusterAddonProfile `json:"addonProfiles"`
+ // NodeResourceGroup - Name of the resource group containing agent pool nodes.
+ NodeResourceGroup *string `json:"nodeResourceGroup,omitempty"`
+ // EnableRBAC - Whether to enable Kubernetes Role-Based Access Control.
+ EnableRBAC *bool `json:"enableRBAC,omitempty"`
+ // EnablePodSecurityPolicy - (PREVIEW) Whether to enable Kubernetes Pod security policy.
+ EnablePodSecurityPolicy *bool `json:"enablePodSecurityPolicy,omitempty"`
+ // NetworkProfile - Profile of network configuration.
+ NetworkProfile *NetworkProfileType `json:"networkProfile,omitempty"`
+ // AadProfile - Profile of Azure Active Directory configuration.
+ AadProfile *ManagedClusterAADProfile `json:"aadProfile,omitempty"`
+ // AutoScalerProfile - Parameters to be applied to the cluster-autoscaler when enabled
+ AutoScalerProfile *ManagedClusterPropertiesAutoScalerProfile `json:"autoScalerProfile,omitempty"`
+ // APIServerAccessProfile - Access profile for managed cluster API server.
+ APIServerAccessProfile *ManagedClusterAPIServerAccessProfile `json:"apiServerAccessProfile,omitempty"`
+ // DiskEncryptionSetID - ResourceId of the disk encryption set to use for enabling encryption at rest.
+ DiskEncryptionSetID *string `json:"diskEncryptionSetID,omitempty"`
+ // IdentityProfile - Identities associated with the cluster.
+ IdentityProfile map[string]*ManagedClusterPropertiesIdentityProfileValue `json:"identityProfile"`
+}
+
+// MarshalJSON is the custom marshaler for ManagedClusterProperties.
+func (mcp ManagedClusterProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if mcp.KubernetesVersion != nil {
+ objectMap["kubernetesVersion"] = mcp.KubernetesVersion
+ }
+ if mcp.DNSPrefix != nil {
+ objectMap["dnsPrefix"] = mcp.DNSPrefix
+ }
+ if mcp.AgentPoolProfiles != nil {
+ objectMap["agentPoolProfiles"] = mcp.AgentPoolProfiles
+ }
+ if mcp.LinuxProfile != nil {
+ objectMap["linuxProfile"] = mcp.LinuxProfile
+ }
+ if mcp.WindowsProfile != nil {
+ objectMap["windowsProfile"] = mcp.WindowsProfile
+ }
+ if mcp.ServicePrincipalProfile != nil {
+ objectMap["servicePrincipalProfile"] = mcp.ServicePrincipalProfile
+ }
+ if mcp.AddonProfiles != nil {
+ objectMap["addonProfiles"] = mcp.AddonProfiles
+ }
+ if mcp.NodeResourceGroup != nil {
+ objectMap["nodeResourceGroup"] = mcp.NodeResourceGroup
+ }
+ if mcp.EnableRBAC != nil {
+ objectMap["enableRBAC"] = mcp.EnableRBAC
+ }
+ if mcp.EnablePodSecurityPolicy != nil {
+ objectMap["enablePodSecurityPolicy"] = mcp.EnablePodSecurityPolicy
+ }
+ if mcp.NetworkProfile != nil {
+ objectMap["networkProfile"] = mcp.NetworkProfile
+ }
+ if mcp.AadProfile != nil {
+ objectMap["aadProfile"] = mcp.AadProfile
+ }
+ if mcp.AutoScalerProfile != nil {
+ objectMap["autoScalerProfile"] = mcp.AutoScalerProfile
+ }
+ if mcp.APIServerAccessProfile != nil {
+ objectMap["apiServerAccessProfile"] = mcp.APIServerAccessProfile
+ }
+ if mcp.DiskEncryptionSetID != nil {
+ objectMap["diskEncryptionSetID"] = mcp.DiskEncryptionSetID
+ }
+ if mcp.IdentityProfile != nil {
+ objectMap["identityProfile"] = mcp.IdentityProfile
+ }
+ return json.Marshal(objectMap)
+}
+
+// ManagedClusterPropertiesAutoScalerProfile parameters to be applied to the cluster-autoscaler when
+// enabled
+type ManagedClusterPropertiesAutoScalerProfile struct {
+ BalanceSimilarNodeGroups *string `json:"balance-similar-node-groups,omitempty"`
+ ScanInterval *string `json:"scan-interval,omitempty"`
+ ScaleDownDelayAfterAdd *string `json:"scale-down-delay-after-add,omitempty"`
+ ScaleDownDelayAfterDelete *string `json:"scale-down-delay-after-delete,omitempty"`
+ ScaleDownDelayAfterFailure *string `json:"scale-down-delay-after-failure,omitempty"`
+ ScaleDownUnneededTime *string `json:"scale-down-unneeded-time,omitempty"`
+ ScaleDownUnreadyTime *string `json:"scale-down-unready-time,omitempty"`
+ ScaleDownUtilizationThreshold *string `json:"scale-down-utilization-threshold,omitempty"`
+ MaxGracefulTerminationSec *string `json:"max-graceful-termination-sec,omitempty"`
+}
+
+// ManagedClusterPropertiesIdentityProfileValue ...
+type ManagedClusterPropertiesIdentityProfileValue struct {
+ // ResourceID - The resource id of the user assigned identity.
+ ResourceID *string `json:"resourceId,omitempty"`
+ // ClientID - The client id of the user assigned identity.
+ ClientID *string `json:"clientId,omitempty"`
+ // ObjectID - The object id of the user assigned identity.
+ ObjectID *string `json:"objectId,omitempty"`
+}
+
+// ManagedClustersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ManagedClustersCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ManagedClustersCreateOrUpdateFuture) Result(client ManagedClustersClient) (mc ManagedCluster, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if mc.Response.Response, err = future.GetResult(sender); err == nil && mc.Response.Response.StatusCode != http.StatusNoContent {
+ mc, err = client.CreateOrUpdateResponder(mc.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersCreateOrUpdateFuture", "Result", mc.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ManagedClustersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type ManagedClustersDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ManagedClustersDeleteFuture) Result(client ManagedClustersClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// ManagedClusterServicePrincipalProfile information about a service principal identity for the cluster to
+// use for manipulating Azure APIs.
+type ManagedClusterServicePrincipalProfile struct {
+ // ClientID - The ID for the service principal.
+ ClientID *string `json:"clientId,omitempty"`
+ // Secret - The secret password associated with the service principal in plain text.
+ Secret *string `json:"secret,omitempty"`
+}
+
+// ManagedClusterSKU ...
+type ManagedClusterSKU struct {
+ // Name - Name of a managed cluster SKU. Possible values include: 'ManagedClusterSKUNameBasic'
+ Name ManagedClusterSKUName `json:"name,omitempty"`
+ // Tier - Tier of a managed cluster SKU. Possible values include: 'Paid', 'Free'
+ Tier ManagedClusterSKUTier `json:"tier,omitempty"`
+}
+
+// ManagedClustersResetAADProfileFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ManagedClustersResetAADProfileFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ManagedClustersResetAADProfileFuture) Result(client ManagedClustersClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersResetAADProfileFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersResetAADProfileFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// ManagedClustersResetServicePrincipalProfileFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
+type ManagedClustersResetServicePrincipalProfileFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ManagedClustersResetServicePrincipalProfileFuture) Result(client ManagedClustersClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersResetServicePrincipalProfileFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersResetServicePrincipalProfileFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// ManagedClustersRotateClusterCertificatesFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
+type ManagedClustersRotateClusterCertificatesFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ManagedClustersRotateClusterCertificatesFuture) Result(client ManagedClustersClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersRotateClusterCertificatesFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersRotateClusterCertificatesFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// ManagedClustersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ManagedClustersUpdateTagsFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ManagedClustersUpdateTagsFuture) Result(client ManagedClustersClient) (mc ManagedCluster, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersUpdateTagsFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersUpdateTagsFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if mc.Response.Response, err = future.GetResult(sender); err == nil && mc.Response.Response.StatusCode != http.StatusNoContent {
+ mc, err = client.UpdateTagsResponder(mc.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersUpdateTagsFuture", "Result", mc.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ManagedClusterUpgradeProfile the list of available upgrades for compute pools.
+type ManagedClusterUpgradeProfile struct {
+ autorest.Response `json:"-"`
+ // ID - READ-ONLY; Id of upgrade profile.
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Name of upgrade profile.
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Type of upgrade profile.
+ Type *string `json:"type,omitempty"`
+ // ManagedClusterUpgradeProfileProperties - Properties of upgrade profile.
+ *ManagedClusterUpgradeProfileProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ManagedClusterUpgradeProfile.
+func (mcup ManagedClusterUpgradeProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if mcup.ManagedClusterUpgradeProfileProperties != nil {
+ objectMap["properties"] = mcup.ManagedClusterUpgradeProfileProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ManagedClusterUpgradeProfile struct.
+func (mcup *ManagedClusterUpgradeProfile) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ mcup.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ mcup.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ mcup.Type = &typeVar
+ }
+ case "properties":
+ if v != nil {
+ var managedClusterUpgradeProfileProperties ManagedClusterUpgradeProfileProperties
+ err = json.Unmarshal(*v, &managedClusterUpgradeProfileProperties)
+ if err != nil {
+ return err
+ }
+ mcup.ManagedClusterUpgradeProfileProperties = &managedClusterUpgradeProfileProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// ManagedClusterUpgradeProfileProperties control plane and agent pool upgrade profiles.
+type ManagedClusterUpgradeProfileProperties struct {
+ // ControlPlaneProfile - The list of available upgrade versions for the control plane.
+ ControlPlaneProfile *ManagedClusterPoolUpgradeProfile `json:"controlPlaneProfile,omitempty"`
+ // AgentPoolProfiles - The list of available upgrade versions for agent pools.
+ AgentPoolProfiles *[]ManagedClusterPoolUpgradeProfile `json:"agentPoolProfiles,omitempty"`
+}
+
+// ManagedClusterWindowsProfile profile for Windows VMs in the container service cluster.
+type ManagedClusterWindowsProfile struct {
+ // AdminUsername - The administrator username to use for Windows VMs.
+ AdminUsername *string `json:"adminUsername,omitempty"`
+ // AdminPassword - The administrator password to use for Windows VMs.
+ AdminPassword *string `json:"adminPassword,omitempty"`
+}
+
+// MasterProfile profile for the container service master.
+type MasterProfile struct {
+ // Count - Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1.
+ Count *int32 `json:"count,omitempty"`
+ // DNSPrefix - DNS prefix to be used to create the FQDN for the master pool.
+ DNSPrefix *string `json:"dnsPrefix,omitempty"`
+ // VMSize - Size of agent VMs. Possible values include: 'VMSizeTypesStandardA1', 'VMSizeTypesStandardA10', 'VMSizeTypesStandardA11', 'VMSizeTypesStandardA1V2', 'VMSizeTypesStandardA2', 'VMSizeTypesStandardA2V2', 'VMSizeTypesStandardA2mV2', 'VMSizeTypesStandardA3', 'VMSizeTypesStandardA4', 'VMSizeTypesStandardA4V2', 'VMSizeTypesStandardA4mV2', 'VMSizeTypesStandardA5', 'VMSizeTypesStandardA6', 'VMSizeTypesStandardA7', 'VMSizeTypesStandardA8', 'VMSizeTypesStandardA8V2', 'VMSizeTypesStandardA8mV2', 'VMSizeTypesStandardA9', 'VMSizeTypesStandardB2ms', 'VMSizeTypesStandardB2s', 'VMSizeTypesStandardB4ms', 'VMSizeTypesStandardB8ms', 'VMSizeTypesStandardD1', 'VMSizeTypesStandardD11', 'VMSizeTypesStandardD11V2', 'VMSizeTypesStandardD11V2Promo', 'VMSizeTypesStandardD12', 'VMSizeTypesStandardD12V2', 'VMSizeTypesStandardD12V2Promo', 'VMSizeTypesStandardD13', 'VMSizeTypesStandardD13V2', 'VMSizeTypesStandardD13V2Promo', 'VMSizeTypesStandardD14', 'VMSizeTypesStandardD14V2', 'VMSizeTypesStandardD14V2Promo', 'VMSizeTypesStandardD15V2', 'VMSizeTypesStandardD16V3', 'VMSizeTypesStandardD16sV3', 'VMSizeTypesStandardD1V2', 'VMSizeTypesStandardD2', 'VMSizeTypesStandardD2V2', 'VMSizeTypesStandardD2V2Promo', 'VMSizeTypesStandardD2V3', 'VMSizeTypesStandardD2sV3', 'VMSizeTypesStandardD3', 'VMSizeTypesStandardD32V3', 'VMSizeTypesStandardD32sV3', 'VMSizeTypesStandardD3V2', 'VMSizeTypesStandardD3V2Promo', 'VMSizeTypesStandardD4', 'VMSizeTypesStandardD4V2', 'VMSizeTypesStandardD4V2Promo', 'VMSizeTypesStandardD4V3', 'VMSizeTypesStandardD4sV3', 'VMSizeTypesStandardD5V2', 'VMSizeTypesStandardD5V2Promo', 'VMSizeTypesStandardD64V3', 'VMSizeTypesStandardD64sV3', 'VMSizeTypesStandardD8V3', 'VMSizeTypesStandardD8sV3', 'VMSizeTypesStandardDS1', 'VMSizeTypesStandardDS11', 'VMSizeTypesStandardDS11V2', 'VMSizeTypesStandardDS11V2Promo', 'VMSizeTypesStandardDS12', 'VMSizeTypesStandardDS12V2', 'VMSizeTypesStandardDS12V2Promo', 'VMSizeTypesStandardDS13', 'VMSizeTypesStandardDS132V2', 'VMSizeTypesStandardDS134V2', 'VMSizeTypesStandardDS13V2', 'VMSizeTypesStandardDS13V2Promo', 'VMSizeTypesStandardDS14', 'VMSizeTypesStandardDS144V2', 'VMSizeTypesStandardDS148V2', 'VMSizeTypesStandardDS14V2', 'VMSizeTypesStandardDS14V2Promo', 'VMSizeTypesStandardDS15V2', 'VMSizeTypesStandardDS1V2', 'VMSizeTypesStandardDS2', 'VMSizeTypesStandardDS2V2', 'VMSizeTypesStandardDS2V2Promo', 'VMSizeTypesStandardDS3', 'VMSizeTypesStandardDS3V2', 'VMSizeTypesStandardDS3V2Promo', 'VMSizeTypesStandardDS4', 'VMSizeTypesStandardDS4V2', 'VMSizeTypesStandardDS4V2Promo', 'VMSizeTypesStandardDS5V2', 'VMSizeTypesStandardDS5V2Promo', 'VMSizeTypesStandardE16V3', 'VMSizeTypesStandardE16sV3', 'VMSizeTypesStandardE2V3', 'VMSizeTypesStandardE2sV3', 'VMSizeTypesStandardE3216sV3', 'VMSizeTypesStandardE328sV3', 'VMSizeTypesStandardE32V3', 'VMSizeTypesStandardE32sV3', 'VMSizeTypesStandardE4V3', 'VMSizeTypesStandardE4sV3', 'VMSizeTypesStandardE6416sV3', 'VMSizeTypesStandardE6432sV3', 'VMSizeTypesStandardE64V3', 'VMSizeTypesStandardE64sV3', 'VMSizeTypesStandardE8V3', 'VMSizeTypesStandardE8sV3', 'VMSizeTypesStandardF1', 'VMSizeTypesStandardF16', 'VMSizeTypesStandardF16s', 'VMSizeTypesStandardF16sV2', 'VMSizeTypesStandardF1s', 'VMSizeTypesStandardF2', 'VMSizeTypesStandardF2s', 'VMSizeTypesStandardF2sV2', 'VMSizeTypesStandardF32sV2', 'VMSizeTypesStandardF4', 'VMSizeTypesStandardF4s', 'VMSizeTypesStandardF4sV2', 'VMSizeTypesStandardF64sV2', 'VMSizeTypesStandardF72sV2', 'VMSizeTypesStandardF8', 'VMSizeTypesStandardF8s', 'VMSizeTypesStandardF8sV2', 'VMSizeTypesStandardG1', 'VMSizeTypesStandardG2', 'VMSizeTypesStandardG3', 'VMSizeTypesStandardG4', 'VMSizeTypesStandardG5', 'VMSizeTypesStandardGS1', 'VMSizeTypesStandardGS2', 'VMSizeTypesStandardGS3', 'VMSizeTypesStandardGS4', 'VMSizeTypesStandardGS44', 'VMSizeTypesStandardGS48', 'VMSizeTypesStandardGS5', 'VMSizeTypesStandardGS516', 'VMSizeTypesStandardGS58', 'VMSizeTypesStandardH16', 'VMSizeTypesStandardH16m', 'VMSizeTypesStandardH16mr', 'VMSizeTypesStandardH16r', 'VMSizeTypesStandardH8', 'VMSizeTypesStandardH8m', 'VMSizeTypesStandardL16s', 'VMSizeTypesStandardL32s', 'VMSizeTypesStandardL4s', 'VMSizeTypesStandardL8s', 'VMSizeTypesStandardM12832ms', 'VMSizeTypesStandardM12864ms', 'VMSizeTypesStandardM128ms', 'VMSizeTypesStandardM128s', 'VMSizeTypesStandardM6416ms', 'VMSizeTypesStandardM6432ms', 'VMSizeTypesStandardM64ms', 'VMSizeTypesStandardM64s', 'VMSizeTypesStandardNC12', 'VMSizeTypesStandardNC12sV2', 'VMSizeTypesStandardNC12sV3', 'VMSizeTypesStandardNC24', 'VMSizeTypesStandardNC24r', 'VMSizeTypesStandardNC24rsV2', 'VMSizeTypesStandardNC24rsV3', 'VMSizeTypesStandardNC24sV2', 'VMSizeTypesStandardNC24sV3', 'VMSizeTypesStandardNC6', 'VMSizeTypesStandardNC6sV2', 'VMSizeTypesStandardNC6sV3', 'VMSizeTypesStandardND12s', 'VMSizeTypesStandardND24rs', 'VMSizeTypesStandardND24s', 'VMSizeTypesStandardND6s', 'VMSizeTypesStandardNV12', 'VMSizeTypesStandardNV24', 'VMSizeTypesStandardNV6'
+ VMSize VMSizeTypes `json:"vmSize,omitempty"`
+ // OsDiskSizeGB - OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified.
+ OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"`
+ // VnetSubnetID - VNet SubnetID specifies the VNet's subnet identifier.
+ VnetSubnetID *string `json:"vnetSubnetID,omitempty"`
+ // FirstConsecutiveStaticIP - FirstConsecutiveStaticIP used to specify the first static ip of masters.
+ FirstConsecutiveStaticIP *string `json:"firstConsecutiveStaticIP,omitempty"`
+ // StorageProfile - Storage profile specifies what kind of storage used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the orchestrator choice. Possible values include: 'StorageAccount', 'ManagedDisks'
+ StorageProfile StorageProfileTypes `json:"storageProfile,omitempty"`
+ // Fqdn - READ-ONLY; FQDN for the master pool.
+ Fqdn *string `json:"fqdn,omitempty"`
+}
+
+// NetworkProfile represents the OpenShift networking configuration
+type NetworkProfile struct {
+ // VnetCidr - CIDR for the OpenShift Vnet.
+ VnetCidr *string `json:"vnetCidr,omitempty"`
+ // PeerVnetID - CIDR of the Vnet to peer.
+ PeerVnetID *string `json:"peerVnetId,omitempty"`
+ // VnetID - ID of the Vnet created for OSA cluster.
+ VnetID *string `json:"vnetId,omitempty"`
+}
+
+// NetworkProfileType profile of network configuration.
+type NetworkProfileType struct {
+ // NetworkPlugin - Network plugin used for building Kubernetes network. Possible values include: 'Azure', 'Kubenet'
+ NetworkPlugin NetworkPlugin `json:"networkPlugin,omitempty"`
+ // NetworkPolicy - Network policy used for building Kubernetes network. Possible values include: 'NetworkPolicyCalico', 'NetworkPolicyAzure'
+ NetworkPolicy NetworkPolicy `json:"networkPolicy,omitempty"`
+ // NetworkMode - Network mode used for building Kubernetes network. Possible values include: 'Transparent', 'Bridge'
+ NetworkMode NetworkMode `json:"networkMode,omitempty"`
+ // PodCidr - A CIDR notation IP range from which to assign pod IPs when kubenet is used.
+ PodCidr *string `json:"podCidr,omitempty"`
+ // ServiceCidr - A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges.
+ ServiceCidr *string `json:"serviceCidr,omitempty"`
+ // DNSServiceIP - An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in serviceCidr.
+ DNSServiceIP *string `json:"dnsServiceIP,omitempty"`
+ // DockerBridgeCidr - A CIDR notation IP range assigned to the Docker bridge network. It must not overlap with any Subnet IP ranges or the Kubernetes service address range.
+ DockerBridgeCidr *string `json:"dockerBridgeCidr,omitempty"`
+ // OutboundType - The outbound (egress) routing method. Possible values include: 'LoadBalancer', 'UserDefinedRouting'
+ OutboundType OutboundType `json:"outboundType,omitempty"`
+ // LoadBalancerSku - The load balancer sku for the managed cluster. Possible values include: 'Standard', 'Basic'
+ LoadBalancerSku LoadBalancerSku `json:"loadBalancerSku,omitempty"`
+ // LoadBalancerProfile - Profile of the cluster load balancer.
+ LoadBalancerProfile *ManagedClusterLoadBalancerProfile `json:"loadBalancerProfile,omitempty"`
+}
+
+// OpenShiftManagedCluster openShift Managed cluster.
+type OpenShiftManagedCluster struct {
+ autorest.Response `json:"-"`
+ // Plan - Define the resource plan as required by ARM for billing purposes
+ Plan *PurchasePlan `json:"plan,omitempty"`
+ // OpenShiftManagedClusterProperties - Properties of a OpenShift managed cluster.
+ *OpenShiftManagedClusterProperties `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 OpenShiftManagedCluster.
+func (osmc OpenShiftManagedCluster) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if osmc.Plan != nil {
+ objectMap["plan"] = osmc.Plan
+ }
+ if osmc.OpenShiftManagedClusterProperties != nil {
+ objectMap["properties"] = osmc.OpenShiftManagedClusterProperties
+ }
+ if osmc.Location != nil {
+ objectMap["location"] = osmc.Location
+ }
+ if osmc.Tags != nil {
+ objectMap["tags"] = osmc.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for OpenShiftManagedCluster struct.
+func (osmc *OpenShiftManagedCluster) UnmarshalJSON(body []byte) error {
+ 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 PurchasePlan
+ err = json.Unmarshal(*v, &plan)
+ if err != nil {
+ return err
+ }
+ osmc.Plan = &plan
+ }
+ case "properties":
+ if v != nil {
+ var openShiftManagedClusterProperties OpenShiftManagedClusterProperties
+ err = json.Unmarshal(*v, &openShiftManagedClusterProperties)
+ if err != nil {
+ return err
+ }
+ osmc.OpenShiftManagedClusterProperties = &openShiftManagedClusterProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ osmc.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ osmc.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ osmc.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ osmc.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ osmc.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// OpenShiftManagedClusterAADIdentityProvider defines the Identity provider for MS AAD.
+type OpenShiftManagedClusterAADIdentityProvider struct {
+ // ClientID - The clientId password associated with the provider.
+ ClientID *string `json:"clientId,omitempty"`
+ // Secret - The secret password associated with the provider.
+ Secret *string `json:"secret,omitempty"`
+ // TenantID - The tenantId associated with the provider.
+ TenantID *string `json:"tenantId,omitempty"`
+ // CustomerAdminGroupID - The groupId to be granted cluster admin role.
+ CustomerAdminGroupID *string `json:"customerAdminGroupId,omitempty"`
+ // Kind - Possible values include: 'KindOpenShiftManagedClusterBaseIdentityProvider', 'KindAADIdentityProvider'
+ Kind Kind `json:"kind,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for OpenShiftManagedClusterAADIdentityProvider.
+func (osmcaip OpenShiftManagedClusterAADIdentityProvider) MarshalJSON() ([]byte, error) {
+ osmcaip.Kind = KindAADIdentityProvider
+ objectMap := make(map[string]interface{})
+ if osmcaip.ClientID != nil {
+ objectMap["clientId"] = osmcaip.ClientID
+ }
+ if osmcaip.Secret != nil {
+ objectMap["secret"] = osmcaip.Secret
+ }
+ if osmcaip.TenantID != nil {
+ objectMap["tenantId"] = osmcaip.TenantID
+ }
+ if osmcaip.CustomerAdminGroupID != nil {
+ objectMap["customerAdminGroupId"] = osmcaip.CustomerAdminGroupID
+ }
+ if osmcaip.Kind != "" {
+ objectMap["kind"] = osmcaip.Kind
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsOpenShiftManagedClusterAADIdentityProvider is the BasicOpenShiftManagedClusterBaseIdentityProvider implementation for OpenShiftManagedClusterAADIdentityProvider.
+func (osmcaip OpenShiftManagedClusterAADIdentityProvider) AsOpenShiftManagedClusterAADIdentityProvider() (*OpenShiftManagedClusterAADIdentityProvider, bool) {
+ return &osmcaip, true
+}
+
+// AsOpenShiftManagedClusterBaseIdentityProvider is the BasicOpenShiftManagedClusterBaseIdentityProvider implementation for OpenShiftManagedClusterAADIdentityProvider.
+func (osmcaip OpenShiftManagedClusterAADIdentityProvider) AsOpenShiftManagedClusterBaseIdentityProvider() (*OpenShiftManagedClusterBaseIdentityProvider, bool) {
+ return nil, false
+}
+
+// AsBasicOpenShiftManagedClusterBaseIdentityProvider is the BasicOpenShiftManagedClusterBaseIdentityProvider implementation for OpenShiftManagedClusterAADIdentityProvider.
+func (osmcaip OpenShiftManagedClusterAADIdentityProvider) AsBasicOpenShiftManagedClusterBaseIdentityProvider() (BasicOpenShiftManagedClusterBaseIdentityProvider, bool) {
+ return &osmcaip, true
+}
+
+// OpenShiftManagedClusterAgentPoolProfile defines the configuration of the OpenShift cluster VMs.
+type OpenShiftManagedClusterAgentPoolProfile struct {
+ // Name - Unique name of the pool profile in the context of the subscription and resource group.
+ Name *string `json:"name,omitempty"`
+ // Count - Number of agents (VMs) to host docker containers.
+ Count *int32 `json:"count,omitempty"`
+ // VMSize - Size of agent VMs. Possible values include: 'StandardD2sV3', 'StandardD4sV3', 'StandardD8sV3', 'StandardD16sV3', 'StandardD32sV3', 'StandardD64sV3', 'StandardDS4V2', 'StandardDS5V2', 'StandardF8sV2', 'StandardF16sV2', 'StandardF32sV2', 'StandardF64sV2', 'StandardF72sV2', 'StandardF8s', 'StandardF16s', 'StandardE4sV3', 'StandardE8sV3', 'StandardE16sV3', 'StandardE20sV3', 'StandardE32sV3', 'StandardE64sV3', 'StandardGS2', 'StandardGS3', 'StandardGS4', 'StandardGS5', 'StandardDS12V2', 'StandardDS13V2', 'StandardDS14V2', 'StandardDS15V2', 'StandardL4s', 'StandardL8s', 'StandardL16s', 'StandardL32s'
+ VMSize OpenShiftContainerServiceVMSize `json:"vmSize,omitempty"`
+ // SubnetCidr - Subnet CIDR for the peering.
+ SubnetCidr *string `json:"subnetCidr,omitempty"`
+ // OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows'
+ OsType OSType `json:"osType,omitempty"`
+ // Role - Define the role of the AgentPoolProfile. Possible values include: 'Compute', 'Infra'
+ Role OpenShiftAgentPoolProfileRole `json:"role,omitempty"`
+}
+
+// OpenShiftManagedClusterAuthProfile defines all possible authentication profiles for the OpenShift
+// cluster.
+type OpenShiftManagedClusterAuthProfile struct {
+ // IdentityProviders - Type of authentication profile to use.
+ IdentityProviders *[]OpenShiftManagedClusterIdentityProvider `json:"identityProviders,omitempty"`
+}
+
+// BasicOpenShiftManagedClusterBaseIdentityProvider structure for any Identity provider.
+type BasicOpenShiftManagedClusterBaseIdentityProvider interface {
+ AsOpenShiftManagedClusterAADIdentityProvider() (*OpenShiftManagedClusterAADIdentityProvider, bool)
+ AsOpenShiftManagedClusterBaseIdentityProvider() (*OpenShiftManagedClusterBaseIdentityProvider, bool)
+}
+
+// OpenShiftManagedClusterBaseIdentityProvider structure for any Identity provider.
+type OpenShiftManagedClusterBaseIdentityProvider struct {
+ // Kind - Possible values include: 'KindOpenShiftManagedClusterBaseIdentityProvider', 'KindAADIdentityProvider'
+ Kind Kind `json:"kind,omitempty"`
+}
+
+func unmarshalBasicOpenShiftManagedClusterBaseIdentityProvider(body []byte) (BasicOpenShiftManagedClusterBaseIdentityProvider, error) {
+ var m map[string]interface{}
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return nil, err
+ }
+
+ switch m["kind"] {
+ case string(KindAADIdentityProvider):
+ var osmcaip OpenShiftManagedClusterAADIdentityProvider
+ err := json.Unmarshal(body, &osmcaip)
+ return osmcaip, err
+ default:
+ var osmcbip OpenShiftManagedClusterBaseIdentityProvider
+ err := json.Unmarshal(body, &osmcbip)
+ return osmcbip, err
+ }
+}
+func unmarshalBasicOpenShiftManagedClusterBaseIdentityProviderArray(body []byte) ([]BasicOpenShiftManagedClusterBaseIdentityProvider, error) {
+ var rawMessages []*json.RawMessage
+ err := json.Unmarshal(body, &rawMessages)
+ if err != nil {
+ return nil, err
+ }
+
+ osmcbipArray := make([]BasicOpenShiftManagedClusterBaseIdentityProvider, len(rawMessages))
+
+ for index, rawMessage := range rawMessages {
+ osmcbip, err := unmarshalBasicOpenShiftManagedClusterBaseIdentityProvider(*rawMessage)
+ if err != nil {
+ return nil, err
+ }
+ osmcbipArray[index] = osmcbip
+ }
+ return osmcbipArray, nil
+}
+
+// MarshalJSON is the custom marshaler for OpenShiftManagedClusterBaseIdentityProvider.
+func (osmcbip OpenShiftManagedClusterBaseIdentityProvider) MarshalJSON() ([]byte, error) {
+ osmcbip.Kind = KindOpenShiftManagedClusterBaseIdentityProvider
+ objectMap := make(map[string]interface{})
+ if osmcbip.Kind != "" {
+ objectMap["kind"] = osmcbip.Kind
+ }
+ return json.Marshal(objectMap)
+}
+
+// AsOpenShiftManagedClusterAADIdentityProvider is the BasicOpenShiftManagedClusterBaseIdentityProvider implementation for OpenShiftManagedClusterBaseIdentityProvider.
+func (osmcbip OpenShiftManagedClusterBaseIdentityProvider) AsOpenShiftManagedClusterAADIdentityProvider() (*OpenShiftManagedClusterAADIdentityProvider, bool) {
+ return nil, false
+}
+
+// AsOpenShiftManagedClusterBaseIdentityProvider is the BasicOpenShiftManagedClusterBaseIdentityProvider implementation for OpenShiftManagedClusterBaseIdentityProvider.
+func (osmcbip OpenShiftManagedClusterBaseIdentityProvider) AsOpenShiftManagedClusterBaseIdentityProvider() (*OpenShiftManagedClusterBaseIdentityProvider, bool) {
+ return &osmcbip, true
+}
+
+// AsBasicOpenShiftManagedClusterBaseIdentityProvider is the BasicOpenShiftManagedClusterBaseIdentityProvider implementation for OpenShiftManagedClusterBaseIdentityProvider.
+func (osmcbip OpenShiftManagedClusterBaseIdentityProvider) AsBasicOpenShiftManagedClusterBaseIdentityProvider() (BasicOpenShiftManagedClusterBaseIdentityProvider, bool) {
+ return &osmcbip, true
+}
+
+// OpenShiftManagedClusterIdentityProvider defines the configuration of the identity providers to be used
+// in the OpenShift cluster.
+type OpenShiftManagedClusterIdentityProvider struct {
+ // Name - Name of the provider.
+ Name *string `json:"name,omitempty"`
+ // Provider - Configuration of the provider.
+ Provider BasicOpenShiftManagedClusterBaseIdentityProvider `json:"provider,omitempty"`
+}
+
+// UnmarshalJSON is the custom unmarshaler for OpenShiftManagedClusterIdentityProvider struct.
+func (osmcip *OpenShiftManagedClusterIdentityProvider) UnmarshalJSON(body []byte) error {
+ 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
+ }
+ osmcip.Name = &name
+ }
+ case "provider":
+ if v != nil {
+ provider, err := unmarshalBasicOpenShiftManagedClusterBaseIdentityProvider(*v)
+ if err != nil {
+ return err
+ }
+ osmcip.Provider = provider
+ }
+ }
+ }
+
+ return nil
+}
+
+// OpenShiftManagedClusterListResult the response from the List OpenShift Managed Clusters operation.
+type OpenShiftManagedClusterListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of OpenShift managed clusters.
+ Value *[]OpenShiftManagedCluster `json:"value,omitempty"`
+ // NextLink - READ-ONLY; The URL to get the next set of OpenShift managed cluster results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// OpenShiftManagedClusterListResultIterator provides access to a complete listing of
+// OpenShiftManagedCluster values.
+type OpenShiftManagedClusterListResultIterator struct {
+ i int
+ page OpenShiftManagedClusterListResultPage
+}
+
+// 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 *OpenShiftManagedClusterListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClusterListResultIterator.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 *OpenShiftManagedClusterListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter OpenShiftManagedClusterListResultIterator) 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 OpenShiftManagedClusterListResultIterator) Response() OpenShiftManagedClusterListResult {
+ 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 OpenShiftManagedClusterListResultIterator) Value() OpenShiftManagedCluster {
+ if !iter.page.NotDone() {
+ return OpenShiftManagedCluster{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the OpenShiftManagedClusterListResultIterator type.
+func NewOpenShiftManagedClusterListResultIterator(page OpenShiftManagedClusterListResultPage) OpenShiftManagedClusterListResultIterator {
+ return OpenShiftManagedClusterListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (osmclr OpenShiftManagedClusterListResult) IsEmpty() bool {
+ return osmclr.Value == nil || len(*osmclr.Value) == 0
+}
+
+// openShiftManagedClusterListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (osmclr OpenShiftManagedClusterListResult) openShiftManagedClusterListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if osmclr.NextLink == nil || len(to.String(osmclr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(osmclr.NextLink)))
+}
+
+// OpenShiftManagedClusterListResultPage contains a page of OpenShiftManagedCluster values.
+type OpenShiftManagedClusterListResultPage struct {
+ fn func(context.Context, OpenShiftManagedClusterListResult) (OpenShiftManagedClusterListResult, error)
+ osmclr OpenShiftManagedClusterListResult
+}
+
+// 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 *OpenShiftManagedClusterListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClusterListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.osmclr)
+ if err != nil {
+ return err
+ }
+ page.osmclr = next
+ 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 *OpenShiftManagedClusterListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page OpenShiftManagedClusterListResultPage) NotDone() bool {
+ return !page.osmclr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page OpenShiftManagedClusterListResultPage) Response() OpenShiftManagedClusterListResult {
+ return page.osmclr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page OpenShiftManagedClusterListResultPage) Values() []OpenShiftManagedCluster {
+ if page.osmclr.IsEmpty() {
+ return nil
+ }
+ return *page.osmclr.Value
+}
+
+// Creates a new instance of the OpenShiftManagedClusterListResultPage type.
+func NewOpenShiftManagedClusterListResultPage(getNextPage func(context.Context, OpenShiftManagedClusterListResult) (OpenShiftManagedClusterListResult, error)) OpenShiftManagedClusterListResultPage {
+ return OpenShiftManagedClusterListResultPage{fn: getNextPage}
+}
+
+// OpenShiftManagedClusterMasterPoolProfile openShiftManagedClusterMaterPoolProfile contains configuration
+// for OpenShift master VMs.
+type OpenShiftManagedClusterMasterPoolProfile struct {
+ // Name - Unique name of the master pool profile in the context of the subscription and resource group.
+ Name *string `json:"name,omitempty"`
+ // Count - Number of masters (VMs) to host docker containers. The default value is 3.
+ Count *int32 `json:"count,omitempty"`
+ // VMSize - Size of agent VMs. Possible values include: 'StandardD2sV3', 'StandardD4sV3', 'StandardD8sV3', 'StandardD16sV3', 'StandardD32sV3', 'StandardD64sV3', 'StandardDS4V2', 'StandardDS5V2', 'StandardF8sV2', 'StandardF16sV2', 'StandardF32sV2', 'StandardF64sV2', 'StandardF72sV2', 'StandardF8s', 'StandardF16s', 'StandardE4sV3', 'StandardE8sV3', 'StandardE16sV3', 'StandardE20sV3', 'StandardE32sV3', 'StandardE64sV3', 'StandardGS2', 'StandardGS3', 'StandardGS4', 'StandardGS5', 'StandardDS12V2', 'StandardDS13V2', 'StandardDS14V2', 'StandardDS15V2', 'StandardL4s', 'StandardL8s', 'StandardL16s', 'StandardL32s'
+ VMSize OpenShiftContainerServiceVMSize `json:"vmSize,omitempty"`
+ // SubnetCidr - Subnet CIDR for the peering.
+ SubnetCidr *string `json:"subnetCidr,omitempty"`
+ // OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows'
+ OsType OSType `json:"osType,omitempty"`
+}
+
+// OpenShiftManagedClusterProperties properties of the OpenShift managed cluster.
+type OpenShiftManagedClusterProperties struct {
+ // ProvisioningState - READ-ONLY; The current deployment or provisioning state, which only appears in the response.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // OpenShiftVersion - Version of OpenShift specified when creating the cluster.
+ OpenShiftVersion *string `json:"openShiftVersion,omitempty"`
+ // ClusterVersion - READ-ONLY; Version of OpenShift specified when creating the cluster.
+ ClusterVersion *string `json:"clusterVersion,omitempty"`
+ // PublicHostname - READ-ONLY; Service generated FQDN for OpenShift API server.
+ PublicHostname *string `json:"publicHostname,omitempty"`
+ // Fqdn - READ-ONLY; Service generated FQDN for OpenShift API server loadbalancer internal hostname.
+ Fqdn *string `json:"fqdn,omitempty"`
+ // NetworkProfile - Configuration for OpenShift networking.
+ NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"`
+ // RouterProfiles - Configuration for OpenShift router(s).
+ RouterProfiles *[]OpenShiftRouterProfile `json:"routerProfiles,omitempty"`
+ // MasterPoolProfile - Configuration for OpenShift master VMs.
+ MasterPoolProfile *OpenShiftManagedClusterMasterPoolProfile `json:"masterPoolProfile,omitempty"`
+ // AgentPoolProfiles - Configuration of OpenShift cluster VMs.
+ AgentPoolProfiles *[]OpenShiftManagedClusterAgentPoolProfile `json:"agentPoolProfiles,omitempty"`
+ // AuthProfile - Configures OpenShift authentication.
+ AuthProfile *OpenShiftManagedClusterAuthProfile `json:"authProfile,omitempty"`
+}
+
+// OpenShiftManagedClustersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
+// a long-running operation.
+type OpenShiftManagedClustersCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *OpenShiftManagedClustersCreateOrUpdateFuture) Result(client OpenShiftManagedClustersClient) (osmc OpenShiftManagedCluster, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("containerservice.OpenShiftManagedClustersCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osmc.Response.Response, err = future.GetResult(sender); err == nil && osmc.Response.Response.StatusCode != http.StatusNoContent {
+ osmc, err = client.CreateOrUpdateResponder(osmc.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersCreateOrUpdateFuture", "Result", osmc.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// OpenShiftManagedClustersDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type OpenShiftManagedClustersDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *OpenShiftManagedClustersDeleteFuture) Result(client OpenShiftManagedClustersClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("containerservice.OpenShiftManagedClustersDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// OpenShiftManagedClustersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type OpenShiftManagedClustersUpdateTagsFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *OpenShiftManagedClustersUpdateTagsFuture) Result(client OpenShiftManagedClustersClient) (osmc OpenShiftManagedCluster, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersUpdateTagsFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("containerservice.OpenShiftManagedClustersUpdateTagsFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if osmc.Response.Response, err = future.GetResult(sender); err == nil && osmc.Response.Response.StatusCode != http.StatusNoContent {
+ osmc, err = client.UpdateTagsResponder(osmc.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersUpdateTagsFuture", "Result", osmc.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// OpenShiftRouterProfile represents an OpenShift router
+type OpenShiftRouterProfile struct {
+ // Name - Name of the router profile.
+ Name *string `json:"name,omitempty"`
+ // PublicSubdomain - READ-ONLY; DNS subdomain for OpenShift router.
+ PublicSubdomain *string `json:"publicSubdomain,omitempty"`
+ // Fqdn - READ-ONLY; Auto-allocated FQDN for the OpenShift router.
+ Fqdn *string `json:"fqdn,omitempty"`
+}
+
+// OperationListResult the List Compute Operation operation response.
+type OperationListResult struct {
+ autorest.Response `json:"-"`
+ // Value - READ-ONLY; The list of compute operations
+ Value *[]OperationValue `json:"value,omitempty"`
+}
+
+// OperationValue describes the properties of a Compute Operation value.
+type OperationValue struct {
+ // Origin - READ-ONLY; The origin of the compute operation.
+ Origin *string `json:"origin,omitempty"`
+ // Name - READ-ONLY; The name of the compute operation.
+ Name *string `json:"name,omitempty"`
+ // OperationValueDisplay - Describes the properties of a Compute Operation Value Display.
+ *OperationValueDisplay `json:"display,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for OperationValue.
+func (ov OperationValue) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ov.OperationValueDisplay != nil {
+ objectMap["display"] = ov.OperationValueDisplay
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for OperationValue struct.
+func (ov *OperationValue) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "origin":
+ if v != nil {
+ var origin string
+ err = json.Unmarshal(*v, &origin)
+ if err != nil {
+ return err
+ }
+ ov.Origin = &origin
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ ov.Name = &name
+ }
+ case "display":
+ if v != nil {
+ var operationValueDisplay OperationValueDisplay
+ err = json.Unmarshal(*v, &operationValueDisplay)
+ if err != nil {
+ return err
+ }
+ ov.OperationValueDisplay = &operationValueDisplay
+ }
+ }
+ }
+
+ return nil
+}
+
+// OperationValueDisplay describes the properties of a Compute Operation Value Display.
+type OperationValueDisplay struct {
+ // Operation - READ-ONLY; The display name of the compute operation.
+ Operation *string `json:"operation,omitempty"`
+ // Resource - READ-ONLY; The display name of the resource the operation applies to.
+ Resource *string `json:"resource,omitempty"`
+ // Description - READ-ONLY; The description of the operation.
+ Description *string `json:"description,omitempty"`
+ // Provider - READ-ONLY; The resource provider for the operation.
+ Provider *string `json:"provider,omitempty"`
+}
+
+// OrchestratorProfile contains information about orchestrator.
+type OrchestratorProfile struct {
+ // OrchestratorType - Orchestrator type.
+ OrchestratorType *string `json:"orchestratorType,omitempty"`
+ // OrchestratorVersion - Orchestrator version (major, minor, patch).
+ OrchestratorVersion *string `json:"orchestratorVersion,omitempty"`
+ // IsPreview - Whether Kubernetes version is currently in preview.
+ IsPreview *bool `json:"isPreview,omitempty"`
+}
+
+// OrchestratorProfileType profile for the container service orchestrator.
+type OrchestratorProfileType struct {
+ // OrchestratorType - The orchestrator to use to manage container service cluster resources. Valid values are Kubernetes, Swarm, DCOS, DockerCE and Custom. Possible values include: 'Kubernetes', 'Swarm', 'DCOS', 'DockerCE', 'Custom'
+ OrchestratorType OrchestratorTypes `json:"orchestratorType,omitempty"`
+ // OrchestratorVersion - The version of the orchestrator to use. You can specify the major.minor.patch part of the actual version.For example, you can specify version as "1.6.11".
+ OrchestratorVersion *string `json:"orchestratorVersion,omitempty"`
+}
+
+// OrchestratorVersionProfile the profile of an orchestrator and its available versions.
+type OrchestratorVersionProfile struct {
+ // OrchestratorType - Orchestrator type.
+ OrchestratorType *string `json:"orchestratorType,omitempty"`
+ // OrchestratorVersion - Orchestrator version (major, minor, patch).
+ OrchestratorVersion *string `json:"orchestratorVersion,omitempty"`
+ // Default - Installed by default if version is not specified.
+ Default *bool `json:"default,omitempty"`
+ // IsPreview - Whether Kubernetes version is currently in preview.
+ IsPreview *bool `json:"isPreview,omitempty"`
+ // Upgrades - The list of available upgrade versions.
+ Upgrades *[]OrchestratorProfile `json:"upgrades,omitempty"`
+}
+
+// OrchestratorVersionProfileListResult the list of versions for supported orchestrators.
+type OrchestratorVersionProfileListResult struct {
+ autorest.Response `json:"-"`
+ // ID - READ-ONLY; Id of the orchestrator version profile list result.
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Name of the orchestrator version profile list result.
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Type of the orchestrator version profile list result.
+ Type *string `json:"type,omitempty"`
+ // OrchestratorVersionProfileProperties - The properties of an orchestrator version profile.
+ *OrchestratorVersionProfileProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for OrchestratorVersionProfileListResult.
+func (ovplr OrchestratorVersionProfileListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ovplr.OrchestratorVersionProfileProperties != nil {
+ objectMap["properties"] = ovplr.OrchestratorVersionProfileProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for OrchestratorVersionProfileListResult struct.
+func (ovplr *OrchestratorVersionProfileListResult) UnmarshalJSON(body []byte) error {
+ 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
+ }
+ ovplr.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ ovplr.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ ovplr.Type = &typeVar
+ }
+ case "properties":
+ if v != nil {
+ var orchestratorVersionProfileProperties OrchestratorVersionProfileProperties
+ err = json.Unmarshal(*v, &orchestratorVersionProfileProperties)
+ if err != nil {
+ return err
+ }
+ ovplr.OrchestratorVersionProfileProperties = &orchestratorVersionProfileProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// OrchestratorVersionProfileProperties the properties of an orchestrator version profile.
+type OrchestratorVersionProfileProperties struct {
+ // Orchestrators - List of orchestrator version profiles.
+ Orchestrators *[]OrchestratorVersionProfile `json:"orchestrators,omitempty"`
+}
+
+// Properties properties of the container service.
+type Properties struct {
+ // ProvisioningState - READ-ONLY; The current deployment or provisioning state, which only appears in the response.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // OrchestratorProfile - Profile for the container service orchestrator.
+ OrchestratorProfile *OrchestratorProfileType `json:"orchestratorProfile,omitempty"`
+ // CustomProfile - Properties to configure a custom container service cluster.
+ CustomProfile *CustomProfile `json:"customProfile,omitempty"`
+ // ServicePrincipalProfile - Information about a service principal identity for the cluster to use for manipulating Azure APIs. Exact one of secret or keyVaultSecretRef need to be specified.
+ ServicePrincipalProfile *ServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"`
+ // MasterProfile - Profile for the container service master.
+ MasterProfile *MasterProfile `json:"masterProfile,omitempty"`
+ // AgentPoolProfiles - Properties of the agent pool.
+ AgentPoolProfiles *[]AgentPoolProfile `json:"agentPoolProfiles,omitempty"`
+ // WindowsProfile - Profile for Windows VMs in the container service cluster.
+ WindowsProfile *WindowsProfile `json:"windowsProfile,omitempty"`
+ // LinuxProfile - Profile for Linux VMs in the container service cluster.
+ LinuxProfile *LinuxProfile `json:"linuxProfile,omitempty"`
+ // DiagnosticsProfile - Profile for diagnostics in the container service cluster.
+ DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
+}
+
+// PurchasePlan used for establishing the purchase context of any 3rd Party artifact through MarketPlace.
+type PurchasePlan struct {
+ // Name - The plan ID.
+ Name *string `json:"name,omitempty"`
+ // Product - Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element.
+ Product *string `json:"product,omitempty"`
+ // PromotionCode - The promotion code.
+ PromotionCode *string `json:"promotionCode,omitempty"`
+ // Publisher - The plan ID.
+ Publisher *string `json:"publisher,omitempty"`
+}
+
+// Resource the Resource model definition.
+type Resource struct {
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for Resource.
+func (r Resource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if r.Location != nil {
+ objectMap["location"] = r.Location
+ }
+ if r.Tags != nil {
+ objectMap["tags"] = r.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// ResourceReference a reference to an Azure resource.
+type ResourceReference struct {
+ // ID - The fully qualified Azure resource id.
+ ID *string `json:"id,omitempty"`
+}
+
+// ServicePrincipalProfile information about a service principal identity for the cluster to use for
+// manipulating Azure APIs. Either secret or keyVaultSecretRef must be specified.
+type ServicePrincipalProfile struct {
+ // ClientID - The ID for the service principal.
+ ClientID *string `json:"clientId,omitempty"`
+ // Secret - The secret password associated with the service principal in plain text.
+ Secret *string `json:"secret,omitempty"`
+ // KeyVaultSecretRef - Reference to a secret stored in Azure Key Vault.
+ KeyVaultSecretRef *KeyVaultSecretRef `json:"keyVaultSecretRef,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. Only expect one key specified.
+ PublicKeys *[]SSHPublicKey `json:"publicKeys,omitempty"`
+}
+
+// SSHPublicKey contains information about SSH certificate public key data.
+type SSHPublicKey struct {
+ // KeyData - Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers.
+ KeyData *string `json:"keyData,omitempty"`
+}
+
+// SubResource reference to another subresource.
+type SubResource struct {
+ // ID - READ-ONLY; Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+}
+
+// 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)
+}
+
+// UserAssignedIdentity ...
+type UserAssignedIdentity struct {
+ // ResourceID - The resource id of the user assigned identity.
+ ResourceID *string `json:"resourceId,omitempty"`
+ // ClientID - The client id of the user assigned identity.
+ ClientID *string `json:"clientId,omitempty"`
+ // ObjectID - The object id of the user assigned identity.
+ ObjectID *string `json:"objectId,omitempty"`
+}
+
+// VMDiagnostics profile for diagnostics on the container service VMs.
+type VMDiagnostics struct {
+ // Enabled - Whether the VM diagnostic agent is provisioned on the VM.
+ Enabled *bool `json:"enabled,omitempty"`
+ // StorageURI - READ-ONLY; The URI of the storage account where diagnostics are stored.
+ StorageURI *string `json:"storageUri,omitempty"`
+}
+
+// WindowsProfile profile for Windows VMs in the container service cluster.
+type WindowsProfile struct {
+ // AdminUsername - The administrator username to use for Windows VMs.
+ AdminUsername *string `json:"adminUsername,omitempty"`
+ // AdminPassword - The administrator password to use for Windows VMs.
+ AdminPassword *string `json:"adminPassword,omitempty"`
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/openshiftmanagedclusters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/openshiftmanagedclusters.go
new file mode 100644
index 000000000..bec338c65
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/openshiftmanagedclusters.go
@@ -0,0 +1,613 @@
+package containerservice
+
+// 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"
+)
+
+// OpenShiftManagedClustersClient is the the Container Service Client.
+type OpenShiftManagedClustersClient struct {
+ BaseClient
+}
+
+// NewOpenShiftManagedClustersClient creates an instance of the OpenShiftManagedClustersClient client.
+func NewOpenShiftManagedClustersClient(subscriptionID string) OpenShiftManagedClustersClient {
+ return NewOpenShiftManagedClustersClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewOpenShiftManagedClustersClientWithBaseURI creates an instance of the OpenShiftManagedClustersClient 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 NewOpenShiftManagedClustersClientWithBaseURI(baseURI string, subscriptionID string) OpenShiftManagedClustersClient {
+ return OpenShiftManagedClustersClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates a OpenShift managed cluster with the specified configuration for agents and
+// OpenShift version.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the OpenShift managed cluster resource.
+// parameters - parameters supplied to the Create or Update an OpenShift Managed Cluster operation.
+func (client OpenShiftManagedClustersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, parameters OpenShiftManagedCluster) (result OpenShiftManagedClustersCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClustersClient.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.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.OpenShiftManagedClusterProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.OpenShiftManagedClusterProperties.OpenShiftVersion", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.OpenShiftManagedClusterProperties.MasterPoolProfile", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.OpenShiftManagedClusterProperties.MasterPoolProfile.Count", Name: validation.Null, Rule: true, Chain: nil}}},
+ }}}}}); err != nil {
+ return result, validation.NewError("containerservice.OpenShiftManagedClustersClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, resourceName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client OpenShiftManagedClustersClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, resourceName string, parameters OpenShiftManagedCluster) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-04-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.ContainerService/openShiftManagedClusters/{resourceName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client OpenShiftManagedClustersClient) CreateOrUpdateSender(req *http.Request) (future OpenShiftManagedClustersCreateOrUpdateFuture, 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 OpenShiftManagedClustersClient) CreateOrUpdateResponder(resp *http.Response) (result OpenShiftManagedCluster, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete deletes the OpenShift managed cluster with a specified resource group and name.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the OpenShift managed cluster resource.
+func (client OpenShiftManagedClustersClient) Delete(ctx context.Context, resourceGroupName string, resourceName string) (result OpenShiftManagedClustersDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClustersClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.OpenShiftManagedClustersClient", "Delete", err.Error())
+ }
+
+ req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client OpenShiftManagedClustersClient) DeletePreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-04-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.ContainerService/openShiftManagedClusters/{resourceName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client OpenShiftManagedClustersClient) DeleteSender(req *http.Request) (future OpenShiftManagedClustersDeleteFuture, 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 OpenShiftManagedClustersClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get gets the details of the managed OpenShift cluster with a specified resource group and name.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the OpenShift managed cluster resource.
+func (client OpenShiftManagedClustersClient) Get(ctx context.Context, resourceGroupName string, resourceName string) (result OpenShiftManagedCluster, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClustersClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.OpenShiftManagedClustersClient", "Get", err.Error())
+ }
+
+ req, err := client.GetPreparer(ctx, resourceGroupName, resourceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client OpenShiftManagedClustersClient) GetPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-04-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.ContainerService/openShiftManagedClusters/{resourceName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client OpenShiftManagedClustersClient) 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 OpenShiftManagedClustersClient) GetResponder(resp *http.Response) (result OpenShiftManagedCluster, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List gets a list of OpenShift managed clusters in the specified subscription. The operation returns properties of
+// each OpenShift managed cluster.
+func (client OpenShiftManagedClustersClient) List(ctx context.Context) (result OpenShiftManagedClusterListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClustersClient.List")
+ defer func() {
+ sc := -1
+ if result.osmclr.Response.Response != nil {
+ sc = result.osmclr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.osmclr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.osmclr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client OpenShiftManagedClustersClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-04-30"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/openShiftManagedClusters", 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 OpenShiftManagedClustersClient) 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 OpenShiftManagedClustersClient) ListResponder(resp *http.Response) (result OpenShiftManagedClusterListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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 OpenShiftManagedClustersClient) listNextResults(ctx context.Context, lastResults OpenShiftManagedClusterListResult) (result OpenShiftManagedClusterListResult, err error) {
+ req, err := lastResults.openShiftManagedClusterListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client OpenShiftManagedClustersClient) ListComplete(ctx context.Context) (result OpenShiftManagedClusterListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClustersClient.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 OpenShift managed clusters in the specified subscription and resource group. The operation
+// returns properties of each OpenShift managed cluster.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client OpenShiftManagedClustersClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result OpenShiftManagedClusterListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClustersClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.osmclr.Response.Response != nil {
+ sc = result.osmclr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.OpenShiftManagedClustersClient", "ListByResourceGroup", err.Error())
+ }
+
+ result.fn = client.listByResourceGroupNextResults
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.osmclr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.osmclr, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "ListByResourceGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client OpenShiftManagedClustersClient) 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 = "2019-04-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.ContainerService/openShiftManagedClusters", 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 OpenShiftManagedClustersClient) 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 OpenShiftManagedClustersClient) ListByResourceGroupResponder(resp *http.Response) (result OpenShiftManagedClusterListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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 OpenShiftManagedClustersClient) listByResourceGroupNextResults(ctx context.Context, lastResults OpenShiftManagedClusterListResult) (result OpenShiftManagedClusterListResult, err error) {
+ req, err := lastResults.openShiftManagedClusterListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client OpenShiftManagedClustersClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result OpenShiftManagedClusterListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClustersClient.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 OpenShift managed cluster with the specified tags.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the OpenShift managed cluster resource.
+// parameters - parameters supplied to the Update OpenShift Managed Cluster Tags operation.
+func (client OpenShiftManagedClustersClient) UpdateTags(ctx context.Context, resourceGroupName string, resourceName string, parameters TagsObject) (result OpenShiftManagedClustersUpdateTagsFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClustersClient.UpdateTags")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.OpenShiftManagedClustersClient", "UpdateTags", err.Error())
+ }
+
+ req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, resourceName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "UpdateTags", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateTagsSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "UpdateTags", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdateTagsPreparer prepares the UpdateTags request.
+func (client OpenShiftManagedClustersClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, resourceName string, parameters TagsObject) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-04-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.ContainerService/openShiftManagedClusters/{resourceName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateTagsSender sends the UpdateTags request. The method will close the
+// http.Response Body if it receives an error.
+func (client OpenShiftManagedClustersClient) UpdateTagsSender(req *http.Request) (future OpenShiftManagedClustersUpdateTagsFuture, 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 OpenShiftManagedClustersClient) UpdateTagsResponder(resp *http.Response) (result OpenShiftManagedCluster, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/containerservice/mgmt/2020-04-01/containerservice/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/operations.go
new file mode 100644
index 000000000..a090960e6
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/operations.go
@@ -0,0 +1,109 @@
+package containerservice
+
+// 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"
+)
+
+// OperationsClient is the the Container Service Client.
+type OperationsClient struct {
+ BaseClient
+}
+
+// NewOperationsClient creates an instance of the OperationsClient client.
+func NewOperationsClient(subscriptionID string) OperationsClient {
+ return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client using a custom endpoint. Use this
+// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
+func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient {
+ return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// List gets a list of compute operations.
+func (client OperationsClient) List(ctx context.Context) (result OperationListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.OperationsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.OperationsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.OperationsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ const APIVersion = "2020-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.ContainerService/operations"),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/containerservice/mgmt/2020-04-01/containerservice/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/version.go
new file mode 100644
index 000000000..57f38f2e7
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/version.go
@@ -0,0 +1,30 @@
+package containerservice
+
+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() + " containerservice/2020-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/network/mgmt/2019-06-01/network/applicationgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/applicationgateways.go
index b3c1d5aa8..8c65f4bef 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/applicationgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/applicationgateways.go
@@ -36,7 +36,9 @@ func NewApplicationGatewaysClient(subscriptionID string) ApplicationGatewaysClie
return NewApplicationGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewApplicationGatewaysClientWithBaseURI creates an instance of the ApplicationGatewaysClient client.
+// NewApplicationGatewaysClientWithBaseURI creates an instance of the ApplicationGatewaysClient 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 NewApplicationGatewaysClientWithBaseURI(baseURI string, subscriptionID string) ApplicationGatewaysClient {
return ApplicationGatewaysClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -99,9 +101,8 @@ func (client ApplicationGatewaysClient) BackendHealthPreparer(ctx context.Contex
// BackendHealthSender sends the BackendHealth request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) BackendHealthSender(req *http.Request) (future ApplicationGatewaysBackendHealthFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -184,9 +185,8 @@ func (client ApplicationGatewaysClient) BackendHealthOnDemandPreparer(ctx contex
// BackendHealthOnDemandSender sends the BackendHealthOnDemand request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) BackendHealthOnDemandSender(req *http.Request) (future ApplicationGatewaysBackendHealthOnDemandFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -232,20 +232,20 @@ func (client ApplicationGatewaysClient) CreateOrUpdate(ctx context.Context, reso
{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: 8, 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: 8, 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.InclusiveMinimum, Rule: 0, Chain: nil}}},
+ Chain: []validation.Constraint{{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: 0, Chain: nil}}},
+ 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: 2, Chain: nil}}},
+ 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())
@@ -292,9 +292,8 @@ func (client ApplicationGatewaysClient) CreateOrUpdatePreparer(ctx context.Conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) CreateOrUpdateSender(req *http.Request) (future ApplicationGatewaysCreateOrUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -369,9 +368,8 @@ func (client ApplicationGatewaysClient) DeletePreparer(ctx context.Context, reso
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) DeleteSender(req *http.Request) (future ApplicationGatewaysDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -451,8 +449,7 @@ func (client ApplicationGatewaysClient) GetPreparer(ctx context.Context, resourc
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -526,8 +523,7 @@ func (client ApplicationGatewaysClient) GetSslPredefinedPolicyPreparer(ctx conte
// GetSslPredefinedPolicySender sends the GetSslPredefinedPolicy request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) GetSslPredefinedPolicySender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetSslPredefinedPolicyResponder handles the response to the GetSslPredefinedPolicy request. The method always
@@ -602,8 +598,7 @@ func (client ApplicationGatewaysClient) ListPreparer(ctx context.Context, resour
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -712,8 +707,7 @@ func (client ApplicationGatewaysClient) ListAllPreparer(ctx context.Context) (*h
// ListAllSender sends the ListAll request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) ListAllSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListAllResponder handles the response to the ListAll request. The method always
@@ -821,8 +815,7 @@ func (client ApplicationGatewaysClient) ListAvailableRequestHeadersPreparer(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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListAvailableRequestHeadersResponder handles the response to the ListAvailableRequestHeaders request. The method always
@@ -893,8 +886,7 @@ func (client ApplicationGatewaysClient) ListAvailableResponseHeadersPreparer(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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListAvailableResponseHeadersResponder handles the response to the ListAvailableResponseHeaders request. The method always
@@ -965,8 +957,7 @@ func (client ApplicationGatewaysClient) ListAvailableServerVariablesPreparer(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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListAvailableServerVariablesResponder handles the response to the ListAvailableServerVariables request. The method always
@@ -1037,8 +1028,7 @@ func (client ApplicationGatewaysClient) ListAvailableSslOptionsPreparer(ctx cont
// ListAvailableSslOptionsSender sends the ListAvailableSslOptions request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) ListAvailableSslOptionsSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListAvailableSslOptionsResponder handles the response to the ListAvailableSslOptions request. The method always
@@ -1110,8 +1100,7 @@ func (client ApplicationGatewaysClient) ListAvailableSslPredefinedPoliciesPrepar
// ListAvailableSslPredefinedPoliciesSender sends the ListAvailableSslPredefinedPolicies request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) ListAvailableSslPredefinedPoliciesSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListAvailableSslPredefinedPoliciesResponder handles the response to the ListAvailableSslPredefinedPolicies request. The method always
@@ -1219,8 +1208,7 @@ func (client ApplicationGatewaysClient) ListAvailableWafRuleSetsPreparer(ctx con
// ListAvailableWafRuleSetsSender sends the ListAvailableWafRuleSets request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) ListAvailableWafRuleSetsSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListAvailableWafRuleSetsResponder handles the response to the ListAvailableWafRuleSets request. The method always
@@ -1290,9 +1278,8 @@ func (client ApplicationGatewaysClient) StartPreparer(ctx context.Context, resou
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) StartSender(req *http.Request) (future ApplicationGatewaysStartFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -1366,9 +1353,8 @@ func (client ApplicationGatewaysClient) StopPreparer(ctx context.Context, resour
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) StopSender(req *http.Request) (future ApplicationGatewaysStopFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -1445,9 +1431,8 @@ func (client ApplicationGatewaysClient) UpdateTagsPreparer(ctx context.Context,
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) UpdateTagsSender(req *http.Request) (future ApplicationGatewaysUpdateTagsFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/applicationsecuritygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/applicationsecuritygroups.go
index 41a47cf0f..706a092aa 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/applicationsecuritygroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/applicationsecuritygroups.go
@@ -35,7 +35,9 @@ func NewApplicationSecurityGroupsClient(subscriptionID string) ApplicationSecuri
return NewApplicationSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewApplicationSecurityGroupsClientWithBaseURI creates an instance of the ApplicationSecurityGroupsClient client.
+// NewApplicationSecurityGroupsClientWithBaseURI creates an instance of the ApplicationSecurityGroupsClient 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 NewApplicationSecurityGroupsClientWithBaseURI(baseURI string, subscriptionID string) ApplicationSecurityGroupsClient {
return ApplicationSecurityGroupsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -98,9 +100,8 @@ func (client ApplicationSecurityGroupsClient) CreateOrUpdatePreparer(ctx context
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationSecurityGroupsClient) CreateOrUpdateSender(req *http.Request) (future ApplicationSecurityGroupsCreateOrUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -175,9 +176,8 @@ func (client ApplicationSecurityGroupsClient) DeletePreparer(ctx context.Context
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationSecurityGroupsClient) DeleteSender(req *http.Request) (future ApplicationSecurityGroupsDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -257,8 +257,7 @@ func (client ApplicationSecurityGroupsClient) GetPreparer(ctx context.Context, r
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationSecurityGroupsClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -333,8 +332,7 @@ func (client ApplicationSecurityGroupsClient) ListPreparer(ctx context.Context,
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationSecurityGroupsClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -443,8 +441,7 @@ func (client ApplicationSecurityGroupsClient) ListAllPreparer(ctx context.Contex
// ListAllSender sends the ListAll request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationSecurityGroupsClient) ListAllSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListAllResponder handles the response to the ListAll request. The method always
@@ -554,9 +551,8 @@ func (client ApplicationSecurityGroupsClient) UpdateTagsPreparer(ctx context.Con
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availabledelegations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availabledelegations.go
index 747fd724a..7a04f311e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availabledelegations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availabledelegations.go
@@ -35,7 +35,9 @@ func NewAvailableDelegationsClient(subscriptionID string) AvailableDelegationsCl
return NewAvailableDelegationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewAvailableDelegationsClientWithBaseURI creates an instance of the AvailableDelegationsClient client.
+// 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)}
}
@@ -99,8 +101,7 @@ func (client AvailableDelegationsClient) ListPreparer(ctx context.Context, locat
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableendpointservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableendpointservices.go
index 79b645fbc..69d99c04a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableendpointservices.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableendpointservices.go
@@ -35,7 +35,9 @@ func NewAvailableEndpointServicesClient(subscriptionID string) AvailableEndpoint
return NewAvailableEndpointServicesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewAvailableEndpointServicesClientWithBaseURI creates an instance of the AvailableEndpointServicesClient client.
+// NewAvailableEndpointServicesClientWithBaseURI creates an instance of the AvailableEndpointServicesClient 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 NewAvailableEndpointServicesClientWithBaseURI(baseURI string, subscriptionID string) AvailableEndpointServicesClient {
return AvailableEndpointServicesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -99,8 +101,7 @@ func (client AvailableEndpointServicesClient) ListPreparer(ctx context.Context,
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client AvailableEndpointServicesClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableprivateendpointtypes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableprivateendpointtypes.go
index b7de98c4a..2f7960461 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableprivateendpointtypes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableprivateendpointtypes.go
@@ -36,7 +36,8 @@ func NewAvailablePrivateEndpointTypesClient(subscriptionID string) AvailablePriv
}
// NewAvailablePrivateEndpointTypesClientWithBaseURI creates an instance of the AvailablePrivateEndpointTypesClient
-// client.
+// 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 NewAvailablePrivateEndpointTypesClientWithBaseURI(baseURI string, subscriptionID string) AvailablePrivateEndpointTypesClient {
return AvailablePrivateEndpointTypesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -100,8 +101,7 @@ func (client AvailablePrivateEndpointTypesClient) ListPreparer(ctx context.Conte
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client AvailablePrivateEndpointTypesClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -216,8 +216,7 @@ func (client AvailablePrivateEndpointTypesClient) ListByResourceGroupPreparer(ct
// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
// http.Response Body if it receives an error.
func (client AvailablePrivateEndpointTypesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableresourcegroupdelegations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableresourcegroupdelegations.go
index 32069f2da..31fa824c0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableresourcegroupdelegations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableresourcegroupdelegations.go
@@ -37,7 +37,8 @@ func NewAvailableResourceGroupDelegationsClient(subscriptionID string) Available
}
// NewAvailableResourceGroupDelegationsClientWithBaseURI creates an instance of the
-// AvailableResourceGroupDelegationsClient client.
+// 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)}
}
@@ -103,8 +104,7 @@ func (client AvailableResourceGroupDelegationsClient) ListPreparer(ctx context.C
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/azurefirewallfqdntags.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/azurefirewallfqdntags.go
index cf0d2a97d..6b4f3afce 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/azurefirewallfqdntags.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/azurefirewallfqdntags.go
@@ -35,7 +35,9 @@ func NewAzureFirewallFqdnTagsClient(subscriptionID string) AzureFirewallFqdnTags
return NewAzureFirewallFqdnTagsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewAzureFirewallFqdnTagsClientWithBaseURI creates an instance of the AzureFirewallFqdnTagsClient client.
+// 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)}
}
@@ -96,8 +98,7 @@ func (client AzureFirewallFqdnTagsClient) ListAllPreparer(ctx context.Context) (
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListAllResponder handles the response to the ListAll request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/azurefirewalls.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/azurefirewalls.go
index c85a97dd9..74ee61bbe 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/azurefirewalls.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/azurefirewalls.go
@@ -35,7 +35,8 @@ func NewAzureFirewallsClient(subscriptionID string) AzureFirewallsClient {
return NewAzureFirewallsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewAzureFirewallsClientWithBaseURI creates an instance of the AzureFirewallsClient client.
+// 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)}
}
@@ -98,9 +99,8 @@ func (client AzureFirewallsClient) CreateOrUpdatePreparer(ctx context.Context, r
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -175,9 +175,8 @@ func (client AzureFirewallsClient) DeletePreparer(ctx context.Context, resourceG
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -257,8 +256,7 @@ func (client AzureFirewallsClient) GetPreparer(ctx context.Context, resourceGrou
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -333,8 +331,7 @@ func (client AzureFirewallsClient) ListPreparer(ctx context.Context, resourceGro
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -443,8 +440,7 @@ func (client AzureFirewallsClient) ListAllPreparer(ctx context.Context) (*http.R
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListAllResponder handles the response to the ListAll request. The method always
@@ -561,8 +557,7 @@ func (client AzureFirewallsClient) UpdateTagsPreparer(ctx context.Context, resou
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client AzureFirewallsClient) UpdateTagsSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// UpdateTagsResponder handles the response to the UpdateTags request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/bastionhosts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/bastionhosts.go
index 7d2f594df..fe68d8a41 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/bastionhosts.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/bastionhosts.go
@@ -35,7 +35,8 @@ func NewBastionHostsClient(subscriptionID string) BastionHostsClient {
return NewBastionHostsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewBastionHostsClientWithBaseURI creates an instance of the BastionHostsClient client.
+// NewBastionHostsClientWithBaseURI creates an instance of the BastionHostsClient 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 NewBastionHostsClientWithBaseURI(baseURI string, subscriptionID string) BastionHostsClient {
return BastionHostsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -98,9 +99,8 @@ func (client BastionHostsClient) CreateOrUpdatePreparer(ctx context.Context, res
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client BastionHostsClient) CreateOrUpdateSender(req *http.Request) (future BastionHostsCreateOrUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -175,9 +175,8 @@ func (client BastionHostsClient) DeletePreparer(ctx context.Context, resourceGro
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client BastionHostsClient) DeleteSender(req *http.Request) (future BastionHostsDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -257,8 +256,7 @@ func (client BastionHostsClient) GetPreparer(ctx context.Context, resourceGroupN
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client BastionHostsClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -330,8 +328,7 @@ func (client BastionHostsClient) ListPreparer(ctx context.Context) (*http.Reques
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client BastionHostsClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -443,8 +440,7 @@ func (client BastionHostsClient) ListByResourceGroupPreparer(ctx context.Context
// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
// http.Response Body if it receives an error.
func (client BastionHostsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
@@ -554,9 +550,8 @@ func (client BastionHostsClient) UpdateTagsPreparer(ctx context.Context, resourc
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client BastionHostsClient) UpdateTagsSender(req *http.Request) (future BastionHostsUpdateTagsFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/bgpservicecommunities.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/bgpservicecommunities.go
index 5d93b851f..d5964f2a5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/bgpservicecommunities.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/bgpservicecommunities.go
@@ -35,7 +35,9 @@ func NewBgpServiceCommunitiesClient(subscriptionID string) BgpServiceCommunities
return NewBgpServiceCommunitiesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewBgpServiceCommunitiesClientWithBaseURI creates an instance of the BgpServiceCommunitiesClient client.
+// NewBgpServiceCommunitiesClientWithBaseURI creates an instance of the BgpServiceCommunitiesClient 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 NewBgpServiceCommunitiesClientWithBaseURI(baseURI string, subscriptionID string) BgpServiceCommunitiesClient {
return BgpServiceCommunitiesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -96,8 +98,7 @@ func (client BgpServiceCommunitiesClient) ListPreparer(ctx context.Context) (*ht
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client BgpServiceCommunitiesClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/client.go
index 14cd48cfb..26209bf39 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/client.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/client.go
@@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient {
return NewWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewWithBaseURI creates an instance of the BaseClient client.
+// 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()),
@@ -115,8 +116,7 @@ func (client BaseClient) CheckDNSNameAvailabilityPreparer(ctx context.Context, l
// CheckDNSNameAvailabilitySender sends the CheckDNSNameAvailability request. The method will close the
// http.Response Body if it receives an error.
func (client BaseClient) CheckDNSNameAvailabilitySender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// CheckDNSNameAvailabilityResponder handles the response to the CheckDNSNameAvailability request. The method always
@@ -192,8 +192,7 @@ func (client BaseClient) SupportedSecurityProvidersPreparer(ctx context.Context,
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// SupportedSecurityProvidersResponder handles the response to the SupportedSecurityProviders request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/connectionmonitors.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/connectionmonitors.go
index ca171615e..86b7360f7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/connectionmonitors.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/connectionmonitors.go
@@ -36,7 +36,9 @@ func NewConnectionMonitorsClient(subscriptionID string) ConnectionMonitorsClient
return NewConnectionMonitorsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewConnectionMonitorsClientWithBaseURI creates an instance of the ConnectionMonitorsClient client.
+// NewConnectionMonitorsClientWithBaseURI creates an instance of the ConnectionMonitorsClient 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 NewConnectionMonitorsClientWithBaseURI(baseURI string, subscriptionID string) ConnectionMonitorsClient {
return ConnectionMonitorsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -110,9 +112,8 @@ func (client ConnectionMonitorsClient) CreateOrUpdatePreparer(ctx context.Contex
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) CreateOrUpdateSender(req *http.Request) (future ConnectionMonitorsCreateOrUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -189,9 +190,8 @@ func (client ConnectionMonitorsClient) DeletePreparer(ctx context.Context, resou
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) DeleteSender(req *http.Request) (future ConnectionMonitorsDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -273,8 +273,7 @@ func (client ConnectionMonitorsClient) GetPreparer(ctx context.Context, resource
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -350,8 +349,7 @@ func (client ConnectionMonitorsClient) ListPreparer(ctx context.Context, resourc
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -423,9 +421,8 @@ func (client ConnectionMonitorsClient) QueryPreparer(ctx context.Context, resour
// QuerySender sends the Query request. The method will close the
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) QuerySender(req *http.Request) (future ConnectionMonitorsQueryFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -502,9 +499,8 @@ func (client ConnectionMonitorsClient) StartPreparer(ctx context.Context, resour
// StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) StartSender(req *http.Request) (future ConnectionMonitorsStartFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -580,9 +576,8 @@ func (client ConnectionMonitorsClient) StopPreparer(ctx context.Context, resourc
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) StopSender(req *http.Request) (future ConnectionMonitorsStopFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -667,8 +662,7 @@ func (client ConnectionMonitorsClient) UpdateTagsPreparer(ctx context.Context, r
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) UpdateTagsSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// UpdateTagsResponder handles the response to the UpdateTags request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/ddoscustompolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/ddoscustompolicies.go
index f8d645460..21d6819fd 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/ddoscustompolicies.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/ddoscustompolicies.go
@@ -35,7 +35,9 @@ func NewDdosCustomPoliciesClient(subscriptionID string) DdosCustomPoliciesClient
return NewDdosCustomPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewDdosCustomPoliciesClientWithBaseURI creates an instance of the DdosCustomPoliciesClient client.
+// 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)}
}
@@ -98,9 +100,8 @@ func (client DdosCustomPoliciesClient) CreateOrUpdatePreparer(ctx context.Contex
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -175,9 +176,8 @@ func (client DdosCustomPoliciesClient) DeletePreparer(ctx context.Context, resou
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -257,8 +257,7 @@ func (client DdosCustomPoliciesClient) GetPreparer(ctx context.Context, resource
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -331,9 +330,8 @@ func (client DdosCustomPoliciesClient) UpdateTagsPreparer(ctx context.Context, r
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/ddosprotectionplans.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/ddosprotectionplans.go
index efd5f7635..5b6b270ce 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/ddosprotectionplans.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/ddosprotectionplans.go
@@ -35,7 +35,9 @@ func NewDdosProtectionPlansClient(subscriptionID string) DdosProtectionPlansClie
return NewDdosProtectionPlansClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewDdosProtectionPlansClientWithBaseURI creates an instance of the DdosProtectionPlansClient client.
+// 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)}
}
@@ -101,9 +103,8 @@ func (client DdosProtectionPlansClient) CreateOrUpdatePreparer(ctx context.Conte
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -178,9 +179,8 @@ func (client DdosProtectionPlansClient) DeletePreparer(ctx context.Context, reso
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -260,8 +260,7 @@ func (client DdosProtectionPlansClient) GetPreparer(ctx context.Context, resourc
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -333,8 +332,7 @@ func (client DdosProtectionPlansClient) ListPreparer(ctx context.Context) (*http
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -446,8 +444,7 @@ func (client DdosProtectionPlansClient) ListByResourceGroupPreparer(ctx context.
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
@@ -557,9 +554,8 @@ func (client DdosProtectionPlansClient) UpdateTagsPreparer(ctx context.Context,
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/defaultsecurityrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/defaultsecurityrules.go
index 0c38bd8fd..9265ce276 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/defaultsecurityrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/defaultsecurityrules.go
@@ -35,7 +35,9 @@ func NewDefaultSecurityRulesClient(subscriptionID string) DefaultSecurityRulesCl
return NewDefaultSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewDefaultSecurityRulesClientWithBaseURI creates an instance of the DefaultSecurityRulesClient client.
+// NewDefaultSecurityRulesClientWithBaseURI creates an instance of the DefaultSecurityRulesClient 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 NewDefaultSecurityRulesClientWithBaseURI(baseURI string, subscriptionID string) DefaultSecurityRulesClient {
return DefaultSecurityRulesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -102,8 +104,7 @@ func (client DefaultSecurityRulesClient) GetPreparer(ctx context.Context, resour
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client DefaultSecurityRulesClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -180,8 +181,7 @@ func (client DefaultSecurityRulesClient) ListPreparer(ctx context.Context, resou
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client DefaultSecurityRulesClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitauthorizations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitauthorizations.go
index 7211b209a..4777865f1 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitauthorizations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitauthorizations.go
@@ -37,7 +37,8 @@ func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string) ExpressRo
}
// NewExpressRouteCircuitAuthorizationsClientWithBaseURI creates an instance of the
-// ExpressRouteCircuitAuthorizationsClient client.
+// ExpressRouteCircuitAuthorizationsClient 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 NewExpressRouteCircuitAuthorizationsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitAuthorizationsClient {
return ExpressRouteCircuitAuthorizationsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -104,9 +105,8 @@ func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdatePreparer(ctx
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -183,9 +183,8 @@ func (client ExpressRouteCircuitAuthorizationsClient) DeletePreparer(ctx context
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -267,8 +266,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) GetPreparer(ctx context.Co
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -345,8 +343,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) ListPreparer(ctx context.C
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitconnections.go
index a27357867..9ff6529f5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitconnections.go
@@ -36,7 +36,8 @@ func NewExpressRouteCircuitConnectionsClient(subscriptionID string) ExpressRoute
}
// NewExpressRouteCircuitConnectionsClientWithBaseURI creates an instance of the ExpressRouteCircuitConnectionsClient
-// client.
+// 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)}
}
@@ -105,9 +106,8 @@ func (client ExpressRouteCircuitConnectionsClient) CreateOrUpdatePreparer(ctx co
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -186,9 +186,8 @@ func (client ExpressRouteCircuitConnectionsClient) DeletePreparer(ctx context.Co
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -272,8 +271,7 @@ func (client ExpressRouteCircuitConnectionsClient) GetPreparer(ctx context.Conte
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -352,8 +350,7 @@ func (client ExpressRouteCircuitConnectionsClient) ListPreparer(ctx context.Cont
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitpeerings.go
index 42e165667..9645fefdb 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitpeerings.go
@@ -36,7 +36,9 @@ func NewExpressRouteCircuitPeeringsClient(subscriptionID string) ExpressRouteCir
return NewExpressRouteCircuitPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewExpressRouteCircuitPeeringsClientWithBaseURI creates an instance of the ExpressRouteCircuitPeeringsClient client.
+// NewExpressRouteCircuitPeeringsClientWithBaseURI creates an instance of the ExpressRouteCircuitPeeringsClient 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 NewExpressRouteCircuitPeeringsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitPeeringsClient {
return ExpressRouteCircuitPeeringsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -63,7 +65,7 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdate(ctx context.Conte
Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil},
- {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil},
+ {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil},
}},
}}}}}); err != nil {
return result, validation.NewError("network.ExpressRouteCircuitPeeringsClient", "CreateOrUpdate", err.Error())
@@ -113,9 +115,8 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdatePreparer(ctx conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -192,9 +193,8 @@ func (client ExpressRouteCircuitPeeringsClient) DeletePreparer(ctx context.Conte
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitPeeringsDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -276,8 +276,7 @@ func (client ExpressRouteCircuitPeeringsClient) GetPreparer(ctx context.Context,
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -354,8 +353,7 @@ func (client ExpressRouteCircuitPeeringsClient) ListPreparer(ctx context.Context
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuits.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuits.go
index b54c9b0ca..6089db218 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuits.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuits.go
@@ -35,7 +35,9 @@ func NewExpressRouteCircuitsClient(subscriptionID string) ExpressRouteCircuitsCl
return NewExpressRouteCircuitsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewExpressRouteCircuitsClientWithBaseURI creates an instance of the ExpressRouteCircuitsClient client.
+// NewExpressRouteCircuitsClientWithBaseURI creates an instance of the ExpressRouteCircuitsClient 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 NewExpressRouteCircuitsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitsClient {
return ExpressRouteCircuitsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -98,9 +100,8 @@ func (client ExpressRouteCircuitsClient) CreateOrUpdatePreparer(ctx context.Cont
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitsCreateOrUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -175,9 +176,8 @@ func (client ExpressRouteCircuitsClient) DeletePreparer(ctx context.Context, res
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitsDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -257,8 +257,7 @@ func (client ExpressRouteCircuitsClient) GetPreparer(ctx context.Context, resour
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -336,8 +335,7 @@ func (client ExpressRouteCircuitsClient) GetPeeringStatsPreparer(ctx context.Con
// GetPeeringStatsSender sends the GetPeeringStats request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) GetPeeringStatsSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetPeeringStatsResponder handles the response to the GetPeeringStats request. The method always
@@ -413,8 +411,7 @@ func (client ExpressRouteCircuitsClient) GetStatsPreparer(ctx context.Context, r
// GetStatsSender sends the GetStats request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) GetStatsSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetStatsResponder handles the response to the GetStats request. The method always
@@ -489,8 +486,7 @@ func (client ExpressRouteCircuitsClient) ListPreparer(ctx context.Context, resou
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -599,8 +595,7 @@ func (client ExpressRouteCircuitsClient) ListAllPreparer(ctx context.Context) (*
// ListAllSender sends the ListAll request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListAllSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListAllResponder handles the response to the ListAll request. The method always
@@ -711,9 +706,8 @@ func (client ExpressRouteCircuitsClient) ListArpTablePreparer(ctx context.Contex
// ListArpTableSender sends the ListArpTable request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListArpTableSender(req *http.Request) (future ExpressRouteCircuitsListArpTableFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -793,9 +787,8 @@ func (client ExpressRouteCircuitsClient) ListRoutesTablePreparer(ctx context.Con
// ListRoutesTableSender sends the ListRoutesTable request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListRoutesTableSender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -875,9 +868,8 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableSummaryPreparer(ctx cont
// ListRoutesTableSummarySender sends the ListRoutesTableSummary request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListRoutesTableSummarySender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableSummaryFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -955,9 +947,8 @@ func (client ExpressRouteCircuitsClient) UpdateTagsPreparer(ctx context.Context,
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) UpdateTagsSender(req *http.Request) (future ExpressRouteCircuitsUpdateTagsFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteconnections.go
index 6e30029ed..5f68a3567 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteconnections.go
@@ -36,7 +36,9 @@ func NewExpressRouteConnectionsClient(subscriptionID string) ExpressRouteConnect
return NewExpressRouteConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewExpressRouteConnectionsClientWithBaseURI creates an instance of the ExpressRouteConnectionsClient client.
+// 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)}
}
@@ -108,9 +110,8 @@ func (client ExpressRouteConnectionsClient) CreateOrUpdatePreparer(ctx context.C
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -187,9 +188,8 @@ func (client ExpressRouteConnectionsClient) DeletePreparer(ctx context.Context,
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -271,8 +271,7 @@ func (client ExpressRouteConnectionsClient) GetPreparer(ctx context.Context, res
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -348,8 +347,7 @@ func (client ExpressRouteConnectionsClient) ListPreparer(ctx context.Context, re
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecrossconnectionpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecrossconnectionpeerings.go
index c0b32ea76..afbad2436 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecrossconnectionpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecrossconnectionpeerings.go
@@ -38,7 +38,8 @@ func NewExpressRouteCrossConnectionPeeringsClient(subscriptionID string) Express
}
// NewExpressRouteCrossConnectionPeeringsClientWithBaseURI creates an instance of the
-// ExpressRouteCrossConnectionPeeringsClient client.
+// 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)}
}
@@ -66,7 +67,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdate(ctx conte
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: 1, 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())
@@ -115,9 +116,8 @@ func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdatePreparer(c
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -194,9 +194,8 @@ func (client ExpressRouteCrossConnectionPeeringsClient) DeletePreparer(ctx conte
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -278,8 +277,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) GetPreparer(ctx context.
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -356,8 +354,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) ListPreparer(ctx context
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecrossconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecrossconnections.go
index 71bff3a15..17b5c2b19 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecrossconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecrossconnections.go
@@ -36,7 +36,8 @@ func NewExpressRouteCrossConnectionsClient(subscriptionID string) ExpressRouteCr
}
// NewExpressRouteCrossConnectionsClientWithBaseURI creates an instance of the ExpressRouteCrossConnectionsClient
-// client.
+// 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)}
}
@@ -99,9 +100,8 @@ func (client ExpressRouteCrossConnectionsClient) CreateOrUpdatePreparer(ctx cont
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -182,8 +182,7 @@ func (client ExpressRouteCrossConnectionsClient) GetPreparer(ctx context.Context
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -255,8 +254,7 @@ func (client ExpressRouteCrossConnectionsClient) ListPreparer(ctx context.Contex
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -368,9 +366,8 @@ func (client ExpressRouteCrossConnectionsClient) ListArpTablePreparer(ctx contex
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -450,8 +447,7 @@ func (client ExpressRouteCrossConnectionsClient) ListByResourceGroupPreparer(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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
@@ -563,9 +559,8 @@ func (client ExpressRouteCrossConnectionsClient) ListRoutesTablePreparer(ctx con
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -645,9 +640,8 @@ func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSummaryPreparer(
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -725,9 +719,8 @@ func (client ExpressRouteCrossConnectionsClient) UpdateTagsPreparer(ctx context.
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutegateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutegateways.go
index 77c3777c5..8759ccf75 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutegateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutegateways.go
@@ -36,7 +36,9 @@ func NewExpressRouteGatewaysClient(subscriptionID string) ExpressRouteGatewaysCl
return NewExpressRouteGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewExpressRouteGatewaysClientWithBaseURI creates an instance of the ExpressRouteGatewaysClient client.
+// 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)}
}
@@ -106,9 +108,8 @@ func (client ExpressRouteGatewaysClient) CreateOrUpdatePreparer(ctx context.Cont
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -184,9 +185,8 @@ func (client ExpressRouteGatewaysClient) DeletePreparer(ctx context.Context, res
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -266,8 +266,7 @@ func (client ExpressRouteGatewaysClient) GetPreparer(ctx context.Context, resour
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -341,8 +340,7 @@ func (client ExpressRouteGatewaysClient) ListByResourceGroupPreparer(ctx context
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
@@ -413,8 +411,7 @@ func (client ExpressRouteGatewaysClient) ListBySubscriptionPreparer(ctx context.
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutelinks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutelinks.go
index f295fafc2..630607dc8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutelinks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutelinks.go
@@ -35,7 +35,9 @@ func NewExpressRouteLinksClient(subscriptionID string) ExpressRouteLinksClient {
return NewExpressRouteLinksClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewExpressRouteLinksClientWithBaseURI creates an instance of the ExpressRouteLinksClient client.
+// 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)}
}
@@ -102,8 +104,7 @@ func (client ExpressRouteLinksClient) GetPreparer(ctx context.Context, resourceG
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -180,8 +181,7 @@ func (client ExpressRouteLinksClient) ListPreparer(ctx context.Context, resource
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteports.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteports.go
index 1c5547cde..24319267a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteports.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteports.go
@@ -35,7 +35,9 @@ func NewExpressRoutePortsClient(subscriptionID string) ExpressRoutePortsClient {
return NewExpressRoutePortsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewExpressRoutePortsClientWithBaseURI creates an instance of the ExpressRoutePortsClient client.
+// 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)}
}
@@ -98,9 +100,8 @@ func (client ExpressRoutePortsClient) CreateOrUpdatePreparer(ctx context.Context
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -175,9 +176,8 @@ func (client ExpressRoutePortsClient) DeletePreparer(ctx context.Context, resour
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -257,8 +257,7 @@ func (client ExpressRoutePortsClient) GetPreparer(ctx context.Context, resourceG
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -330,8 +329,7 @@ func (client ExpressRoutePortsClient) ListPreparer(ctx context.Context) (*http.R
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -443,8 +441,7 @@ func (client ExpressRoutePortsClient) ListByResourceGroupPreparer(ctx context.Co
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
@@ -554,9 +551,8 @@ func (client ExpressRoutePortsClient) UpdateTagsPreparer(ctx context.Context, re
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteportslocations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteportslocations.go
index 7e07586b4..c688c98e0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteportslocations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteportslocations.go
@@ -35,7 +35,9 @@ func NewExpressRoutePortsLocationsClient(subscriptionID string) ExpressRoutePort
return NewExpressRoutePortsLocationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewExpressRoutePortsLocationsClientWithBaseURI creates an instance of the ExpressRoutePortsLocationsClient client.
+// 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)}
}
@@ -99,8 +101,7 @@ func (client ExpressRoutePortsLocationsClient) GetPreparer(ctx context.Context,
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -173,8 +174,7 @@ func (client ExpressRoutePortsLocationsClient) ListPreparer(ctx context.Context)
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteserviceproviders.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteserviceproviders.go
index e50a78430..262a38bad 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteserviceproviders.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteserviceproviders.go
@@ -36,7 +36,8 @@ func NewExpressRouteServiceProvidersClient(subscriptionID string) ExpressRouteSe
}
// NewExpressRouteServiceProvidersClientWithBaseURI creates an instance of the ExpressRouteServiceProvidersClient
-// client.
+// 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 NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteServiceProvidersClient {
return ExpressRouteServiceProvidersClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -97,8 +98,7 @@ func (client ExpressRouteServiceProvidersClient) ListPreparer(ctx context.Contex
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client ExpressRouteServiceProvidersClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/firewallpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/firewallpolicies.go
index a15914a15..bb43fc933 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/firewallpolicies.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/firewallpolicies.go
@@ -35,7 +35,9 @@ func NewFirewallPoliciesClient(subscriptionID string) FirewallPoliciesClient {
return NewFirewallPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewFirewallPoliciesClientWithBaseURI creates an instance of the FirewallPoliciesClient client.
+// NewFirewallPoliciesClientWithBaseURI creates an instance of the FirewallPoliciesClient 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 NewFirewallPoliciesClientWithBaseURI(baseURI string, subscriptionID string) FirewallPoliciesClient {
return FirewallPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -98,9 +100,8 @@ func (client FirewallPoliciesClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client FirewallPoliciesClient) CreateOrUpdateSender(req *http.Request) (future FirewallPoliciesCreateOrUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -175,9 +176,8 @@ func (client FirewallPoliciesClient) DeletePreparer(ctx context.Context, resourc
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client FirewallPoliciesClient) DeleteSender(req *http.Request) (future FirewallPoliciesDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -261,8 +261,7 @@ func (client FirewallPoliciesClient) GetPreparer(ctx context.Context, resourceGr
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client FirewallPoliciesClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -337,8 +336,7 @@ func (client FirewallPoliciesClient) ListPreparer(ctx context.Context, resourceG
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client FirewallPoliciesClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -447,8 +445,7 @@ func (client FirewallPoliciesClient) ListAllPreparer(ctx context.Context) (*http
// ListAllSender sends the ListAll request. The method will close the
// http.Response Body if it receives an error.
func (client FirewallPoliciesClient) ListAllSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListAllResponder handles the response to the ListAll request. The method always
@@ -564,8 +561,7 @@ func (client FirewallPoliciesClient) UpdateTagsPreparer(ctx context.Context, res
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client FirewallPoliciesClient) UpdateTagsSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// UpdateTagsResponder handles the response to the UpdateTags request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/firewallpolicyrulegroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/firewallpolicyrulegroups.go
index 989c3d163..a7e13ab45 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/firewallpolicyrulegroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/firewallpolicyrulegroups.go
@@ -36,7 +36,9 @@ func NewFirewallPolicyRuleGroupsClient(subscriptionID string) FirewallPolicyRule
return NewFirewallPolicyRuleGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewFirewallPolicyRuleGroupsClientWithBaseURI creates an instance of the FirewallPolicyRuleGroupsClient client.
+// NewFirewallPolicyRuleGroupsClientWithBaseURI creates an instance of the FirewallPolicyRuleGroupsClient 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 NewFirewallPolicyRuleGroupsClientWithBaseURI(baseURI string, subscriptionID string) FirewallPolicyRuleGroupsClient {
return FirewallPolicyRuleGroupsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -63,7 +65,7 @@ func (client FirewallPolicyRuleGroupsClient) CreateOrUpdate(ctx context.Context,
Constraints: []validation.Constraint{{Target: "parameters.FirewallPolicyRuleGroupProperties", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "parameters.FirewallPolicyRuleGroupProperties.Priority", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "parameters.FirewallPolicyRuleGroupProperties.Priority", Name: validation.InclusiveMaximum, Rule: int64(65000), Chain: nil},
- {Target: "parameters.FirewallPolicyRuleGroupProperties.Priority", Name: validation.InclusiveMinimum, Rule: 100, Chain: nil},
+ {Target: "parameters.FirewallPolicyRuleGroupProperties.Priority", Name: validation.InclusiveMinimum, Rule: int64(100), Chain: nil},
}},
}}}}}); err != nil {
return result, validation.NewError("network.FirewallPolicyRuleGroupsClient", "CreateOrUpdate", err.Error())
@@ -113,9 +115,8 @@ func (client FirewallPolicyRuleGroupsClient) CreateOrUpdatePreparer(ctx context.
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client FirewallPolicyRuleGroupsClient) CreateOrUpdateSender(req *http.Request) (future FirewallPolicyRuleGroupsCreateOrUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -192,9 +193,8 @@ func (client FirewallPolicyRuleGroupsClient) DeletePreparer(ctx context.Context,
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client FirewallPolicyRuleGroupsClient) DeleteSender(req *http.Request) (future FirewallPolicyRuleGroupsDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -276,8 +276,7 @@ func (client FirewallPolicyRuleGroupsClient) GetPreparer(ctx context.Context, re
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client FirewallPolicyRuleGroupsClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -354,8 +353,7 @@ func (client FirewallPolicyRuleGroupsClient) ListPreparer(ctx context.Context, r
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client FirewallPolicyRuleGroupsClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/hubvirtualnetworkconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/hubvirtualnetworkconnections.go
index 4535ac1eb..6bf6d94f0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/hubvirtualnetworkconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/hubvirtualnetworkconnections.go
@@ -36,7 +36,8 @@ func NewHubVirtualNetworkConnectionsClient(subscriptionID string) HubVirtualNetw
}
// NewHubVirtualNetworkConnectionsClientWithBaseURI creates an instance of the HubVirtualNetworkConnectionsClient
-// client.
+// 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)}
}
@@ -103,8 +104,7 @@ func (client HubVirtualNetworkConnectionsClient) GetPreparer(ctx context.Context
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -181,8 +181,7 @@ func (client HubVirtualNetworkConnectionsClient) ListPreparer(ctx context.Contex
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/inboundnatrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/inboundnatrules.go
index 0f05a47e3..41f109bbe 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/inboundnatrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/inboundnatrules.go
@@ -36,7 +36,8 @@ func NewInboundNatRulesClient(subscriptionID string) InboundNatRulesClient {
return NewInboundNatRulesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewInboundNatRulesClientWithBaseURI creates an instance of the InboundNatRulesClient client.
+// NewInboundNatRulesClientWithBaseURI creates an instance of the InboundNatRulesClient 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 NewInboundNatRulesClientWithBaseURI(baseURI string, subscriptionID string) InboundNatRulesClient {
return InboundNatRulesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -120,9 +121,8 @@ func (client InboundNatRulesClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client InboundNatRulesClient) CreateOrUpdateSender(req *http.Request) (future InboundNatRulesCreateOrUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -199,9 +199,8 @@ func (client InboundNatRulesClient) DeletePreparer(ctx context.Context, resource
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client InboundNatRulesClient) DeleteSender(req *http.Request) (future InboundNatRulesDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -287,8 +286,7 @@ func (client InboundNatRulesClient) GetPreparer(ctx context.Context, resourceGro
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client InboundNatRulesClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -365,8 +363,7 @@ func (client InboundNatRulesClient) ListPreparer(ctx context.Context, resourceGr
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client InboundNatRulesClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfaceipconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfaceipconfigurations.go
index 518327342..879c23b8c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfaceipconfigurations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfaceipconfigurations.go
@@ -35,7 +35,9 @@ func NewInterfaceIPConfigurationsClient(subscriptionID string) InterfaceIPConfig
return NewInterfaceIPConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewInterfaceIPConfigurationsClientWithBaseURI creates an instance of the InterfaceIPConfigurationsClient client.
+// NewInterfaceIPConfigurationsClientWithBaseURI creates an instance of the InterfaceIPConfigurationsClient 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 NewInterfaceIPConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) InterfaceIPConfigurationsClient {
return InterfaceIPConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -102,8 +104,7 @@ func (client InterfaceIPConfigurationsClient) GetPreparer(ctx context.Context, r
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client InterfaceIPConfigurationsClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -180,8 +181,7 @@ func (client InterfaceIPConfigurationsClient) ListPreparer(ctx context.Context,
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client InterfaceIPConfigurationsClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfaceloadbalancers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfaceloadbalancers.go
index 75a6aa9e3..50434af08 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfaceloadbalancers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfaceloadbalancers.go
@@ -35,7 +35,9 @@ func NewInterfaceLoadBalancersClient(subscriptionID string) InterfaceLoadBalance
return NewInterfaceLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewInterfaceLoadBalancersClientWithBaseURI creates an instance of the InterfaceLoadBalancersClient client.
+// NewInterfaceLoadBalancersClientWithBaseURI creates an instance of the InterfaceLoadBalancersClient 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 NewInterfaceLoadBalancersClientWithBaseURI(baseURI string, subscriptionID string) InterfaceLoadBalancersClient {
return InterfaceLoadBalancersClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -101,8 +103,7 @@ func (client InterfaceLoadBalancersClient) ListPreparer(ctx context.Context, res
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client InterfaceLoadBalancersClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfacesgroup.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfacesgroup.go
index be36ebebf..865ff564f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfacesgroup.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfacesgroup.go
@@ -35,7 +35,8 @@ func NewInterfacesClient(subscriptionID string) InterfacesClient {
return NewInterfacesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewInterfacesClientWithBaseURI creates an instance of the InterfacesClient client.
+// NewInterfacesClientWithBaseURI creates an instance of the InterfacesClient 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 NewInterfacesClientWithBaseURI(baseURI string, subscriptionID string) InterfacesClient {
return InterfacesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -97,9 +98,8 @@ func (client InterfacesClient) CreateOrUpdatePreparer(ctx context.Context, resou
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) CreateOrUpdateSender(req *http.Request) (future InterfacesCreateOrUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -174,9 +174,8 @@ func (client InterfacesClient) DeletePreparer(ctx context.Context, resourceGroup
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) DeleteSender(req *http.Request) (future InterfacesDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -260,8 +259,7 @@ func (client InterfacesClient) GetPreparer(ctx context.Context, resourceGroupNam
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -331,9 +329,8 @@ func (client InterfacesClient) GetEffectiveRouteTablePreparer(ctx context.Contex
// GetEffectiveRouteTableSender sends the GetEffectiveRouteTable request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) GetEffectiveRouteTableSender(req *http.Request) (future InterfacesGetEffectiveRouteTableFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -425,8 +422,7 @@ func (client InterfacesClient) GetVirtualMachineScaleSetIPConfigurationPreparer(
// GetVirtualMachineScaleSetIPConfigurationSender sends the GetVirtualMachineScaleSetIPConfiguration request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) GetVirtualMachineScaleSetIPConfigurationSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetVirtualMachineScaleSetIPConfigurationResponder handles the response to the GetVirtualMachineScaleSetIPConfiguration request. The method always
@@ -510,8 +506,7 @@ func (client InterfacesClient) GetVirtualMachineScaleSetNetworkInterfacePreparer
// GetVirtualMachineScaleSetNetworkInterfaceSender sends the GetVirtualMachineScaleSetNetworkInterface request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) GetVirtualMachineScaleSetNetworkInterfaceSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetVirtualMachineScaleSetNetworkInterfaceResponder handles the response to the GetVirtualMachineScaleSetNetworkInterface request. The method always
@@ -586,8 +581,7 @@ func (client InterfacesClient) ListPreparer(ctx context.Context, resourceGroupNa
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -696,8 +690,7 @@ func (client InterfacesClient) ListAllPreparer(ctx context.Context) (*http.Reque
// ListAllSender sends the ListAll request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) ListAllSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListAllResponder handles the response to the ListAll request. The method always
@@ -804,9 +797,8 @@ func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsPreparer(ctx co
// ListEffectiveNetworkSecurityGroupsSender sends the ListEffectiveNetworkSecurityGroups request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsSender(req *http.Request) (future InterfacesListEffectiveNetworkSecurityGroupsFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -897,8 +889,7 @@ func (client InterfacesClient) ListVirtualMachineScaleSetIPConfigurationsPrepare
// ListVirtualMachineScaleSetIPConfigurationsSender sends the ListVirtualMachineScaleSetIPConfigurations request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) ListVirtualMachineScaleSetIPConfigurationsSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListVirtualMachineScaleSetIPConfigurationsResponder handles the response to the ListVirtualMachineScaleSetIPConfigurations request. The method always
@@ -1012,8 +1003,7 @@ func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfacesPrepar
// ListVirtualMachineScaleSetNetworkInterfacesSender sends the ListVirtualMachineScaleSetNetworkInterfaces request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfacesSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListVirtualMachineScaleSetNetworkInterfacesResponder handles the response to the ListVirtualMachineScaleSetNetworkInterfaces request. The method always
@@ -1130,8 +1120,7 @@ func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfacesPrep
// ListVirtualMachineScaleSetVMNetworkInterfacesSender sends the ListVirtualMachineScaleSetVMNetworkInterfaces request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfacesSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListVirtualMachineScaleSetVMNetworkInterfacesResponder handles the response to the ListVirtualMachineScaleSetVMNetworkInterfaces request. The method always
@@ -1241,9 +1230,8 @@ func (client InterfacesClient) UpdateTagsPreparer(ctx context.Context, resourceG
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client InterfacesClient) UpdateTagsSender(req *http.Request) (future InterfacesUpdateTagsFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfacetapconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfacetapconfigurations.go
index ca11aecf1..fdd5f43b0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfacetapconfigurations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfacetapconfigurations.go
@@ -36,7 +36,9 @@ func NewInterfaceTapConfigurationsClient(subscriptionID string) InterfaceTapConf
return NewInterfaceTapConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewInterfaceTapConfigurationsClientWithBaseURI creates an instance of the InterfaceTapConfigurationsClient client.
+// 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)}
}
@@ -136,9 +138,8 @@ func (client InterfaceTapConfigurationsClient) CreateOrUpdatePreparer(ctx contex
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -215,9 +216,8 @@ func (client InterfaceTapConfigurationsClient) DeletePreparer(ctx context.Contex
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -299,8 +299,7 @@ func (client InterfaceTapConfigurationsClient) GetPreparer(ctx context.Context,
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -377,8 +376,7 @@ func (client InterfaceTapConfigurationsClient) ListPreparer(ctx context.Context,
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerbackendaddresspools.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerbackendaddresspools.go
index 0f7c54d71..bdf93fadf 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerbackendaddresspools.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerbackendaddresspools.go
@@ -36,7 +36,8 @@ func NewLoadBalancerBackendAddressPoolsClient(subscriptionID string) LoadBalance
}
// NewLoadBalancerBackendAddressPoolsClientWithBaseURI creates an instance of the LoadBalancerBackendAddressPoolsClient
-// client.
+// 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 NewLoadBalancerBackendAddressPoolsClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerBackendAddressPoolsClient {
return LoadBalancerBackendAddressPoolsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -103,8 +104,7 @@ func (client LoadBalancerBackendAddressPoolsClient) GetPreparer(ctx context.Cont
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancerBackendAddressPoolsClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -181,8 +181,7 @@ func (client LoadBalancerBackendAddressPoolsClient) ListPreparer(ctx context.Con
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancerBackendAddressPoolsClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerfrontendipconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerfrontendipconfigurations.go
index eb2e34cf9..f6fc524ed 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerfrontendipconfigurations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerfrontendipconfigurations.go
@@ -37,7 +37,8 @@ func NewLoadBalancerFrontendIPConfigurationsClient(subscriptionID string) LoadBa
}
// NewLoadBalancerFrontendIPConfigurationsClientWithBaseURI creates an instance of the
-// LoadBalancerFrontendIPConfigurationsClient client.
+// LoadBalancerFrontendIPConfigurationsClient 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 NewLoadBalancerFrontendIPConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerFrontendIPConfigurationsClient {
return LoadBalancerFrontendIPConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -104,8 +105,7 @@ func (client LoadBalancerFrontendIPConfigurationsClient) GetPreparer(ctx context
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancerFrontendIPConfigurationsClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -182,8 +182,7 @@ func (client LoadBalancerFrontendIPConfigurationsClient) ListPreparer(ctx contex
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancerFrontendIPConfigurationsClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerloadbalancingrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerloadbalancingrules.go
index 96d493f8e..f3af8009d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerloadbalancingrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerloadbalancingrules.go
@@ -36,7 +36,8 @@ func NewLoadBalancerLoadBalancingRulesClient(subscriptionID string) LoadBalancer
}
// NewLoadBalancerLoadBalancingRulesClientWithBaseURI creates an instance of the LoadBalancerLoadBalancingRulesClient
-// client.
+// 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 NewLoadBalancerLoadBalancingRulesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerLoadBalancingRulesClient {
return LoadBalancerLoadBalancingRulesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -103,8 +104,7 @@ func (client LoadBalancerLoadBalancingRulesClient) GetPreparer(ctx context.Conte
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancerLoadBalancingRulesClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -181,8 +181,7 @@ func (client LoadBalancerLoadBalancingRulesClient) ListPreparer(ctx context.Cont
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancerLoadBalancingRulesClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancernetworkinterfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancernetworkinterfaces.go
index 7b8a52bdb..84947bb17 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancernetworkinterfaces.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancernetworkinterfaces.go
@@ -36,7 +36,8 @@ func NewLoadBalancerNetworkInterfacesClient(subscriptionID string) LoadBalancerN
}
// NewLoadBalancerNetworkInterfacesClientWithBaseURI creates an instance of the LoadBalancerNetworkInterfacesClient
-// client.
+// 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 NewLoadBalancerNetworkInterfacesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerNetworkInterfacesClient {
return LoadBalancerNetworkInterfacesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -102,8 +103,7 @@ func (client LoadBalancerNetworkInterfacesClient) ListPreparer(ctx context.Conte
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancerNetworkInterfacesClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalanceroutboundrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalanceroutboundrules.go
index 550f2980c..7ef578d8f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalanceroutboundrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalanceroutboundrules.go
@@ -35,7 +35,9 @@ func NewLoadBalancerOutboundRulesClient(subscriptionID string) LoadBalancerOutbo
return NewLoadBalancerOutboundRulesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewLoadBalancerOutboundRulesClientWithBaseURI creates an instance of the LoadBalancerOutboundRulesClient client.
+// 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)}
}
@@ -102,8 +104,7 @@ func (client LoadBalancerOutboundRulesClient) GetPreparer(ctx context.Context, r
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -180,8 +181,7 @@ func (client LoadBalancerOutboundRulesClient) ListPreparer(ctx context.Context,
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerprobes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerprobes.go
index 4f872bde2..977dcb00e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerprobes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerprobes.go
@@ -35,7 +35,9 @@ func NewLoadBalancerProbesClient(subscriptionID string) LoadBalancerProbesClient
return NewLoadBalancerProbesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewLoadBalancerProbesClientWithBaseURI creates an instance of the LoadBalancerProbesClient client.
+// NewLoadBalancerProbesClientWithBaseURI creates an instance of the LoadBalancerProbesClient 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 NewLoadBalancerProbesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerProbesClient {
return LoadBalancerProbesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -102,8 +104,7 @@ func (client LoadBalancerProbesClient) GetPreparer(ctx context.Context, resource
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancerProbesClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -180,8 +181,7 @@ func (client LoadBalancerProbesClient) ListPreparer(ctx context.Context, resourc
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancerProbesClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancers.go
index 2897a0408..7c373eb55 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancers.go
@@ -35,7 +35,8 @@ func NewLoadBalancersClient(subscriptionID string) LoadBalancersClient {
return NewLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewLoadBalancersClientWithBaseURI creates an instance of the LoadBalancersClient client.
+// NewLoadBalancersClientWithBaseURI creates an instance of the LoadBalancersClient 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 NewLoadBalancersClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancersClient {
return LoadBalancersClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -97,9 +98,8 @@ func (client LoadBalancersClient) CreateOrUpdatePreparer(ctx context.Context, re
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) CreateOrUpdateSender(req *http.Request) (future LoadBalancersCreateOrUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -174,9 +174,8 @@ func (client LoadBalancersClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) DeleteSender(req *http.Request) (future LoadBalancersDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -260,8 +259,7 @@ func (client LoadBalancersClient) GetPreparer(ctx context.Context, resourceGroup
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -336,8 +334,7 @@ func (client LoadBalancersClient) ListPreparer(ctx context.Context, resourceGrou
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -446,8 +443,7 @@ func (client LoadBalancersClient) ListAllPreparer(ctx context.Context) (*http.Re
// ListAllSender sends the ListAll request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) ListAllSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListAllResponder handles the response to the ListAll request. The method always
@@ -557,9 +553,8 @@ func (client LoadBalancersClient) UpdateTagsPreparer(ctx context.Context, resour
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client LoadBalancersClient) UpdateTagsSender(req *http.Request) (future LoadBalancersUpdateTagsFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/localnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/localnetworkgateways.go
index 5a08cb421..0f4383586 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/localnetworkgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/localnetworkgateways.go
@@ -36,7 +36,9 @@ func NewLocalNetworkGatewaysClient(subscriptionID string) LocalNetworkGatewaysCl
return NewLocalNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewLocalNetworkGatewaysClientWithBaseURI creates an instance of the LocalNetworkGatewaysClient client.
+// NewLocalNetworkGatewaysClientWithBaseURI creates an instance of the LocalNetworkGatewaysClient 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 NewLocalNetworkGatewaysClientWithBaseURI(baseURI string, subscriptionID string) LocalNetworkGatewaysClient {
return LocalNetworkGatewaysClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -106,9 +108,8 @@ func (client LocalNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Cont
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future LocalNetworkGatewaysCreateOrUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -189,9 +190,8 @@ func (client LocalNetworkGatewaysClient) DeletePreparer(ctx context.Context, res
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) DeleteSender(req *http.Request) (future LocalNetworkGatewaysDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -277,8 +277,7 @@ func (client LocalNetworkGatewaysClient) GetPreparer(ctx context.Context, resour
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -353,8 +352,7 @@ func (client LocalNetworkGatewaysClient) ListPreparer(ctx context.Context, resou
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -470,9 +468,8 @@ func (client LocalNetworkGatewaysClient) UpdateTagsPreparer(ctx context.Context,
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) UpdateTagsSender(req *http.Request) (future LocalNetworkGatewaysUpdateTagsFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/models.go
index 49f667bf9..c5d93eac2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/models.go
@@ -23123,8 +23123,8 @@ type PrivateLinkServiceConnectionState struct {
Status *string `json:"status,omitempty"`
// Description - The reason for approval/rejection of the connection.
Description *string `json:"description,omitempty"`
- // ActionRequired - A message indicating if changes on the service provider require any updates on the consumer.
- ActionRequired *string `json:"actionRequired,omitempty"`
+ // ActionsRequired - A message indicating if changes on the service provider require any updates on the consumer.
+ ActionsRequired *string `json:"actionsRequired,omitempty"`
}
// PrivateLinkServiceIPConfiguration the private link service ip configuration.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/natgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/natgateways.go
index 97e31a4ff..aa99dbc4c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/natgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/natgateways.go
@@ -35,7 +35,8 @@ func NewNatGatewaysClient(subscriptionID string) NatGatewaysClient {
return NewNatGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewNatGatewaysClientWithBaseURI creates an instance of the NatGatewaysClient client.
+// NewNatGatewaysClientWithBaseURI creates an instance of the NatGatewaysClient 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 NewNatGatewaysClientWithBaseURI(baseURI string, subscriptionID string) NatGatewaysClient {
return NatGatewaysClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -97,9 +98,8 @@ func (client NatGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, reso
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client NatGatewaysClient) CreateOrUpdateSender(req *http.Request) (future NatGatewaysCreateOrUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -174,9 +174,8 @@ func (client NatGatewaysClient) DeletePreparer(ctx context.Context, resourceGrou
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client NatGatewaysClient) DeleteSender(req *http.Request) (future NatGatewaysDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -260,8 +259,7 @@ func (client NatGatewaysClient) GetPreparer(ctx context.Context, resourceGroupNa
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client NatGatewaysClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -336,8 +334,7 @@ func (client NatGatewaysClient) ListPreparer(ctx context.Context, resourceGroupN
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client NatGatewaysClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -446,8 +443,7 @@ func (client NatGatewaysClient) ListAllPreparer(ctx context.Context) (*http.Requ
// ListAllSender sends the ListAll request. The method will close the
// http.Response Body if it receives an error.
func (client NatGatewaysClient) ListAllSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListAllResponder handles the response to the ListAll request. The method always
@@ -563,8 +559,7 @@ func (client NatGatewaysClient) UpdateTagsPreparer(ctx context.Context, resource
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client NatGatewaysClient) UpdateTagsSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// UpdateTagsResponder handles the response to the UpdateTags request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/operations.go
index 588855d36..760f8b773 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/operations.go
@@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient {
return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client.
+// 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)}
}
@@ -92,8 +93,7 @@ func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request,
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/p2svpngateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/p2svpngateways.go
index e7537aad4..409be904d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/p2svpngateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/p2svpngateways.go
@@ -35,7 +35,8 @@ func NewP2sVpnGatewaysClient(subscriptionID string) P2sVpnGatewaysClient {
return NewP2sVpnGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewP2sVpnGatewaysClientWithBaseURI creates an instance of the P2sVpnGatewaysClient client.
+// 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)}
}
@@ -98,9 +99,8 @@ func (client P2sVpnGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, r
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -175,9 +175,8 @@ func (client P2sVpnGatewaysClient) DeletePreparer(ctx context.Context, resourceG
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -254,9 +253,8 @@ func (client P2sVpnGatewaysClient) GenerateVpnProfilePreparer(ctx context.Contex
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -337,8 +335,7 @@ func (client P2sVpnGatewaysClient) GetPreparer(ctx context.Context, resourceGrou
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -409,9 +406,8 @@ func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealthPreparer(ctx context
// GetP2sVpnConnectionHealthSender sends the GetP2sVpnConnectionHealth request. The method will close the
// http.Response Body if it receives an error.
func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealthSender(req *http.Request) (future P2sVpnGatewaysGetP2sVpnConnectionHealthFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -488,8 +484,7 @@ func (client P2sVpnGatewaysClient) ListPreparer(ctx context.Context) (*http.Requ
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -601,8 +596,7 @@ func (client P2sVpnGatewaysClient) ListByResourceGroupPreparer(ctx context.Conte
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
@@ -712,9 +706,8 @@ func (client P2sVpnGatewaysClient) UpdateTagsPreparer(ctx context.Context, resou
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/p2svpnserverconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/p2svpnserverconfigurations.go
index e1cc2d0ab..f51d562a8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/p2svpnserverconfigurations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/p2svpnserverconfigurations.go
@@ -35,7 +35,9 @@ func NewP2sVpnServerConfigurationsClient(subscriptionID string) P2sVpnServerConf
return NewP2sVpnServerConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewP2sVpnServerConfigurationsClientWithBaseURI creates an instance of the P2sVpnServerConfigurationsClient client.
+// 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)}
}
@@ -101,9 +103,8 @@ func (client P2sVpnServerConfigurationsClient) CreateOrUpdatePreparer(ctx contex
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -180,9 +181,8 @@ func (client P2sVpnServerConfigurationsClient) DeletePreparer(ctx context.Contex
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -264,8 +264,7 @@ func (client P2sVpnServerConfigurationsClient) GetPreparer(ctx context.Context,
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -342,8 +341,7 @@ func (client P2sVpnServerConfigurationsClient) ListByVirtualWanPreparer(ctx cont
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByVirtualWanResponder handles the response to the ListByVirtualWan request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/packetcaptures.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/packetcaptures.go
index b6661c056..2d8408f5a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/packetcaptures.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/packetcaptures.go
@@ -36,7 +36,8 @@ func NewPacketCapturesClient(subscriptionID string) PacketCapturesClient {
return NewPacketCapturesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewPacketCapturesClientWithBaseURI creates an instance of the PacketCapturesClient client.
+// NewPacketCapturesClientWithBaseURI creates an instance of the PacketCapturesClient 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 NewPacketCapturesClientWithBaseURI(baseURI string, subscriptionID string) PacketCapturesClient {
return PacketCapturesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -109,9 +110,8 @@ func (client PacketCapturesClient) CreatePreparer(ctx context.Context, resourceG
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) CreateSender(req *http.Request) (future PacketCapturesCreateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -188,9 +188,8 @@ func (client PacketCapturesClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) DeleteSender(req *http.Request) (future PacketCapturesDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -272,8 +271,7 @@ func (client PacketCapturesClient) GetPreparer(ctx context.Context, resourceGrou
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -345,9 +343,8 @@ func (client PacketCapturesClient) GetStatusPreparer(ctx context.Context, resour
// GetStatusSender sends the GetStatus request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) GetStatusSender(req *http.Request) (future PacketCapturesGetStatusFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -428,8 +425,7 @@ func (client PacketCapturesClient) ListPreparer(ctx context.Context, resourceGro
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -501,9 +497,8 @@ func (client PacketCapturesClient) StopPreparer(ctx context.Context, resourceGro
// StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error.
func (client PacketCapturesClient) StopSender(req *http.Request) (future PacketCapturesStopFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/peerexpressroutecircuitconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/peerexpressroutecircuitconnections.go
index 14a291ff3..300bbdee4 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/peerexpressroutecircuitconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/peerexpressroutecircuitconnections.go
@@ -37,7 +37,8 @@ func NewPeerExpressRouteCircuitConnectionsClient(subscriptionID string) PeerExpr
}
// NewPeerExpressRouteCircuitConnectionsClientWithBaseURI creates an instance of the
-// PeerExpressRouteCircuitConnectionsClient client.
+// 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)}
}
@@ -106,8 +107,7 @@ func (client PeerExpressRouteCircuitConnectionsClient) GetPreparer(ctx context.C
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -186,8 +186,7 @@ func (client PeerExpressRouteCircuitConnectionsClient) ListPreparer(ctx context.
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/privateendpoints.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/privateendpoints.go
index d2a9b8489..2fb5f307b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/privateendpoints.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/privateendpoints.go
@@ -35,7 +35,9 @@ func NewPrivateEndpointsClient(subscriptionID string) PrivateEndpointsClient {
return NewPrivateEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewPrivateEndpointsClientWithBaseURI creates an instance of the PrivateEndpointsClient client.
+// NewPrivateEndpointsClientWithBaseURI creates an instance of the PrivateEndpointsClient 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 NewPrivateEndpointsClientWithBaseURI(baseURI string, subscriptionID string) PrivateEndpointsClient {
return PrivateEndpointsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -97,9 +99,8 @@ func (client PrivateEndpointsClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client PrivateEndpointsClient) CreateOrUpdateSender(req *http.Request) (future PrivateEndpointsCreateOrUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -174,9 +175,8 @@ func (client PrivateEndpointsClient) DeletePreparer(ctx context.Context, resourc
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client PrivateEndpointsClient) DeleteSender(req *http.Request) (future PrivateEndpointsDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -260,8 +260,7 @@ func (client PrivateEndpointsClient) GetPreparer(ctx context.Context, resourceGr
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client PrivateEndpointsClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -336,8 +335,7 @@ func (client PrivateEndpointsClient) ListPreparer(ctx context.Context, resourceG
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client PrivateEndpointsClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -446,8 +444,7 @@ func (client PrivateEndpointsClient) ListBySubscriptionPreparer(ctx context.Cont
// ListBySubscriptionSender sends the ListBySubscription request. The method will close the
// http.Response Body if it receives an error.
func (client PrivateEndpointsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/privatelinkservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/privatelinkservices.go
index 98ed330c4..3562ec31d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/privatelinkservices.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/privatelinkservices.go
@@ -35,7 +35,9 @@ func NewPrivateLinkServicesClient(subscriptionID string) PrivateLinkServicesClie
return NewPrivateLinkServicesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewPrivateLinkServicesClientWithBaseURI creates an instance of the PrivateLinkServicesClient client.
+// NewPrivateLinkServicesClientWithBaseURI creates an instance of the PrivateLinkServicesClient 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 NewPrivateLinkServicesClientWithBaseURI(baseURI string, subscriptionID string) PrivateLinkServicesClient {
return PrivateLinkServicesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -101,8 +103,7 @@ func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityPrepare
// CheckPrivateLinkServiceVisibilitySender sends the CheckPrivateLinkServiceVisibility request. The method will close the
// http.Response Body if it receives an error.
func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilitySender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// CheckPrivateLinkServiceVisibilityResponder handles the response to the CheckPrivateLinkServiceVisibility request. The method always
@@ -181,8 +182,7 @@ func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityByResou
// CheckPrivateLinkServiceVisibilityByResourceGroupSender sends the CheckPrivateLinkServiceVisibilityByResourceGroup request. The method will close the
// http.Response Body if it receives an error.
func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityByResourceGroupSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// CheckPrivateLinkServiceVisibilityByResourceGroupResponder handles the response to the CheckPrivateLinkServiceVisibilityByResourceGroup request. The method always
@@ -255,9 +255,8 @@ func (client PrivateLinkServicesClient) CreateOrUpdatePreparer(ctx context.Conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client PrivateLinkServicesClient) CreateOrUpdateSender(req *http.Request) (future PrivateLinkServicesCreateOrUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -332,9 +331,8 @@ func (client PrivateLinkServicesClient) DeletePreparer(ctx context.Context, reso
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client PrivateLinkServicesClient) DeleteSender(req *http.Request) (future PrivateLinkServicesDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -410,9 +408,8 @@ func (client PrivateLinkServicesClient) DeletePrivateEndpointConnectionPreparer(
// DeletePrivateEndpointConnectionSender sends the DeletePrivateEndpointConnection request. The method will close the
// http.Response Body if it receives an error.
func (client PrivateLinkServicesClient) DeletePrivateEndpointConnectionSender(req *http.Request) (future PrivateLinkServicesDeletePrivateEndpointConnectionFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -496,8 +493,7 @@ func (client PrivateLinkServicesClient) GetPreparer(ctx context.Context, resourc
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client PrivateLinkServicesClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -572,8 +568,7 @@ func (client PrivateLinkServicesClient) ListPreparer(ctx context.Context, resour
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client PrivateLinkServicesClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -686,8 +681,7 @@ func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesPrepa
// ListAutoApprovedPrivateLinkServicesSender sends the ListAutoApprovedPrivateLinkServices request. The method will close the
// http.Response Body if it receives an error.
func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListAutoApprovedPrivateLinkServicesResponder handles the response to the ListAutoApprovedPrivateLinkServices request. The method always
@@ -802,8 +796,7 @@ func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesByRes
// ListAutoApprovedPrivateLinkServicesByResourceGroupSender sends the ListAutoApprovedPrivateLinkServicesByResourceGroup request. The method will close the
// http.Response Body if it receives an error.
func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesByResourceGroupSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListAutoApprovedPrivateLinkServicesByResourceGroupResponder handles the response to the ListAutoApprovedPrivateLinkServicesByResourceGroup request. The method always
@@ -912,8 +905,7 @@ func (client PrivateLinkServicesClient) ListBySubscriptionPreparer(ctx context.C
// ListBySubscriptionSender sends the ListBySubscription request. The method will close the
// http.Response Body if it receives an error.
func (client PrivateLinkServicesClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always
@@ -1034,8 +1026,7 @@ func (client PrivateLinkServicesClient) UpdatePrivateEndpointConnectionPreparer(
// UpdatePrivateEndpointConnectionSender sends the UpdatePrivateEndpointConnection request. The method will close the
// http.Response Body if it receives an error.
func (client PrivateLinkServicesClient) UpdatePrivateEndpointConnectionSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// UpdatePrivateEndpointConnectionResponder handles the response to the UpdatePrivateEndpointConnection request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/profiles.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/profiles.go
index 876800a52..1065bca51 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/profiles.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/profiles.go
@@ -35,7 +35,8 @@ func NewProfilesClient(subscriptionID string) ProfilesClient {
return NewProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient client.
+// 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)}
}
@@ -103,8 +104,7 @@ func (client ProfilesClient) CreateOrUpdatePreparer(ctx context.Context, resourc
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
@@ -174,9 +174,8 @@ func (client ProfilesClient) DeletePreparer(ctx context.Context, resourceGroupNa
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -260,8 +259,7 @@ func (client ProfilesClient) GetPreparer(ctx context.Context, resourceGroupName
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -336,8 +334,7 @@ func (client ProfilesClient) ListPreparer(ctx context.Context, resourceGroupName
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -446,8 +443,7 @@ func (client ProfilesClient) ListAllPreparer(ctx context.Context) (*http.Request
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListAllResponder handles the response to the ListAll request. The method always
@@ -563,8 +559,7 @@ func (client ProfilesClient) UpdateTagsPreparer(ctx context.Context, resourceGro
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// UpdateTagsResponder handles the response to the UpdateTags request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/publicipaddresses.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/publicipaddresses.go
index 89e48d9cd..fc38f44dd 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/publicipaddresses.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/publicipaddresses.go
@@ -36,7 +36,9 @@ func NewPublicIPAddressesClient(subscriptionID string) PublicIPAddressesClient {
return NewPublicIPAddressesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewPublicIPAddressesClientWithBaseURI creates an instance of the PublicIPAddressesClient client.
+// NewPublicIPAddressesClientWithBaseURI creates an instance of the PublicIPAddressesClient 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 NewPublicIPAddressesClientWithBaseURI(baseURI string, subscriptionID string) PublicIPAddressesClient {
return PublicIPAddressesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -109,9 +111,8 @@ func (client PublicIPAddressesClient) CreateOrUpdatePreparer(ctx context.Context
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) CreateOrUpdateSender(req *http.Request) (future PublicIPAddressesCreateOrUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -186,9 +187,8 @@ func (client PublicIPAddressesClient) DeletePreparer(ctx context.Context, resour
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) DeleteSender(req *http.Request) (future PublicIPAddressesDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -272,8 +272,7 @@ func (client PublicIPAddressesClient) GetPreparer(ctx context.Context, resourceG
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -361,8 +360,7 @@ func (client PublicIPAddressesClient) GetVirtualMachineScaleSetPublicIPAddressPr
// GetVirtualMachineScaleSetPublicIPAddressSender sends the GetVirtualMachineScaleSetPublicIPAddress request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) GetVirtualMachineScaleSetPublicIPAddressSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetVirtualMachineScaleSetPublicIPAddressResponder handles the response to the GetVirtualMachineScaleSetPublicIPAddress request. The method always
@@ -437,8 +435,7 @@ func (client PublicIPAddressesClient) ListPreparer(ctx context.Context, resource
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -547,8 +544,7 @@ func (client PublicIPAddressesClient) ListAllPreparer(ctx context.Context) (*htt
// ListAllSender sends the ListAll request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) ListAllSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListAllResponder handles the response to the ListAll request. The method always
@@ -663,8 +659,7 @@ func (client PublicIPAddressesClient) ListVirtualMachineScaleSetPublicIPAddresse
// ListVirtualMachineScaleSetPublicIPAddressesSender sends the ListVirtualMachineScaleSetPublicIPAddresses request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) ListVirtualMachineScaleSetPublicIPAddressesSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListVirtualMachineScaleSetPublicIPAddressesResponder handles the response to the ListVirtualMachineScaleSetPublicIPAddresses request. The method always
@@ -785,8 +780,7 @@ func (client PublicIPAddressesClient) ListVirtualMachineScaleSetVMPublicIPAddres
// ListVirtualMachineScaleSetVMPublicIPAddressesSender sends the ListVirtualMachineScaleSetVMPublicIPAddresses request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) ListVirtualMachineScaleSetVMPublicIPAddressesSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListVirtualMachineScaleSetVMPublicIPAddressesResponder handles the response to the ListVirtualMachineScaleSetVMPublicIPAddresses request. The method always
@@ -896,9 +890,8 @@ func (client PublicIPAddressesClient) UpdateTagsPreparer(ctx context.Context, re
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) UpdateTagsSender(req *http.Request) (future PublicIPAddressesUpdateTagsFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/publicipprefixes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/publicipprefixes.go
index 307dc426a..c4ca5fb5d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/publicipprefixes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/publicipprefixes.go
@@ -35,7 +35,9 @@ func NewPublicIPPrefixesClient(subscriptionID string) PublicIPPrefixesClient {
return NewPublicIPPrefixesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewPublicIPPrefixesClientWithBaseURI creates an instance of the PublicIPPrefixesClient client.
+// 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)}
}
@@ -97,9 +99,8 @@ func (client PublicIPPrefixesClient) CreateOrUpdatePreparer(ctx context.Context,
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -174,9 +175,8 @@ func (client PublicIPPrefixesClient) DeletePreparer(ctx context.Context, resourc
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -260,8 +260,7 @@ func (client PublicIPPrefixesClient) GetPreparer(ctx context.Context, resourceGr
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -336,8 +335,7 @@ func (client PublicIPPrefixesClient) ListPreparer(ctx context.Context, resourceG
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -446,8 +444,7 @@ func (client PublicIPPrefixesClient) ListAllPreparer(ctx context.Context) (*http
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListAllResponder handles the response to the ListAll request. The method always
@@ -557,9 +554,8 @@ func (client PublicIPPrefixesClient) UpdateTagsPreparer(ctx context.Context, res
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/resourcenavigationlinks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/resourcenavigationlinks.go
index 489f7abee..af9de96b5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/resourcenavigationlinks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/resourcenavigationlinks.go
@@ -35,7 +35,9 @@ func NewResourceNavigationLinksClient(subscriptionID string) ResourceNavigationL
return NewResourceNavigationLinksClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewResourceNavigationLinksClientWithBaseURI creates an instance of the ResourceNavigationLinksClient client.
+// NewResourceNavigationLinksClientWithBaseURI creates an instance of the ResourceNavigationLinksClient 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 NewResourceNavigationLinksClientWithBaseURI(baseURI string, subscriptionID string) ResourceNavigationLinksClient {
return ResourceNavigationLinksClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -102,8 +104,7 @@ func (client ResourceNavigationLinksClient) ListPreparer(ctx context.Context, re
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client ResourceNavigationLinksClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routefilterrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routefilterrules.go
index e31ba18c8..4dcb6313a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routefilterrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routefilterrules.go
@@ -36,7 +36,9 @@ func NewRouteFilterRulesClient(subscriptionID string) RouteFilterRulesClient {
return NewRouteFilterRulesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewRouteFilterRulesClientWithBaseURI creates an instance of the RouteFilterRulesClient client.
+// NewRouteFilterRulesClientWithBaseURI creates an instance of the RouteFilterRulesClient 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 NewRouteFilterRulesClientWithBaseURI(baseURI string, subscriptionID string) RouteFilterRulesClient {
return RouteFilterRulesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -110,9 +112,8 @@ func (client RouteFilterRulesClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) CreateOrUpdateSender(req *http.Request) (future RouteFilterRulesCreateOrUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -189,9 +190,8 @@ func (client RouteFilterRulesClient) DeletePreparer(ctx context.Context, resourc
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) DeleteSender(req *http.Request) (future RouteFilterRulesDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -273,8 +273,7 @@ func (client RouteFilterRulesClient) GetPreparer(ctx context.Context, resourceGr
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -351,8 +350,7 @@ func (client RouteFilterRulesClient) ListByRouteFilterPreparer(ctx context.Conte
// ListByRouteFilterSender sends the ListByRouteFilter request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) ListByRouteFilterSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByRouteFilterResponder handles the response to the ListByRouteFilter request. The method always
@@ -466,9 +464,8 @@ func (client RouteFilterRulesClient) UpdatePreparer(ctx context.Context, resourc
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) UpdateSender(req *http.Request) (future RouteFilterRulesUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routefilters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routefilters.go
index 3dcc02fb4..9fa46f808 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routefilters.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routefilters.go
@@ -35,7 +35,8 @@ func NewRouteFiltersClient(subscriptionID string) RouteFiltersClient {
return NewRouteFiltersClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewRouteFiltersClientWithBaseURI creates an instance of the RouteFiltersClient client.
+// NewRouteFiltersClientWithBaseURI creates an instance of the RouteFiltersClient 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 NewRouteFiltersClientWithBaseURI(baseURI string, subscriptionID string) RouteFiltersClient {
return RouteFiltersClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -98,9 +99,8 @@ func (client RouteFiltersClient) CreateOrUpdatePreparer(ctx context.Context, res
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFiltersClient) CreateOrUpdateSender(req *http.Request) (future RouteFiltersCreateOrUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -175,9 +175,8 @@ func (client RouteFiltersClient) DeletePreparer(ctx context.Context, resourceGro
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFiltersClient) DeleteSender(req *http.Request) (future RouteFiltersDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -261,8 +260,7 @@ func (client RouteFiltersClient) GetPreparer(ctx context.Context, resourceGroupN
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFiltersClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -334,8 +332,7 @@ func (client RouteFiltersClient) ListPreparer(ctx context.Context) (*http.Reques
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFiltersClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -447,8 +444,7 @@ func (client RouteFiltersClient) ListByResourceGroupPreparer(ctx context.Context
// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFiltersClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
@@ -561,9 +557,8 @@ func (client RouteFiltersClient) UpdatePreparer(ctx context.Context, resourceGro
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFiltersClient) UpdateSender(req *http.Request) (future RouteFiltersUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routes.go
index 937a076f0..683a73c58 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routes.go
@@ -35,7 +35,8 @@ func NewRoutesClient(subscriptionID string) RoutesClient {
return NewRoutesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewRoutesClientWithBaseURI creates an instance of the RoutesClient client.
+// NewRoutesClientWithBaseURI creates an instance of the RoutesClient 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 NewRoutesClientWithBaseURI(baseURI string, subscriptionID string) RoutesClient {
return RoutesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -99,9 +100,8 @@ func (client RoutesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RoutesClient) CreateOrUpdateSender(req *http.Request) (future RoutesCreateOrUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -178,9 +178,8 @@ func (client RoutesClient) DeletePreparer(ctx context.Context, resourceGroupName
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RoutesClient) DeleteSender(req *http.Request) (future RoutesDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -262,8 +261,7 @@ func (client RoutesClient) GetPreparer(ctx context.Context, resourceGroupName st
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client RoutesClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -340,8 +338,7 @@ func (client RoutesClient) ListPreparer(ctx context.Context, resourceGroupName s
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client RoutesClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routetables.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routetables.go
index a66a1e051..8c1e0a739 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routetables.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routetables.go
@@ -35,7 +35,8 @@ func NewRouteTablesClient(subscriptionID string) RouteTablesClient {
return NewRouteTablesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewRouteTablesClientWithBaseURI creates an instance of the RouteTablesClient client.
+// NewRouteTablesClientWithBaseURI creates an instance of the RouteTablesClient 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 NewRouteTablesClientWithBaseURI(baseURI string, subscriptionID string) RouteTablesClient {
return RouteTablesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -97,9 +98,8 @@ func (client RouteTablesClient) CreateOrUpdatePreparer(ctx context.Context, reso
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) CreateOrUpdateSender(req *http.Request) (future RouteTablesCreateOrUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -174,9 +174,8 @@ func (client RouteTablesClient) DeletePreparer(ctx context.Context, resourceGrou
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) DeleteSender(req *http.Request) (future RouteTablesDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -260,8 +259,7 @@ func (client RouteTablesClient) GetPreparer(ctx context.Context, resourceGroupNa
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -336,8 +334,7 @@ func (client RouteTablesClient) ListPreparer(ctx context.Context, resourceGroupN
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -446,8 +443,7 @@ func (client RouteTablesClient) ListAllPreparer(ctx context.Context) (*http.Requ
// ListAllSender sends the ListAll request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) ListAllSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListAllResponder handles the response to the ListAll request. The method always
@@ -557,9 +553,8 @@ func (client RouteTablesClient) UpdateTagsPreparer(ctx context.Context, resource
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client RouteTablesClient) UpdateTagsSender(req *http.Request) (future RouteTablesUpdateTagsFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/securitygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/securitygroups.go
index 84a24cee4..d50d4e1b1 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/securitygroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/securitygroups.go
@@ -35,7 +35,8 @@ func NewSecurityGroupsClient(subscriptionID string) SecurityGroupsClient {
return NewSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewSecurityGroupsClientWithBaseURI creates an instance of the SecurityGroupsClient client.
+// NewSecurityGroupsClientWithBaseURI creates an instance of the SecurityGroupsClient 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 NewSecurityGroupsClientWithBaseURI(baseURI string, subscriptionID string) SecurityGroupsClient {
return SecurityGroupsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -97,9 +98,8 @@ func (client SecurityGroupsClient) CreateOrUpdatePreparer(ctx context.Context, r
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) CreateOrUpdateSender(req *http.Request) (future SecurityGroupsCreateOrUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -174,9 +174,8 @@ func (client SecurityGroupsClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) DeleteSender(req *http.Request) (future SecurityGroupsDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -260,8 +259,7 @@ func (client SecurityGroupsClient) GetPreparer(ctx context.Context, resourceGrou
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -336,8 +334,7 @@ func (client SecurityGroupsClient) ListPreparer(ctx context.Context, resourceGro
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -446,8 +443,7 @@ func (client SecurityGroupsClient) ListAllPreparer(ctx context.Context) (*http.R
// ListAllSender sends the ListAll request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) ListAllSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListAllResponder handles the response to the ListAll request. The method always
@@ -557,9 +553,8 @@ func (client SecurityGroupsClient) UpdateTagsPreparer(ctx context.Context, resou
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) UpdateTagsSender(req *http.Request) (future SecurityGroupsUpdateTagsFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/securityrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/securityrules.go
index 1dbcf6703..8ac672da3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/securityrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/securityrules.go
@@ -35,7 +35,8 @@ func NewSecurityRulesClient(subscriptionID string) SecurityRulesClient {
return NewSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewSecurityRulesClientWithBaseURI creates an instance of the SecurityRulesClient client.
+// NewSecurityRulesClientWithBaseURI creates an instance of the SecurityRulesClient 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 NewSecurityRulesClientWithBaseURI(baseURI string, subscriptionID string) SecurityRulesClient {
return SecurityRulesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -99,9 +100,8 @@ func (client SecurityRulesClient) CreateOrUpdatePreparer(ctx context.Context, re
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityRulesClient) CreateOrUpdateSender(req *http.Request) (future SecurityRulesCreateOrUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -178,9 +178,8 @@ func (client SecurityRulesClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityRulesClient) DeleteSender(req *http.Request) (future SecurityRulesDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -262,8 +261,7 @@ func (client SecurityRulesClient) GetPreparer(ctx context.Context, resourceGroup
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityRulesClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -340,8 +338,7 @@ func (client SecurityRulesClient) ListPreparer(ctx context.Context, resourceGrou
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client SecurityRulesClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceassociationlinks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceassociationlinks.go
index 2f20bb324..30e88928f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceassociationlinks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceassociationlinks.go
@@ -35,7 +35,9 @@ func NewServiceAssociationLinksClient(subscriptionID string) ServiceAssociationL
return NewServiceAssociationLinksClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewServiceAssociationLinksClientWithBaseURI creates an instance of the ServiceAssociationLinksClient client.
+// NewServiceAssociationLinksClientWithBaseURI creates an instance of the ServiceAssociationLinksClient 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 NewServiceAssociationLinksClientWithBaseURI(baseURI string, subscriptionID string) ServiceAssociationLinksClient {
return ServiceAssociationLinksClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -102,8 +104,7 @@ func (client ServiceAssociationLinksClient) ListPreparer(ctx context.Context, re
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client ServiceAssociationLinksClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceendpointpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceendpointpolicies.go
index 09c5054b7..6ca72e593 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceendpointpolicies.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceendpointpolicies.go
@@ -35,7 +35,9 @@ func NewServiceEndpointPoliciesClient(subscriptionID string) ServiceEndpointPoli
return NewServiceEndpointPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewServiceEndpointPoliciesClientWithBaseURI creates an instance of the ServiceEndpointPoliciesClient client.
+// 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)}
}
@@ -97,9 +99,8 @@ func (client ServiceEndpointPoliciesClient) CreateOrUpdatePreparer(ctx context.C
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -174,9 +175,8 @@ func (client ServiceEndpointPoliciesClient) DeletePreparer(ctx context.Context,
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -260,8 +260,7 @@ func (client ServiceEndpointPoliciesClient) GetPreparer(ctx context.Context, res
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -333,8 +332,7 @@ func (client ServiceEndpointPoliciesClient) ListPreparer(ctx context.Context) (*
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -446,8 +444,7 @@ func (client ServiceEndpointPoliciesClient) ListByResourceGroupPreparer(ctx cont
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
@@ -557,9 +554,8 @@ func (client ServiceEndpointPoliciesClient) UpdatePreparer(ctx context.Context,
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceendpointpolicydefinitions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceendpointpolicydefinitions.go
index fd7a8bcc2..d819d08ec 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceendpointpolicydefinitions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceendpointpolicydefinitions.go
@@ -36,7 +36,8 @@ func NewServiceEndpointPolicyDefinitionsClient(subscriptionID string) ServiceEnd
}
// NewServiceEndpointPolicyDefinitionsClientWithBaseURI creates an instance of the
-// ServiceEndpointPolicyDefinitionsClient client.
+// 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)}
}
@@ -101,9 +102,8 @@ func (client ServiceEndpointPolicyDefinitionsClient) CreateOrUpdatePreparer(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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -180,9 +180,8 @@ func (client ServiceEndpointPolicyDefinitionsClient) DeletePreparer(ctx context.
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -264,8 +263,7 @@ func (client ServiceEndpointPolicyDefinitionsClient) GetPreparer(ctx context.Con
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -342,8 +340,7 @@ func (client ServiceEndpointPolicyDefinitionsClient) ListByResourceGroupPreparer
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/servicetags.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/servicetags.go
index f7d39cf55..7c1ecee53 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/servicetags.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/servicetags.go
@@ -35,7 +35,8 @@ func NewServiceTagsClient(subscriptionID string) ServiceTagsClient {
return NewServiceTagsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewServiceTagsClientWithBaseURI creates an instance of the ServiceTagsClient client.
+// NewServiceTagsClientWithBaseURI creates an instance of the ServiceTagsClient 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 NewServiceTagsClientWithBaseURI(baseURI string, subscriptionID string) ServiceTagsClient {
return ServiceTagsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -100,8 +101,7 @@ func (client ServiceTagsClient) ListPreparer(ctx context.Context, location strin
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client ServiceTagsClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/subnets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/subnets.go
index a2f917cad..1839538c5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/subnets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/subnets.go
@@ -35,7 +35,8 @@ func NewSubnetsClient(subscriptionID string) SubnetsClient {
return NewSubnetsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewSubnetsClientWithBaseURI creates an instance of the SubnetsClient client.
+// NewSubnetsClientWithBaseURI creates an instance of the SubnetsClient 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 NewSubnetsClientWithBaseURI(baseURI string, subscriptionID string) SubnetsClient {
return SubnetsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -99,9 +100,8 @@ func (client SubnetsClient) CreateOrUpdatePreparer(ctx context.Context, resource
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client SubnetsClient) CreateOrUpdateSender(req *http.Request) (future SubnetsCreateOrUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -178,9 +178,8 @@ func (client SubnetsClient) DeletePreparer(ctx context.Context, resourceGroupNam
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client SubnetsClient) DeleteSender(req *http.Request) (future SubnetsDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -266,8 +265,7 @@ func (client SubnetsClient) GetPreparer(ctx context.Context, resourceGroupName s
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client SubnetsClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -344,8 +342,7 @@ func (client SubnetsClient) ListPreparer(ctx context.Context, resourceGroupName
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client SubnetsClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -458,9 +455,8 @@ func (client SubnetsClient) PrepareNetworkPoliciesPreparer(ctx context.Context,
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -540,9 +536,8 @@ func (client SubnetsClient) UnprepareNetworkPoliciesPreparer(ctx context.Context
// UnprepareNetworkPoliciesSender sends the UnprepareNetworkPolicies request. The method will close the
// http.Response Body if it receives an error.
func (client SubnetsClient) UnprepareNetworkPoliciesSender(req *http.Request) (future SubnetsUnprepareNetworkPoliciesFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/usages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/usages.go
index 69e4fba8a..a73e8b911 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/usages.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/usages.go
@@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient {
return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client.
+// NewUsagesClientWithBaseURI creates an instance of the UsagesClient 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 NewUsagesClientWithBaseURI(baseURI string, subscriptionID string) UsagesClient {
return UsagesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -106,8 +107,7 @@ func (client UsagesClient) ListPreparer(ctx context.Context, location string) (*
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client UsagesClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/version.go
index 3b472ba57..74c7d35e8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/version.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-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.Number + " network/2019-06-01"
+ return "Azure-SDK-For-Go/" + Version() + " network/2019-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/network/mgmt/2019-06-01/network/virtualhubs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualhubs.go
index 6a86528d1..16fdbc9ef 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualhubs.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualhubs.go
@@ -35,7 +35,8 @@ func NewVirtualHubsClient(subscriptionID string) VirtualHubsClient {
return NewVirtualHubsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewVirtualHubsClientWithBaseURI creates an instance of the VirtualHubsClient client.
+// 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)}
}
@@ -98,9 +99,8 @@ func (client VirtualHubsClient) CreateOrUpdatePreparer(ctx context.Context, reso
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -175,9 +175,8 @@ func (client VirtualHubsClient) DeletePreparer(ctx context.Context, resourceGrou
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -257,8 +256,7 @@ func (client VirtualHubsClient) GetPreparer(ctx context.Context, resourceGroupNa
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -330,8 +328,7 @@ func (client VirtualHubsClient) ListPreparer(ctx context.Context) (*http.Request
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -443,8 +440,7 @@ func (client VirtualHubsClient) ListByResourceGroupPreparer(ctx context.Context,
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
@@ -554,9 +550,8 @@ func (client VirtualHubsClient) UpdateTagsPreparer(ctx context.Context, resource
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkgatewayconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkgatewayconnections.go
index 7875cf5ea..b0a58ff25 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkgatewayconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkgatewayconnections.go
@@ -37,7 +37,8 @@ func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string) VirtualNet
}
// NewVirtualNetworkGatewayConnectionsClientWithBaseURI creates an instance of the
-// VirtualNetworkGatewayConnectionsClient client.
+// VirtualNetworkGatewayConnectionsClient 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 NewVirtualNetworkGatewayConnectionsClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkGatewayConnectionsClient {
return VirtualNetworkGatewayConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -112,9 +113,8 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdatePreparer(ctx
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -189,9 +189,8 @@ func (client VirtualNetworkGatewayConnectionsClient) DeletePreparer(ctx context.
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewayConnectionsDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -271,8 +270,7 @@ func (client VirtualNetworkGatewayConnectionsClient) GetPreparer(ctx context.Con
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -349,8 +347,7 @@ func (client VirtualNetworkGatewayConnectionsClient) GetSharedKeyPreparer(ctx co
// GetSharedKeySender sends the GetSharedKey request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) GetSharedKeySender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetSharedKeyResponder handles the response to the GetSharedKey request. The method always
@@ -426,8 +423,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ListPreparer(ctx context.Co
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -503,7 +499,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKey(ctx context.
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.Null, Rule: true,
Chain: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil},
- {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil},
+ {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil},
}}}}}); err != nil {
return result, validation.NewError("network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", err.Error())
}
@@ -549,9 +545,8 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeyPreparer(ctx
// ResetSharedKeySender sends the ResetSharedKey request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -638,9 +633,8 @@ func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeyPreparer(ctx co
// SetSharedKeySender sends the SetSharedKey request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -718,9 +712,8 @@ func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsPreparer(ctx cont
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsSender(req *http.Request) (future VirtualNetworkGatewayConnectionsUpdateTagsFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkgateways.go
index cd31f47b6..c841611e5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkgateways.go
@@ -36,7 +36,9 @@ func NewVirtualNetworkGatewaysClient(subscriptionID string) VirtualNetworkGatewa
return NewVirtualNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewVirtualNetworkGatewaysClientWithBaseURI creates an instance of the VirtualNetworkGatewaysClient client.
+// NewVirtualNetworkGatewaysClientWithBaseURI creates an instance of the VirtualNetworkGatewaysClient 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 NewVirtualNetworkGatewaysClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkGatewaysClient {
return VirtualNetworkGatewaysClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -104,9 +106,8 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Co
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewaysCreateOrUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -181,9 +182,8 @@ func (client VirtualNetworkGatewaysClient) DeletePreparer(ctx context.Context, r
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewaysDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -261,9 +261,8 @@ func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackagePreparer(ctx
// GeneratevpnclientpackageSender sends the Generatevpnclientpackage request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackageSender(req *http.Request) (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -342,9 +341,8 @@ func (client VirtualNetworkGatewaysClient) GenerateVpnProfilePreparer(ctx contex
// GenerateVpnProfileSender sends the GenerateVpnProfile request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GenerateVpnProfileSender(req *http.Request) (future VirtualNetworkGatewaysGenerateVpnProfileFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -425,8 +423,7 @@ func (client VirtualNetworkGatewaysClient) GetPreparer(ctx context.Context, reso
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -499,9 +496,8 @@ func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesPreparer(ctx conte
// GetAdvertisedRoutesSender sends the GetAdvertisedRoutes request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesSender(req *http.Request) (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -580,9 +576,8 @@ func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusPreparer(ctx context.
// GetBgpPeerStatusSender sends the GetBgpPeerStatus request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusSender(req *http.Request) (future VirtualNetworkGatewaysGetBgpPeerStatusFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -658,9 +653,8 @@ func (client VirtualNetworkGatewaysClient) GetLearnedRoutesPreparer(ctx context.
// GetLearnedRoutesSender sends the GetLearnedRoutes request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetLearnedRoutesSender(req *http.Request) (future VirtualNetworkGatewaysGetLearnedRoutesFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -736,9 +730,8 @@ func (client VirtualNetworkGatewaysClient) GetVpnclientConnectionHealthPreparer(
// GetVpnclientConnectionHealthSender sends the GetVpnclientConnectionHealth request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetVpnclientConnectionHealthSender(req *http.Request) (future VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -815,9 +808,8 @@ func (client VirtualNetworkGatewaysClient) GetVpnclientIpsecParametersPreparer(c
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -893,9 +885,8 @@ func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURLPreparer(ctx c
// GetVpnProfilePackageURLSender sends the GetVpnProfilePackageURL request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURLSender(req *http.Request) (future VirtualNetworkGatewaysGetVpnProfilePackageURLFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -975,8 +966,7 @@ func (client VirtualNetworkGatewaysClient) ListPreparer(ctx context.Context, res
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -1090,8 +1080,7 @@ func (client VirtualNetworkGatewaysClient) ListConnectionsPreparer(ctx context.C
// ListConnectionsSender sends the ListConnections request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) ListConnectionsSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListConnectionsResponder handles the response to the ListConnections request. The method always
@@ -1203,9 +1192,8 @@ func (client VirtualNetworkGatewaysClient) ResetPreparer(ctx context.Context, re
// ResetSender sends the Reset request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) ResetSender(req *http.Request) (future VirtualNetworkGatewaysResetFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -1281,9 +1269,8 @@ func (client VirtualNetworkGatewaysClient) ResetVpnClientSharedKeyPreparer(ctx c
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -1369,9 +1356,8 @@ func (client VirtualNetworkGatewaysClient) SetVpnclientIpsecParametersPreparer(c
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -1452,8 +1438,7 @@ func (client VirtualNetworkGatewaysClient) SupportedVpnDevicesPreparer(ctx conte
// SupportedVpnDevicesSender sends the SupportedVpnDevices request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) SupportedVpnDevicesSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// SupportedVpnDevicesResponder handles the response to the SupportedVpnDevices request. The method always
@@ -1526,9 +1511,8 @@ func (client VirtualNetworkGatewaysClient) UpdateTagsPreparer(ctx context.Contex
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) UpdateTagsSender(req *http.Request) (future VirtualNetworkGatewaysUpdateTagsFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -1613,8 +1597,7 @@ func (client VirtualNetworkGatewaysClient) VpnDeviceConfigurationScriptPreparer(
// VpnDeviceConfigurationScriptSender sends the VpnDeviceConfigurationScript request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) VpnDeviceConfigurationScriptSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// VpnDeviceConfigurationScriptResponder handles the response to the VpnDeviceConfigurationScript request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkpeerings.go
index fe6d6b543..bd0380b24 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkpeerings.go
@@ -35,7 +35,9 @@ func NewVirtualNetworkPeeringsClient(subscriptionID string) VirtualNetworkPeerin
return NewVirtualNetworkPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewVirtualNetworkPeeringsClientWithBaseURI creates an instance of the VirtualNetworkPeeringsClient client.
+// NewVirtualNetworkPeeringsClientWithBaseURI creates an instance of the VirtualNetworkPeeringsClient 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 NewVirtualNetworkPeeringsClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkPeeringsClient {
return VirtualNetworkPeeringsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -100,9 +102,8 @@ func (client VirtualNetworkPeeringsClient) CreateOrUpdatePreparer(ctx context.Co
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkPeeringsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkPeeringsCreateOrUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -179,9 +180,8 @@ func (client VirtualNetworkPeeringsClient) DeletePreparer(ctx context.Context, r
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkPeeringsClient) DeleteSender(req *http.Request) (future VirtualNetworkPeeringsDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -263,8 +263,7 @@ func (client VirtualNetworkPeeringsClient) GetPreparer(ctx context.Context, reso
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkPeeringsClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -341,8 +340,7 @@ func (client VirtualNetworkPeeringsClient) ListPreparer(ctx context.Context, res
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworkPeeringsClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworks.go
index 023a9e860..48350c1d1 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworks.go
@@ -35,7 +35,8 @@ func NewVirtualNetworksClient(subscriptionID string) VirtualNetworksClient {
return NewVirtualNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewVirtualNetworksClientWithBaseURI creates an instance of the VirtualNetworksClient client.
+// NewVirtualNetworksClientWithBaseURI creates an instance of the VirtualNetworksClient 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 NewVirtualNetworksClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworksClient {
return VirtualNetworksClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -102,8 +103,7 @@ func (client VirtualNetworksClient) CheckIPAddressAvailabilityPreparer(ctx conte
// CheckIPAddressAvailabilitySender sends the CheckIPAddressAvailability request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) CheckIPAddressAvailabilitySender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// CheckIPAddressAvailabilityResponder handles the response to the CheckIPAddressAvailability request. The method always
@@ -176,9 +176,8 @@ func (client VirtualNetworksClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworksCreateOrUpdateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -253,9 +252,8 @@ func (client VirtualNetworksClient) DeletePreparer(ctx context.Context, resource
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) DeleteSender(req *http.Request) (future VirtualNetworksDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -339,8 +337,7 @@ func (client VirtualNetworksClient) GetPreparer(ctx context.Context, resourceGro
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -415,8 +412,7 @@ func (client VirtualNetworksClient) ListPreparer(ctx context.Context, resourceGr
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -525,8 +521,7 @@ func (client VirtualNetworksClient) ListAllPreparer(ctx context.Context) (*http.
// ListAllSender sends the ListAll request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) ListAllSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListAllResponder handles the response to the ListAll request. The method always
@@ -640,8 +635,7 @@ func (client VirtualNetworksClient) ListUsagePreparer(ctx context.Context, resou
// ListUsageSender sends the ListUsage request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) ListUsageSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListUsageResponder handles the response to the ListUsage request. The method always
@@ -751,9 +745,8 @@ func (client VirtualNetworksClient) UpdateTagsPreparer(ctx context.Context, reso
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) UpdateTagsSender(req *http.Request) (future VirtualNetworksUpdateTagsFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworktaps.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworktaps.go
index 98756f901..d92b7724c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworktaps.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworktaps.go
@@ -36,7 +36,9 @@ func NewVirtualNetworkTapsClient(subscriptionID string) VirtualNetworkTapsClient
return NewVirtualNetworkTapsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewVirtualNetworkTapsClientWithBaseURI creates an instance of the VirtualNetworkTapsClient client.
+// 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)}
}
@@ -129,9 +131,8 @@ func (client VirtualNetworkTapsClient) CreateOrUpdatePreparer(ctx context.Contex
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -206,9 +207,8 @@ func (client VirtualNetworkTapsClient) DeletePreparer(ctx context.Context, resou
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -288,8 +288,7 @@ func (client VirtualNetworkTapsClient) GetPreparer(ctx context.Context, resource
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -361,8 +360,7 @@ func (client VirtualNetworkTapsClient) ListAllPreparer(ctx context.Context) (*ht
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListAllResponder handles the response to the ListAll request. The method always
@@ -474,8 +472,7 @@ func (client VirtualNetworkTapsClient) ListByResourceGroupPreparer(ctx context.C
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
@@ -585,9 +582,8 @@ func (client VirtualNetworkTapsClient) UpdateTagsPreparer(ctx context.Context, r
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualwans.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualwans.go
index 8f07a0cf2..afbb5e75e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualwans.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualwans.go
@@ -35,7 +35,8 @@ func NewVirtualWansClient(subscriptionID string) VirtualWansClient {
return NewVirtualWansClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewVirtualWansClientWithBaseURI creates an instance of the VirtualWansClient client.
+// 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)}
}
@@ -98,9 +99,8 @@ func (client VirtualWansClient) CreateOrUpdatePreparer(ctx context.Context, reso
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -175,9 +175,8 @@ func (client VirtualWansClient) DeletePreparer(ctx context.Context, resourceGrou
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -257,8 +256,7 @@ func (client VirtualWansClient) GetPreparer(ctx context.Context, resourceGroupNa
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -330,8 +328,7 @@ func (client VirtualWansClient) ListPreparer(ctx context.Context) (*http.Request
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -443,8 +440,7 @@ func (client VirtualWansClient) ListByResourceGroupPreparer(ctx context.Context,
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
@@ -554,9 +550,8 @@ func (client VirtualWansClient) UpdateTagsPreparer(ctx context.Context, resource
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnconnections.go
index 37ff6797c..df32537c5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnconnections.go
@@ -35,7 +35,8 @@ func NewVpnConnectionsClient(subscriptionID string) VpnConnectionsClient {
return NewVpnConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewVpnConnectionsClientWithBaseURI creates an instance of the VpnConnectionsClient client.
+// 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)}
}
@@ -101,9 +102,8 @@ func (client VpnConnectionsClient) CreateOrUpdatePreparer(ctx context.Context, r
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -180,9 +180,8 @@ func (client VpnConnectionsClient) DeletePreparer(ctx context.Context, resourceG
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -264,8 +263,7 @@ func (client VpnConnectionsClient) GetPreparer(ctx context.Context, resourceGrou
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -342,8 +340,7 @@ func (client VpnConnectionsClient) ListByVpnGatewayPreparer(ctx context.Context,
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByVpnGatewayResponder handles the response to the ListByVpnGateway request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpngateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpngateways.go
index ab7bd39c3..7b62842cf 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpngateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpngateways.go
@@ -35,7 +35,8 @@ func NewVpnGatewaysClient(subscriptionID string) VpnGatewaysClient {
return NewVpnGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewVpnGatewaysClientWithBaseURI creates an instance of the VpnGatewaysClient client.
+// 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)}
}
@@ -98,9 +99,8 @@ func (client VpnGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, reso
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -175,9 +175,8 @@ func (client VpnGatewaysClient) DeletePreparer(ctx context.Context, resourceGrou
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -257,8 +256,7 @@ func (client VpnGatewaysClient) GetPreparer(ctx context.Context, resourceGroupNa
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -330,8 +328,7 @@ func (client VpnGatewaysClient) ListPreparer(ctx context.Context) (*http.Request
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -443,8 +440,7 @@ func (client VpnGatewaysClient) ListByResourceGroupPreparer(ctx context.Context,
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
@@ -551,9 +547,8 @@ func (client VpnGatewaysClient) ResetPreparer(ctx context.Context, resourceGroup
// ResetSender sends the Reset request. The method will close the
// http.Response Body if it receives an error.
func (client VpnGatewaysClient) ResetSender(req *http.Request) (future VpnGatewaysResetFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -631,9 +626,8 @@ func (client VpnGatewaysClient) UpdateTagsPreparer(ctx context.Context, resource
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnlinkconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnlinkconnections.go
index 3e8da0eec..994d65ea5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnlinkconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnlinkconnections.go
@@ -35,7 +35,9 @@ func NewVpnLinkConnectionsClient(subscriptionID string) VpnLinkConnectionsClient
return NewVpnLinkConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewVpnLinkConnectionsClientWithBaseURI creates an instance of the VpnLinkConnectionsClient client.
+// NewVpnLinkConnectionsClientWithBaseURI creates an instance of the VpnLinkConnectionsClient 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 NewVpnLinkConnectionsClientWithBaseURI(baseURI string, subscriptionID string) VpnLinkConnectionsClient {
return VpnLinkConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -103,8 +105,7 @@ func (client VpnLinkConnectionsClient) ListByVpnConnectionPreparer(ctx context.C
// ListByVpnConnectionSender sends the ListByVpnConnection request. The method will close the
// http.Response Body if it receives an error.
func (client VpnLinkConnectionsClient) ListByVpnConnectionSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByVpnConnectionResponder handles the response to the ListByVpnConnection request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitelinkconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitelinkconnections.go
index 5ded318f6..040fe4f09 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitelinkconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitelinkconnections.go
@@ -35,7 +35,9 @@ func NewVpnSiteLinkConnectionsClient(subscriptionID string) VpnSiteLinkConnectio
return NewVpnSiteLinkConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewVpnSiteLinkConnectionsClientWithBaseURI creates an instance of the VpnSiteLinkConnectionsClient client.
+// NewVpnSiteLinkConnectionsClientWithBaseURI creates an instance of the VpnSiteLinkConnectionsClient 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 NewVpnSiteLinkConnectionsClientWithBaseURI(baseURI string, subscriptionID string) VpnSiteLinkConnectionsClient {
return VpnSiteLinkConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -104,8 +106,7 @@ func (client VpnSiteLinkConnectionsClient) GetPreparer(ctx context.Context, reso
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client VpnSiteLinkConnectionsClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitelinks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitelinks.go
index e84e41efb..e29d38557 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitelinks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitelinks.go
@@ -35,7 +35,8 @@ func NewVpnSiteLinksClient(subscriptionID string) VpnSiteLinksClient {
return NewVpnSiteLinksClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewVpnSiteLinksClientWithBaseURI creates an instance of the VpnSiteLinksClient client.
+// NewVpnSiteLinksClientWithBaseURI creates an instance of the VpnSiteLinksClient 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 NewVpnSiteLinksClientWithBaseURI(baseURI string, subscriptionID string) VpnSiteLinksClient {
return VpnSiteLinksClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -102,8 +103,7 @@ func (client VpnSiteLinksClient) GetPreparer(ctx context.Context, resourceGroupN
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client VpnSiteLinksClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -180,8 +180,7 @@ func (client VpnSiteLinksClient) ListByVpnSitePreparer(ctx context.Context, reso
// ListByVpnSiteSender sends the ListByVpnSite request. The method will close the
// http.Response Body if it receives an error.
func (client VpnSiteLinksClient) ListByVpnSiteSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByVpnSiteResponder handles the response to the ListByVpnSite request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsites.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsites.go
index 99f004ea1..b8ccbd91b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsites.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsites.go
@@ -35,7 +35,8 @@ func NewVpnSitesClient(subscriptionID string) VpnSitesClient {
return NewVpnSitesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewVpnSitesClientWithBaseURI creates an instance of the VpnSitesClient client.
+// 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)}
}
@@ -98,9 +99,8 @@ func (client VpnSitesClient) CreateOrUpdatePreparer(ctx context.Context, resourc
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -175,9 +175,8 @@ func (client VpnSitesClient) DeletePreparer(ctx context.Context, resourceGroupNa
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -257,8 +256,7 @@ func (client VpnSitesClient) GetPreparer(ctx context.Context, resourceGroupName
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -330,8 +328,7 @@ func (client VpnSitesClient) ListPreparer(ctx context.Context) (*http.Request, e
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -443,8 +440,7 @@ func (client VpnSitesClient) ListByResourceGroupPreparer(ctx context.Context, re
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
@@ -554,9 +550,8 @@ func (client VpnSitesClient) UpdateTagsPreparer(ctx context.Context, resourceGro
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitesconfiguration.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitesconfiguration.go
index 65d1a24ff..2c03500d6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitesconfiguration.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitesconfiguration.go
@@ -36,7 +36,9 @@ func NewVpnSitesConfigurationClient(subscriptionID string) VpnSitesConfiguration
return NewVpnSitesConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewVpnSitesConfigurationClientWithBaseURI creates an instance of the VpnSitesConfigurationClient client.
+// 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)}
}
@@ -104,9 +106,8 @@ func (client VpnSitesConfigurationClient) DownloadPreparer(ctx context.Context,
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/watchers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/watchers.go
index e330a1b97..bd9125a50 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/watchers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/watchers.go
@@ -36,7 +36,8 @@ func NewWatchersClient(subscriptionID string) WatchersClient {
return NewWatchersClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewWatchersClientWithBaseURI creates an instance of the WatchersClient client.
+// NewWatchersClientWithBaseURI creates an instance of the WatchersClient 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 NewWatchersClientWithBaseURI(baseURI string, subscriptionID string) WatchersClient {
return WatchersClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -107,9 +108,8 @@ func (client WatchersClient) CheckConnectivityPreparer(ctx context.Context, reso
// CheckConnectivitySender sends the CheckConnectivity request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) CheckConnectivitySender(req *http.Request) (future WatchersCheckConnectivityFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -193,8 +193,7 @@ func (client WatchersClient) CreateOrUpdatePreparer(ctx context.Context, resourc
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
@@ -264,9 +263,8 @@ func (client WatchersClient) DeletePreparer(ctx context.Context, resourceGroupNa
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) DeleteSender(req *http.Request) (future WatchersDeleteFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -346,8 +344,7 @@ func (client WatchersClient) GetPreparer(ctx context.Context, resourceGroupName
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -430,9 +427,8 @@ func (client WatchersClient) GetAzureReachabilityReportPreparer(ctx context.Cont
// GetAzureReachabilityReportSender sends the GetAzureReachabilityReport request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetAzureReachabilityReportSender(req *http.Request) (future WatchersGetAzureReachabilityReportFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -516,9 +512,8 @@ func (client WatchersClient) GetFlowLogStatusPreparer(ctx context.Context, resou
// GetFlowLogStatusSender sends the GetFlowLogStatus request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetFlowLogStatusSender(req *http.Request) (future WatchersGetFlowLogStatusFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -603,9 +598,8 @@ func (client WatchersClient) GetNetworkConfigurationDiagnosticPreparer(ctx conte
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -691,9 +685,8 @@ func (client WatchersClient) GetNextHopPreparer(ctx context.Context, resourceGro
// GetNextHopSender sends the GetNextHop request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetNextHopSender(req *http.Request) (future WatchersGetNextHopFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -777,8 +770,7 @@ func (client WatchersClient) GetTopologyPreparer(ctx context.Context, resourceGr
// GetTopologySender sends the GetTopology request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetTopologySender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetTopologyResponder handles the response to the GetTopology request. The method always
@@ -861,9 +853,8 @@ func (client WatchersClient) GetTroubleshootingPreparer(ctx context.Context, res
// GetTroubleshootingSender sends the GetTroubleshooting request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetTroubleshootingSender(req *http.Request) (future WatchersGetTroubleshootingFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -947,9 +938,8 @@ func (client WatchersClient) GetTroubleshootingResultPreparer(ctx context.Contex
// GetTroubleshootingResultSender sends the GetTroubleshootingResult request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetTroubleshootingResultSender(req *http.Request) (future WatchersGetTroubleshootingResultFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -1033,9 +1023,8 @@ func (client WatchersClient) GetVMSecurityRulesPreparer(ctx context.Context, res
// GetVMSecurityRulesSender sends the GetVMSecurityRules request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) GetVMSecurityRulesSender(req *http.Request) (future WatchersGetVMSecurityRulesFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -1114,8 +1103,7 @@ func (client WatchersClient) ListPreparer(ctx context.Context, resourceGroupName
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -1186,8 +1174,7 @@ func (client WatchersClient) ListAllPreparer(ctx context.Context) (*http.Request
// ListAllSender sends the ListAll request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) ListAllSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListAllResponder handles the response to the ListAll request. The method always
@@ -1260,9 +1247,8 @@ func (client WatchersClient) ListAvailableProvidersPreparer(ctx context.Context,
// ListAvailableProvidersSender sends the ListAvailableProviders request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) ListAvailableProvidersSender(req *http.Request) (future WatchersListAvailableProvidersFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -1358,9 +1344,8 @@ func (client WatchersClient) SetFlowLogConfigurationPreparer(ctx context.Context
// SetFlowLogConfigurationSender sends the SetFlowLogConfiguration request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) SetFlowLogConfigurationSender(req *http.Request) (future WatchersSetFlowLogConfigurationFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -1444,8 +1429,7 @@ func (client WatchersClient) UpdateTagsPreparer(ctx context.Context, resourceGro
// UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) UpdateTagsSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// UpdateTagsResponder handles the response to the UpdateTags request. The method always
@@ -1528,9 +1512,8 @@ func (client WatchersClient) VerifyIPFlowPreparer(ctx context.Context, resourceG
// VerifyIPFlowSender sends the VerifyIPFlow request. The method will close the
// http.Response Body if it receives an error.
func (client WatchersClient) VerifyIPFlowSender(req *http.Request) (future WatchersVerifyIPFlowFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/webapplicationfirewallpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/webapplicationfirewallpolicies.go
index f250d2239..5e04b4783 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/webapplicationfirewallpolicies.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/webapplicationfirewallpolicies.go
@@ -37,7 +37,8 @@ func NewWebApplicationFirewallPoliciesClient(subscriptionID string) WebApplicati
}
// NewWebApplicationFirewallPoliciesClientWithBaseURI creates an instance of the WebApplicationFirewallPoliciesClient
-// client.
+// 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)}
}
@@ -111,8 +112,7 @@ func (client WebApplicationFirewallPoliciesClient) CreateOrUpdatePreparer(ctx co
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
@@ -188,9 +188,8 @@ func (client WebApplicationFirewallPoliciesClient) DeletePreparer(ctx context.Co
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -276,8 +275,7 @@ func (client WebApplicationFirewallPoliciesClient) GetPreparer(ctx context.Conte
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -352,8 +350,7 @@ func (client WebApplicationFirewallPoliciesClient) ListPreparer(ctx context.Cont
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -462,8 +459,7 @@ func (client WebApplicationFirewallPoliciesClient) ListAllPreparer(ctx context.C
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListAllResponder handles the response to the ListAll request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/client.go
new file mode 100644
index 000000000..c3f35599a
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/client.go
@@ -0,0 +1,52 @@
+// Package resources implements the Azure ARM Resources service API version 2017-05-10.
+//
+// Provides operations for working with resources and resource groups.
+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 (
+ "github.com/Azure/go-autorest/autorest"
+)
+
+const (
+ // DefaultBaseURI is the default URI used for the service Resources
+ DefaultBaseURI = "https://management.azure.com"
+)
+
+// BaseClient is the base client for Resources.
+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/resources/mgmt/2017-05-10/resources/deploymentoperations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/deploymentoperations.go
new file mode 100644
index 000000000..cca1c6226
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/deploymentoperations.go
@@ -0,0 +1,264 @@
+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 = "2017-05-10"
+ 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,
+ client.ByInspecting(),
+ 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
+}
+
+// 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 = "2017-05-10"
+ 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,
+ client.ByInspecting(),
+ 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/2017-05-10/resources/deployments.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/deployments.go
new file mode 100644
index 000000000..3146ab9f2
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/deployments.go
@@ -0,0 +1,890 @@
+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 = "2017-05-10"
+ 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,
+ client.ByInspecting(),
+ 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
+}
+
+// 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 = "2017-05-10"
+ 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,
+ client.ByInspecting(),
+ 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
+}
+
+// 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 = "2017-05-10"
+ 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,
+ client.ByInspecting(),
+ 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 = "2017-05-10"
+ 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,
+ client.ByInspecting(),
+ 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", 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 = "2017-05-10"
+ 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,
+ client.ByInspecting(),
+ 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
+}
+
+// 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 = "2017-05-10"
+ 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,
+ client.ByInspecting(),
+ 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
+}
+
+// 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 = "2017-05-10"
+ 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,
+ client.ByInspecting(),
+ 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
+}
+
+// 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 = "2017-05-10"
+ 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,
+ client.ByInspecting(),
+ 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 = "2017-05-10"
+ 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,
+ client.ByInspecting(),
+ 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/2017-05-10/resources/groups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/groups.go
new file mode 100644
index 000000000..2bf3bb986
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/groups.go
@@ -0,0 +1,665 @@
+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"
+)
+
+// GroupsClient is the provides operations for working with resources and resource groups.
+type GroupsClient struct {
+ BaseClient
+}
+
+// NewGroupsClient creates an instance of the GroupsClient client.
+func NewGroupsClient(subscriptionID string) GroupsClient {
+ return NewGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewGroupsClientWithBaseURI creates an instance of the GroupsClient 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 NewGroupsClientWithBaseURI(baseURI string, subscriptionID string) GroupsClient {
+ return GroupsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CheckExistence checks whether a resource group exists.
+// Parameters:
+// resourceGroupName - the name of the resource group to check. The name is case insensitive.
+func (client GroupsClient) CheckExistence(ctx context.Context, resourceGroupName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupsClient.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}}}}); err != nil {
+ return result, validation.NewError("resources.GroupsClient", "CheckExistence", err.Error())
+ }
+
+ req, err := client.CheckExistencePreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "CheckExistence", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CheckExistenceSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "CheckExistence", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CheckExistenceResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "CheckExistence", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CheckExistencePreparer prepares the CheckExistence request.
+func (client GroupsClient) CheckExistencePreparer(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-05-10"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsHead(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}", 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 GroupsClient) 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 GroupsClient) CheckExistenceResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// CreateOrUpdate creates or updates a resource group.
+// Parameters:
+// 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() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupsClient.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: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}},
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.Location", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("resources.GroupsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateOrUpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "CreateOrUpdate", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client GroupsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, parameters Group) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-05-10"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ parameters.ID = nil
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}", 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 GroupsClient) 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 GroupsClient) CreateOrUpdateResponder(resp *http.Response) (result Group, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete when you delete a resource group, all of its resources are also deleted. Deleting a resource group deletes
+// all of its template deployments and currently stored operations.
+// Parameters:
+// resourceGroupName - the name of the resource group to delete. The name is case insensitive.
+func (client GroupsClient) Delete(ctx context.Context, resourceGroupName string) (result GroupsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupsClient.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}}}}); err != nil {
+ return result, validation.NewError("resources.GroupsClient", "Delete", err.Error())
+ }
+
+ req, err := client.DeletePreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client GroupsClient) DeletePreparer(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-05-10"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}", 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 GroupsClient) DeleteSender(req *http.Request) (future GroupsDeleteFuture, 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 GroupsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// ExportTemplate captures the specified resource group as a template.
+// Parameters:
+// resourceGroupName - the name of the resource group to export as a template.
+// parameters - parameters for exporting the template.
+func (client GroupsClient) ExportTemplate(ctx context.Context, resourceGroupName string, parameters ExportTemplateRequest) (result GroupExportResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupsClient.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}}}}); err != nil {
+ return result, validation.NewError("resources.GroupsClient", "ExportTemplate", err.Error())
+ }
+
+ req, err := client.ExportTemplatePreparer(ctx, resourceGroupName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "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.GroupsClient", "ExportTemplate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ExportTemplateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "ExportTemplate", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ExportTemplatePreparer prepares the ExportTemplate request.
+func (client GroupsClient) ExportTemplatePreparer(ctx context.Context, resourceGroupName string, parameters ExportTemplateRequest) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-05-10"
+ 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}/exportTemplate", pathParameters),
+ autorest.WithJSON(parameters),
+ 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 GroupsClient) 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 GroupsClient) ExportTemplateResponder(resp *http.Response) (result GroupExportResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Get gets a resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group to get. The name is case insensitive.
+func (client GroupsClient) Get(ctx context.Context, resourceGroupName string) (result Group, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupsClient.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}}}}); err != nil {
+ return result, validation.NewError("resources.GroupsClient", "Get", err.Error())
+ }
+
+ req, err := client.GetPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "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.GroupsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client GroupsClient) GetPreparer(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-05-10"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}", 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 GroupsClient) 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 GroupsClient) GetResponder(resp *http.Response) (result Group, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List gets all the resource groups for a subscription.
+// Parameters:
+// 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() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupsClient.List")
+ defer func() {
+ sc := -1
+ if result.glr.Response.Response != nil {
+ sc = result.glr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, filter, top)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.glr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.glr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client GroupsClient) ListPreparer(ctx context.Context, filter string, top *int32) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-05-10"
+ 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", 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 GroupsClient) 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 GroupsClient) ListResponder(resp *http.Response) (result GroupListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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 GroupsClient) listNextResults(ctx context.Context, lastResults GroupListResult) (result GroupListResult, err error) {
+ req, err := lastResults.groupListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "resources.GroupsClient", "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.GroupsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client GroupsClient) ListComplete(ctx context.Context, filter string, top *int32) (result GroupListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx, filter, top)
+ return
+}
+
+// Update resource groups can be updated through a simple PATCH operation to a group address. The format of the request
+// is the same as that for creating a resource group. If a field is unspecified, the current value is retained.
+// Parameters:
+// resourceGroupName - the name of the resource group to update. The name is case insensitive.
+// parameters - parameters supplied to update a resource group.
+func (client GroupsClient) Update(ctx context.Context, resourceGroupName string, parameters GroupPatchable) (result Group, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupsClient.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: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("resources.GroupsClient", "Update", err.Error())
+ }
+
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "Update", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client GroupsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, parameters GroupPatchable) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-05-10"
+ 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}", 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 GroupsClient) 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 GroupsClient) UpdateResponder(resp *http.Response) (result Group, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/resources/mgmt/2017-05-10/resources/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/models.go
new file mode 100644
index 000000000..9434555ff
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/models.go
@@ -0,0 +1,1854 @@
+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"
+ "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/resources/mgmt/2017-05-10/resources"
+
+// DeploymentMode enumerates the values for deployment mode.
+type DeploymentMode string
+
+const (
+ // Complete ...
+ Complete DeploymentMode = "Complete"
+ // Incremental ...
+ Incremental DeploymentMode = "Incremental"
+)
+
+// PossibleDeploymentModeValues returns an array of possible values for the DeploymentMode const type.
+func PossibleDeploymentModeValues() []DeploymentMode {
+ return []DeploymentMode{Complete, Incremental}
+}
+
+// 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}
+}
+
+// AliasPathType the type of the paths for alias.
+type AliasPathType struct {
+ // Path - The path of an alias.
+ Path *string `json:"path,omitempty"`
+ // APIVersions - The API versions.
+ APIVersions *[]string `json:"apiVersions,omitempty"`
+}
+
+// AliasType the alias type.
+type AliasType struct {
+ // Name - The alias name.
+ Name *string `json:"name,omitempty"`
+ // Paths - The paths for an alias.
+ Paths *[]AliasPathType `json:"paths,omitempty"`
+}
+
+// BasicDependency deployment dependency information.
+type BasicDependency struct {
+ // ID - The ID of the dependency.
+ ID *string `json:"id,omitempty"`
+ // ResourceType - The dependency resource type.
+ ResourceType *string `json:"resourceType,omitempty"`
+ // ResourceName - The dependency resource name.
+ ResourceName *string `json:"resourceName,omitempty"`
+}
+
+// CloudError an error response for a resource management request.
+type CloudError struct {
+ Error *ErrorResponse `json:"error,omitempty"`
+}
+
+// CreateOrUpdateByIDFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type CreateOrUpdateByIDFuture struct {
+ azure.Future
+}
+
+// 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.
+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
+}
+
+// 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"`
+}
+
+// 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
+}
+
+// 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
+}
+
+// Dependency deployment dependency information.
+type Dependency struct {
+ // DependsOn - The list of dependencies.
+ DependsOn *[]BasicDependency `json:"dependsOn,omitempty"`
+ // ID - The ID of the dependency.
+ ID *string `json:"id,omitempty"`
+ // ResourceType - The dependency resource type.
+ ResourceType *string `json:"resourceType,omitempty"`
+ // ResourceName - The dependency resource name.
+ ResourceName *string `json:"resourceName,omitempty"`
+}
+
+// Deployment deployment operation parameters.
+type Deployment struct {
+ // Properties - The deployment properties.
+ Properties *DeploymentProperties `json:"properties,omitempty"`
+}
+
+// DeploymentExportResult the deployment export result.
+type DeploymentExportResult struct {
+ autorest.Response `json:"-"`
+ // Template - The template content.
+ Template interface{} `json:"template,omitempty"`
+}
+
+// DeploymentExtended deployment information.
+type DeploymentExtended struct {
+ autorest.Response `json:"-"`
+ // ID - READ-ONLY; The ID of the deployment.
+ ID *string `json:"id,omitempty"`
+ // Name - The name of the deployment.
+ Name *string `json:"name,omitempty"`
+ // Properties - Deployment properties.
+ Properties *DeploymentPropertiesExtended `json:"properties,omitempty"`
+}
+
+// DeploymentExtendedFilter deployment filter.
+type DeploymentExtendedFilter struct {
+ // ProvisioningState - The provisioning state.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// DeploymentListResult list of deployments.
+type DeploymentListResult struct {
+ autorest.Response `json:"-"`
+ // Value - An array of deployments.
+ Value *[]DeploymentExtended `json:"value,omitempty"`
+ // NextLink - READ-ONLY; The URL to use for getting the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// DeploymentListResultIterator provides access to a complete listing of DeploymentExtended values.
+type DeploymentListResultIterator struct {
+ i int
+ page DeploymentListResultPage
+}
+
+// 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 *DeploymentListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentListResultIterator.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 *DeploymentListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter DeploymentListResultIterator) 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 DeploymentListResultIterator) Response() DeploymentListResult {
+ 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 DeploymentListResultIterator) Value() DeploymentExtended {
+ if !iter.page.NotDone() {
+ return DeploymentExtended{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the DeploymentListResultIterator type.
+func NewDeploymentListResultIterator(page DeploymentListResultPage) DeploymentListResultIterator {
+ return DeploymentListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (dlr DeploymentListResult) IsEmpty() bool {
+ return dlr.Value == nil || len(*dlr.Value) == 0
+}
+
+// deploymentListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (dlr DeploymentListResult) deploymentListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if dlr.NextLink == nil || len(to.String(dlr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(dlr.NextLink)))
+}
+
+// DeploymentListResultPage contains a page of DeploymentExtended values.
+type DeploymentListResultPage struct {
+ fn func(context.Context, DeploymentListResult) (DeploymentListResult, error)
+ dlr DeploymentListResult
+}
+
+// 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 *DeploymentListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.dlr)
+ if err != nil {
+ return err
+ }
+ page.dlr = next
+ 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 *DeploymentListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page DeploymentListResultPage) NotDone() bool {
+ return !page.dlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page DeploymentListResultPage) Response() DeploymentListResult {
+ return page.dlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page DeploymentListResultPage) Values() []DeploymentExtended {
+ if page.dlr.IsEmpty() {
+ return nil
+ }
+ return *page.dlr.Value
+}
+
+// Creates a new instance of the DeploymentListResultPage type.
+func NewDeploymentListResultPage(getNextPage func(context.Context, DeploymentListResult) (DeploymentListResult, error)) DeploymentListResultPage {
+ return DeploymentListResultPage{fn: getNextPage}
+}
+
+// DeploymentOperation deployment operation information.
+type DeploymentOperation struct {
+ autorest.Response `json:"-"`
+ // ID - READ-ONLY; Full deployment operation ID.
+ ID *string `json:"id,omitempty"`
+ // OperationID - READ-ONLY; Deployment operation ID.
+ OperationID *string `json:"operationId,omitempty"`
+ // Properties - Deployment properties.
+ Properties *DeploymentOperationProperties `json:"properties,omitempty"`
+}
+
+// DeploymentOperationProperties deployment operation properties.
+type DeploymentOperationProperties struct {
+ // ProvisioningState - READ-ONLY; The state of the provisioning.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // Timestamp - READ-ONLY; The date and time of the operation.
+ Timestamp *date.Time `json:"timestamp,omitempty"`
+ // ServiceRequestID - READ-ONLY; Deployment operation service request id.
+ ServiceRequestID *string `json:"serviceRequestId,omitempty"`
+ // StatusCode - READ-ONLY; Operation status code.
+ StatusCode *string `json:"statusCode,omitempty"`
+ // StatusMessage - READ-ONLY; Operation status message.
+ StatusMessage interface{} `json:"statusMessage,omitempty"`
+ // TargetResource - READ-ONLY; The target resource.
+ TargetResource *TargetResource `json:"targetResource,omitempty"`
+ // Request - READ-ONLY; The HTTP request message.
+ Request *HTTPMessage `json:"request,omitempty"`
+ // Response - READ-ONLY; The HTTP response message.
+ Response *HTTPMessage `json:"response,omitempty"`
+}
+
+// DeploymentOperationsListResult list of deployment operations.
+type DeploymentOperationsListResult struct {
+ autorest.Response `json:"-"`
+ // Value - An array of deployment operations.
+ Value *[]DeploymentOperation `json:"value,omitempty"`
+ // NextLink - READ-ONLY; The URL to use for getting the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// DeploymentOperationsListResultIterator provides access to a complete listing of DeploymentOperation
+// values.
+type DeploymentOperationsListResultIterator struct {
+ i int
+ page DeploymentOperationsListResultPage
+}
+
+// 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 *DeploymentOperationsListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentOperationsListResultIterator.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 *DeploymentOperationsListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter DeploymentOperationsListResultIterator) 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 DeploymentOperationsListResultIterator) Response() DeploymentOperationsListResult {
+ 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 DeploymentOperationsListResultIterator) Value() DeploymentOperation {
+ if !iter.page.NotDone() {
+ return DeploymentOperation{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the DeploymentOperationsListResultIterator type.
+func NewDeploymentOperationsListResultIterator(page DeploymentOperationsListResultPage) DeploymentOperationsListResultIterator {
+ return DeploymentOperationsListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (dolr DeploymentOperationsListResult) IsEmpty() bool {
+ return dolr.Value == nil || len(*dolr.Value) == 0
+}
+
+// deploymentOperationsListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (dolr DeploymentOperationsListResult) deploymentOperationsListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if dolr.NextLink == nil || len(to.String(dolr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(dolr.NextLink)))
+}
+
+// DeploymentOperationsListResultPage contains a page of DeploymentOperation values.
+type DeploymentOperationsListResultPage struct {
+ fn func(context.Context, DeploymentOperationsListResult) (DeploymentOperationsListResult, error)
+ dolr DeploymentOperationsListResult
+}
+
+// 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 *DeploymentOperationsListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentOperationsListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.dolr)
+ if err != nil {
+ return err
+ }
+ page.dolr = next
+ 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 *DeploymentOperationsListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page DeploymentOperationsListResultPage) NotDone() bool {
+ return !page.dolr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page DeploymentOperationsListResultPage) Response() DeploymentOperationsListResult {
+ return page.dolr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page DeploymentOperationsListResultPage) Values() []DeploymentOperation {
+ if page.dolr.IsEmpty() {
+ return nil
+ }
+ return *page.dolr.Value
+}
+
+// Creates a new instance of the DeploymentOperationsListResultPage type.
+func NewDeploymentOperationsListResultPage(getNextPage func(context.Context, DeploymentOperationsListResult) (DeploymentOperationsListResult, error)) DeploymentOperationsListResultPage {
+ return DeploymentOperationsListResultPage{fn: getNextPage}
+}
+
+// DeploymentProperties deployment properties.
+type DeploymentProperties struct {
+ // Template - The template content. You use this element when you want to pass the template syntax directly in the request rather than link to an existing template. It can be a JObject or well-formed JSON string. Use either the templateLink property or the template property, but not both.
+ Template interface{} `json:"template,omitempty"`
+ // TemplateLink - The URI of the template. Use either the templateLink property or the template property, but not both.
+ TemplateLink *TemplateLink `json:"templateLink,omitempty"`
+ // Parameters - Name and value pairs that define the deployment parameters for the template. You use this element when you want to provide the parameter values directly in the request rather than link to an existing parameter file. Use either the parametersLink property or the parameters property, but not both. It can be a JObject or a well formed JSON string.
+ Parameters interface{} `json:"parameters,omitempty"`
+ // ParametersLink - The URI of parameters file. You use this element to link to an existing parameters file. Use either the parametersLink property or the parameters property, but not both.
+ ParametersLink *ParametersLink `json:"parametersLink,omitempty"`
+ // Mode - The mode that is used to deploy resources. This value can be either Incremental or Complete. In Incremental mode, resources are deployed without deleting existing resources that are not included in the template. In Complete mode, resources are deployed and existing resources in the resource group that are not included in the template are deleted. Be careful when using Complete mode as you may unintentionally delete resources. Possible values include: 'Incremental', 'Complete'
+ Mode DeploymentMode `json:"mode,omitempty"`
+ // DebugSetting - The debug setting of the deployment.
+ DebugSetting *DebugSetting `json:"debugSetting,omitempty"`
+}
+
+// DeploymentPropertiesExtended deployment properties with additional details.
+type DeploymentPropertiesExtended struct {
+ // ProvisioningState - READ-ONLY; The state of the provisioning.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // CorrelationID - READ-ONLY; The correlation ID of the deployment.
+ CorrelationID *string `json:"correlationId,omitempty"`
+ // Timestamp - READ-ONLY; The timestamp of the template deployment.
+ Timestamp *date.Time `json:"timestamp,omitempty"`
+ // Outputs - Key/value pairs that represent deployment output.
+ Outputs interface{} `json:"outputs,omitempty"`
+ // Providers - The list of resource providers needed for the deployment.
+ Providers *[]Provider `json:"providers,omitempty"`
+ // Dependencies - The list of deployment dependencies.
+ Dependencies *[]Dependency `json:"dependencies,omitempty"`
+ // Template - The template content. Use only one of Template or TemplateLink.
+ Template interface{} `json:"template,omitempty"`
+ // TemplateLink - The URI referencing the template. Use only one of Template or TemplateLink.
+ TemplateLink *TemplateLink `json:"templateLink,omitempty"`
+ // Parameters - Deployment parameters. Use only one of Parameters or ParametersLink.
+ Parameters interface{} `json:"parameters,omitempty"`
+ // ParametersLink - The URI referencing the parameters. Use only one of Parameters or ParametersLink.
+ ParametersLink *ParametersLink `json:"parametersLink,omitempty"`
+ // Mode - The deployment mode. Possible values are Incremental and Complete. Possible values include: 'Incremental', 'Complete'
+ Mode DeploymentMode `json:"mode,omitempty"`
+ // DebugSetting - The debug setting of the deployment.
+ DebugSetting *DebugSetting `json:"debugSetting,omitempty"`
+}
+
+// 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
+}
+
+// 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
+}
+
+// DeploymentValidateResult information from validate template deployment response.
+type DeploymentValidateResult struct {
+ autorest.Response `json:"-"`
+ // Error - Validation error.
+ Error *ManagementErrorWithDetails `json:"error,omitempty"`
+ // Properties - The template deployment properties.
+ Properties *DeploymentPropertiesExtended `json:"properties,omitempty"`
+}
+
+// ErrorAdditionalInfo the resource management error additional info.
+type ErrorAdditionalInfo struct {
+ // Type - READ-ONLY; The additional info type.
+ Type *string `json:"type,omitempty"`
+ // Info - READ-ONLY; The additional info.
+ Info interface{} `json:"info,omitempty"`
+}
+
+// ErrorResponse the resource management error response.
+type ErrorResponse struct {
+ // Code - READ-ONLY; The error code.
+ Code *string `json:"code,omitempty"`
+ // Message - READ-ONLY; The error message.
+ Message *string `json:"message,omitempty"`
+ // Target - READ-ONLY; The error target.
+ Target *string `json:"target,omitempty"`
+ // Details - READ-ONLY; The error details.
+ Details *[]ErrorResponse `json:"details,omitempty"`
+ // AdditionalInfo - READ-ONLY; The error additional info.
+ AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"`
+}
+
+// ExportTemplateRequest export resource group template request parameters.
+type ExportTemplateRequest struct {
+ // ResourcesProperty - The IDs of the resources to filter the export by. To export all resources, supply an array with single entry '*'.
+ ResourcesProperty *[]string `json:"resources,omitempty"`
+ // Options - The export template options. A CSV-formatted list containing zero or more of the following: 'IncludeParameterDefaultValue', 'IncludeComments', 'SkipResourceNameParameterization', 'SkipAllParameterization'
+ Options *string `json:"options,omitempty"`
+}
+
+// GenericResource resource information.
+type GenericResource struct {
+ autorest.Response `json:"-"`
+ // Plan - The plan of the resource.
+ Plan *Plan `json:"plan,omitempty"`
+ // Properties - The resource properties.
+ Properties interface{} `json:"properties,omitempty"`
+ // Kind - The kind of the resource.
+ Kind *string `json:"kind,omitempty"`
+ // ManagedBy - ID of the resource that manages this resource.
+ ManagedBy *string `json:"managedBy,omitempty"`
+ // Sku - The SKU of the resource.
+ Sku *Sku `json:"sku,omitempty"`
+ // Identity - The identity of the resource.
+ Identity *Identity `json:"identity,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 GenericResource.
+func (gr GenericResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if gr.Plan != nil {
+ objectMap["plan"] = gr.Plan
+ }
+ if gr.Properties != nil {
+ objectMap["properties"] = gr.Properties
+ }
+ if gr.Kind != nil {
+ objectMap["kind"] = gr.Kind
+ }
+ if gr.ManagedBy != nil {
+ objectMap["managedBy"] = gr.ManagedBy
+ }
+ if gr.Sku != nil {
+ objectMap["sku"] = gr.Sku
+ }
+ if gr.Identity != nil {
+ objectMap["identity"] = gr.Identity
+ }
+ if gr.Location != nil {
+ objectMap["location"] = gr.Location
+ }
+ if gr.Tags != nil {
+ objectMap["tags"] = gr.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// GenericResourceExpanded resource information.
+type GenericResourceExpanded struct {
+ // CreatedTime - READ-ONLY; The created time of the resource. This is only present if requested via the $expand query parameter.
+ CreatedTime *date.Time `json:"createdTime,omitempty"`
+ // ChangedTime - READ-ONLY; The changed time of the resource. This is only present if requested via the $expand query parameter.
+ ChangedTime *date.Time `json:"changedTime,omitempty"`
+ // ProvisioningState - READ-ONLY; The provisioning state of the resource. This is only present if requested via the $expand query parameter.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // Plan - The plan of the resource.
+ Plan *Plan `json:"plan,omitempty"`
+ // Properties - The resource properties.
+ Properties interface{} `json:"properties,omitempty"`
+ // Kind - The kind of the resource.
+ Kind *string `json:"kind,omitempty"`
+ // ManagedBy - ID of the resource that manages this resource.
+ ManagedBy *string `json:"managedBy,omitempty"`
+ // Sku - The SKU of the resource.
+ Sku *Sku `json:"sku,omitempty"`
+ // Identity - The identity of the resource.
+ Identity *Identity `json:"identity,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 GenericResourceExpanded.
+func (gre GenericResourceExpanded) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if gre.Plan != nil {
+ objectMap["plan"] = gre.Plan
+ }
+ if gre.Properties != nil {
+ objectMap["properties"] = gre.Properties
+ }
+ if gre.Kind != nil {
+ objectMap["kind"] = gre.Kind
+ }
+ if gre.ManagedBy != nil {
+ objectMap["managedBy"] = gre.ManagedBy
+ }
+ if gre.Sku != nil {
+ objectMap["sku"] = gre.Sku
+ }
+ if gre.Identity != nil {
+ objectMap["identity"] = gre.Identity
+ }
+ if gre.Location != nil {
+ objectMap["location"] = gre.Location
+ }
+ if gre.Tags != nil {
+ objectMap["tags"] = gre.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// GenericResourceFilter resource filter.
+type GenericResourceFilter struct {
+ // ResourceType - The resource type.
+ ResourceType *string `json:"resourceType,omitempty"`
+ // Tagname - The tag name.
+ Tagname *string `json:"tagname,omitempty"`
+ // Tagvalue - The tag value.
+ Tagvalue *string `json:"tagvalue,omitempty"`
+}
+
+// Group resource group information.
+type Group struct {
+ autorest.Response `json:"-"`
+ // ID - READ-ONLY; The ID of the resource group.
+ ID *string `json:"id,omitempty"`
+ // 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"`
+ // ManagedBy - The ID of the resource that manages this resource group.
+ ManagedBy *string `json:"managedBy,omitempty"`
+ // Tags - The tags attached to the resource group.
+ Tags map[string]*string `json:"tags"`
+}
+
+// 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
+ }
+ if g.Location != nil {
+ objectMap["location"] = g.Location
+ }
+ if g.ManagedBy != nil {
+ objectMap["managedBy"] = g.ManagedBy
+ }
+ if g.Tags != nil {
+ objectMap["tags"] = g.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// GroupExportResult resource group export result.
+type GroupExportResult struct {
+ autorest.Response `json:"-"`
+ // Template - The template content.
+ Template interface{} `json:"template,omitempty"`
+ // Error - The error.
+ Error *ManagementErrorWithDetails `json:"error,omitempty"`
+}
+
+// GroupFilter resource group filter.
+type GroupFilter struct {
+ // TagName - The tag name.
+ TagName *string `json:"tagName,omitempty"`
+ // TagValue - The tag value.
+ TagValue *string `json:"tagValue,omitempty"`
+}
+
+// GroupListResult list of resource groups.
+type GroupListResult struct {
+ autorest.Response `json:"-"`
+ // Value - An array of resource groups.
+ Value *[]Group `json:"value,omitempty"`
+ // NextLink - READ-ONLY; The URL to use for getting the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// GroupListResultIterator provides access to a complete listing of Group values.
+type GroupListResultIterator struct {
+ i int
+ page GroupListResultPage
+}
+
+// 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 *GroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupListResultIterator.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 *GroupListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter GroupListResultIterator) 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 GroupListResultIterator) Response() GroupListResult {
+ 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 GroupListResultIterator) Value() Group {
+ if !iter.page.NotDone() {
+ return Group{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the GroupListResultIterator type.
+func NewGroupListResultIterator(page GroupListResultPage) GroupListResultIterator {
+ return GroupListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (glr GroupListResult) IsEmpty() bool {
+ return glr.Value == nil || len(*glr.Value) == 0
+}
+
+// groupListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (glr GroupListResult) groupListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if glr.NextLink == nil || len(to.String(glr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(glr.NextLink)))
+}
+
+// GroupListResultPage contains a page of Group values.
+type GroupListResultPage struct {
+ fn func(context.Context, GroupListResult) (GroupListResult, error)
+ glr GroupListResult
+}
+
+// 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 *GroupListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.glr)
+ if err != nil {
+ return err
+ }
+ page.glr = next
+ 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 *GroupListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page GroupListResultPage) NotDone() bool {
+ return !page.glr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page GroupListResultPage) Response() GroupListResult {
+ return page.glr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page GroupListResultPage) Values() []Group {
+ if page.glr.IsEmpty() {
+ return nil
+ }
+ return *page.glr.Value
+}
+
+// Creates a new instance of the GroupListResultPage type.
+func NewGroupListResultPage(getNextPage func(context.Context, GroupListResult) (GroupListResult, error)) GroupListResultPage {
+ return GroupListResultPage{fn: getNextPage}
+}
+
+// GroupPatchable resource group information.
+type GroupPatchable struct {
+ // Name - The name of the resource group.
+ 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"`
+ // Tags - The tags attached to the resource group.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for GroupPatchable.
+func (gp GroupPatchable) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if gp.Name != nil {
+ objectMap["name"] = gp.Name
+ }
+ if gp.Properties != nil {
+ objectMap["properties"] = gp.Properties
+ }
+ if gp.ManagedBy != nil {
+ objectMap["managedBy"] = gp.ManagedBy
+ }
+ if gp.Tags != nil {
+ objectMap["tags"] = gp.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// GroupProperties the resource group properties.
+type GroupProperties struct {
+ // ProvisioningState - READ-ONLY; The provisioning state.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// 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
+}
+
+// HTTPMessage HTTP message.
+type HTTPMessage struct {
+ // Content - HTTP message content.
+ Content interface{} `json:"content,omitempty"`
+}
+
+// Identity identity for the resource.
+type Identity struct {
+ // PrincipalID - READ-ONLY; The principal ID of resource identity.
+ PrincipalID *string `json:"principalId,omitempty"`
+ // TenantID - READ-ONLY; The tenant ID of resource.
+ TenantID *string `json:"tenantId,omitempty"`
+ // Type - The identity type. Possible values include: 'SystemAssigned'
+ Type ResourceIdentityType `json:"type,omitempty"`
+}
+
+// ListResult list of resource groups.
+type ListResult struct {
+ autorest.Response `json:"-"`
+ // Value - An array of resources.
+ Value *[]GenericResourceExpanded `json:"value,omitempty"`
+ // NextLink - READ-ONLY; The URL to use for getting the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ListResultIterator provides access to a complete listing of GenericResourceExpanded values.
+type ListResultIterator struct {
+ i int
+ page ListResultPage
+}
+
+// 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 *ListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListResultIterator.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 *ListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ListResultIterator) 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 ListResultIterator) Response() ListResult {
+ 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 ListResultIterator) Value() GenericResourceExpanded {
+ if !iter.page.NotDone() {
+ return GenericResourceExpanded{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the ListResultIterator type.
+func NewListResultIterator(page ListResultPage) ListResultIterator {
+ return ListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (lr ListResult) IsEmpty() bool {
+ return lr.Value == nil || len(*lr.Value) == 0
+}
+
+// listResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (lr ListResult) listResultPreparer(ctx context.Context) (*http.Request, error) {
+ if lr.NextLink == nil || len(to.String(lr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(lr.NextLink)))
+}
+
+// ListResultPage contains a page of GenericResourceExpanded values.
+type ListResultPage struct {
+ fn func(context.Context, ListResult) (ListResult, error)
+ lr ListResult
+}
+
+// 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 *ListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.lr)
+ if err != nil {
+ return err
+ }
+ page.lr = next
+ 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 *ListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ListResultPage) NotDone() bool {
+ return !page.lr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ListResultPage) Response() ListResult {
+ return page.lr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ListResultPage) Values() []GenericResourceExpanded {
+ if page.lr.IsEmpty() {
+ return nil
+ }
+ return *page.lr.Value
+}
+
+// Creates a new instance of the ListResultPage type.
+func NewListResultPage(getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage {
+ return ListResultPage{fn: getNextPage}
+}
+
+// ManagementErrorWithDetails the detailed error message of resource management.
+type ManagementErrorWithDetails struct {
+ // Code - READ-ONLY; The error code returned when exporting the template.
+ Code *string `json:"code,omitempty"`
+ // Message - READ-ONLY; The error message describing the export error.
+ Message *string `json:"message,omitempty"`
+ // Target - READ-ONLY; The target of the error.
+ Target *string `json:"target,omitempty"`
+ // Details - READ-ONLY; Validation error.
+ Details *[]ManagementErrorWithDetails `json:"details,omitempty"`
+}
+
+// MoveInfo parameters of move resources.
+type MoveInfo struct {
+ // ResourcesProperty - The IDs of the resources.
+ ResourcesProperty *[]string `json:"resources,omitempty"`
+ // TargetResourceGroup - The target resource group.
+ TargetResourceGroup *string `json:"targetResourceGroup,omitempty"`
+}
+
+// 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
+}
+
+// ParametersLink entity representing the reference to the deployment parameters.
+type ParametersLink struct {
+ // URI - The URI of the parameters file.
+ URI *string `json:"uri,omitempty"`
+ // ContentVersion - If included, must match the ContentVersion in the template.
+ ContentVersion *string `json:"contentVersion,omitempty"`
+}
+
+// Plan plan for the resource.
+type Plan struct {
+ // Name - The plan ID.
+ Name *string `json:"name,omitempty"`
+ // Publisher - The publisher ID.
+ Publisher *string `json:"publisher,omitempty"`
+ // Product - The offer ID.
+ Product *string `json:"product,omitempty"`
+ // PromotionCode - The promotion code.
+ PromotionCode *string `json:"promotionCode,omitempty"`
+ // Version - The plan's version.
+ Version *string `json:"version,omitempty"`
+}
+
+// Provider resource provider information.
+type Provider struct {
+ autorest.Response `json:"-"`
+ // ID - READ-ONLY; The provider ID.
+ 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 provider.
+ RegistrationState *string `json:"registrationState,omitempty"`
+ // ResourceTypes - READ-ONLY; The collection of provider resource types.
+ ResourceTypes *[]ProviderResourceType `json:"resourceTypes,omitempty"`
+}
+
+// ProviderListResult list of resource providers.
+type ProviderListResult struct {
+ autorest.Response `json:"-"`
+ // Value - An array of resource providers.
+ Value *[]Provider `json:"value,omitempty"`
+ // NextLink - READ-ONLY; The URL to use for getting the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ProviderListResultIterator provides access to a complete listing of Provider values.
+type ProviderListResultIterator struct {
+ i int
+ page ProviderListResultPage
+}
+
+// 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 *ProviderListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProviderListResultIterator.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 *ProviderListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ProviderListResultIterator) 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 ProviderListResultIterator) Response() ProviderListResult {
+ 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 ProviderListResultIterator) Value() Provider {
+ if !iter.page.NotDone() {
+ return Provider{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the ProviderListResultIterator type.
+func NewProviderListResultIterator(page ProviderListResultPage) ProviderListResultIterator {
+ return ProviderListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (plr ProviderListResult) IsEmpty() bool {
+ return plr.Value == nil || len(*plr.Value) == 0
+}
+
+// providerListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (plr ProviderListResult) providerListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if plr.NextLink == nil || len(to.String(plr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(plr.NextLink)))
+}
+
+// ProviderListResultPage contains a page of Provider values.
+type ProviderListResultPage struct {
+ fn func(context.Context, ProviderListResult) (ProviderListResult, error)
+ plr ProviderListResult
+}
+
+// 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 *ProviderListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProviderListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.plr)
+ if err != nil {
+ return err
+ }
+ page.plr = next
+ 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 *ProviderListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ProviderListResultPage) NotDone() bool {
+ return !page.plr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ProviderListResultPage) Response() ProviderListResult {
+ return page.plr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ProviderListResultPage) Values() []Provider {
+ if page.plr.IsEmpty() {
+ return nil
+ }
+ return *page.plr.Value
+}
+
+// Creates a new instance of the ProviderListResultPage type.
+func NewProviderListResultPage(getNextPage func(context.Context, ProviderListResult) (ProviderListResult, error)) ProviderListResultPage {
+ return ProviderListResultPage{fn: getNextPage}
+}
+
+// ProviderOperationDisplayProperties resource provider operation's display properties.
+type ProviderOperationDisplayProperties struct {
+ // Publisher - Operation description.
+ Publisher *string `json:"publisher,omitempty"`
+ // Provider - Operation provider.
+ Provider *string `json:"provider,omitempty"`
+ // Resource - Operation resource.
+ Resource *string `json:"resource,omitempty"`
+ // Operation - The operation name.
+ Operation *string `json:"operation,omitempty"`
+ // Description - Operation description.
+ Description *string `json:"description,omitempty"`
+}
+
+// ProviderResourceType resource type managed by the resource provider.
+type ProviderResourceType struct {
+ // ResourceType - The resource type.
+ ResourceType *string `json:"resourceType,omitempty"`
+ // Locations - The collection of locations where this resource type can be created.
+ Locations *[]string `json:"locations,omitempty"`
+ // Aliases - The aliases that are supported by this resource type.
+ Aliases *[]AliasType `json:"aliases,omitempty"`
+ // APIVersions - The API version.
+ APIVersions *[]string `json:"apiVersions,omitempty"`
+ // Properties - The properties.
+ Properties map[string]*string `json:"properties"`
+}
+
+// MarshalJSON is the custom marshaler for ProviderResourceType.
+func (prt ProviderResourceType) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if prt.ResourceType != nil {
+ objectMap["resourceType"] = prt.ResourceType
+ }
+ if prt.Locations != nil {
+ objectMap["locations"] = prt.Locations
+ }
+ if prt.Aliases != nil {
+ objectMap["aliases"] = prt.Aliases
+ }
+ if prt.APIVersions != nil {
+ objectMap["apiVersions"] = prt.APIVersions
+ }
+ if prt.Properties != nil {
+ objectMap["properties"] = prt.Properties
+ }
+ return json.Marshal(objectMap)
+}
+
+// Resource basic set of the resource properties.
+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)
+}
+
+// Sku SKU for the resource.
+type Sku struct {
+ // Name - The SKU name.
+ Name *string `json:"name,omitempty"`
+ // Tier - The SKU tier.
+ Tier *string `json:"tier,omitempty"`
+ // Size - The SKU size.
+ Size *string `json:"size,omitempty"`
+ // Family - The SKU family.
+ Family *string `json:"family,omitempty"`
+ // Model - The SKU model.
+ Model *string `json:"model,omitempty"`
+ // Capacity - The SKU capacity.
+ Capacity *int32 `json:"capacity,omitempty"`
+}
+
+// SubResource sub-resource.
+type SubResource struct {
+ // ID - Resource ID
+ ID *string `json:"id,omitempty"`
+}
+
+// TagCount tag count.
+type TagCount struct {
+ // Type - Type of count.
+ Type *string `json:"type,omitempty"`
+ // Value - Value of count.
+ Value *int32 `json:"value,omitempty"`
+}
+
+// TagDetails tag details.
+type TagDetails struct {
+ autorest.Response `json:"-"`
+ // ID - READ-ONLY; The tag ID.
+ ID *string `json:"id,omitempty"`
+ // TagName - The tag name.
+ TagName *string `json:"tagName,omitempty"`
+ // Count - The total number of resources that use the resource tag. When a tag is initially created and has no associated resources, the value is 0.
+ Count *TagCount `json:"count,omitempty"`
+ // Values - The list of tag values.
+ Values *[]TagValue `json:"values,omitempty"`
+}
+
+// TagsListResult list of subscription tags.
+type TagsListResult struct {
+ autorest.Response `json:"-"`
+ // Value - An array of tags.
+ Value *[]TagDetails `json:"value,omitempty"`
+ // NextLink - READ-ONLY; The URL to use for getting the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// TagsListResultIterator provides access to a complete listing of TagDetails values.
+type TagsListResultIterator struct {
+ i int
+ page TagsListResultPage
+}
+
+// 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 *TagsListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagsListResultIterator.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 *TagsListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter TagsListResultIterator) 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 TagsListResultIterator) Response() TagsListResult {
+ 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 TagsListResultIterator) Value() TagDetails {
+ if !iter.page.NotDone() {
+ return TagDetails{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the TagsListResultIterator type.
+func NewTagsListResultIterator(page TagsListResultPage) TagsListResultIterator {
+ return TagsListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (tlr TagsListResult) IsEmpty() bool {
+ return tlr.Value == nil || len(*tlr.Value) == 0
+}
+
+// tagsListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (tlr TagsListResult) tagsListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if tlr.NextLink == nil || len(to.String(tlr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(tlr.NextLink)))
+}
+
+// TagsListResultPage contains a page of TagDetails values.
+type TagsListResultPage struct {
+ fn func(context.Context, TagsListResult) (TagsListResult, error)
+ tlr TagsListResult
+}
+
+// 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 *TagsListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagsListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.tlr)
+ if err != nil {
+ return err
+ }
+ page.tlr = next
+ 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 *TagsListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page TagsListResultPage) NotDone() bool {
+ return !page.tlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page TagsListResultPage) Response() TagsListResult {
+ return page.tlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page TagsListResultPage) Values() []TagDetails {
+ if page.tlr.IsEmpty() {
+ return nil
+ }
+ return *page.tlr.Value
+}
+
+// Creates a new instance of the TagsListResultPage type.
+func NewTagsListResultPage(getNextPage func(context.Context, TagsListResult) (TagsListResult, error)) TagsListResultPage {
+ return TagsListResultPage{fn: getNextPage}
+}
+
+// TagValue tag information.
+type TagValue struct {
+ autorest.Response `json:"-"`
+ // ID - READ-ONLY; The tag ID.
+ ID *string `json:"id,omitempty"`
+ // TagValue - The tag value.
+ TagValue *string `json:"tagValue,omitempty"`
+ // Count - The tag value count.
+ Count *TagCount `json:"count,omitempty"`
+}
+
+// TargetResource target resource.
+type TargetResource struct {
+ // ID - The ID of the resource.
+ ID *string `json:"id,omitempty"`
+ // ResourceName - The name of the resource.
+ ResourceName *string `json:"resourceName,omitempty"`
+ // ResourceType - The type of the resource.
+ ResourceType *string `json:"resourceType,omitempty"`
+}
+
+// TemplateHashResult result of the request to calculate template hash. It contains a string of minified
+// template and its hash.
+type TemplateHashResult struct {
+ autorest.Response `json:"-"`
+ // MinifiedTemplate - The minified template string.
+ MinifiedTemplate *string `json:"minifiedTemplate,omitempty"`
+ // TemplateHash - The template hash.
+ TemplateHash *string `json:"templateHash,omitempty"`
+}
+
+// TemplateLink entity representing the reference to the template.
+type TemplateLink struct {
+ // URI - The URI of the template to deploy.
+ URI *string `json:"uri,omitempty"`
+ // ContentVersion - If included, must match the ContentVersion in the template.
+ ContentVersion *string `json:"contentVersion,omitempty"`
+}
+
+// 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
+}
+
+// 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
+}
+
+// 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
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/providers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/providers.go
new file mode 100644
index 000000000..f6f17c97b
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/providers.go
@@ -0,0 +1,389 @@
+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/tracing"
+ "net/http"
+)
+
+// ProvidersClient is the provides operations for working with resources and resource groups.
+type ProvidersClient struct {
+ BaseClient
+}
+
+// NewProvidersClient creates an instance of the ProvidersClient client.
+func NewProvidersClient(subscriptionID string) ProvidersClient {
+ return NewProvidersClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewProvidersClientWithBaseURI creates an instance of the ProvidersClient 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 NewProvidersClientWithBaseURI(baseURI string, subscriptionID string) ProvidersClient {
+ return ProvidersClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Get gets the specified resource provider.
+// Parameters:
+// resourceProviderNamespace - the namespace of the resource provider.
+// expand - the $expand query parameter. For example, to include property aliases in response, use
+// $expand=resourceTypes/aliases.
+func (client ProvidersClient) Get(ctx context.Context, resourceProviderNamespace string, expand string) (result Provider, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProvidersClient.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, resourceProviderNamespace, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "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.ProvidersClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client ProvidersClient) GetPreparer(ctx context.Context, resourceProviderNamespace string, expand string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceProviderNamespace": autorest.Encode("path", resourceProviderNamespace),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-05-10"
+ 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/{resourceProviderNamespace}", 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 ProvidersClient) 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 ProvidersClient) GetResponder(resp *http.Response) (result Provider, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List gets all resource providers for a subscription.
+// Parameters:
+// top - the number of results to return. If null is passed returns all deployments.
+// expand - the properties to include in the results. For example, use &$expand=metadata in the query string to
+// retrieve resource provider metadata. To include property aliases in response, use
+// $expand=resourceTypes/aliases.
+func (client ProvidersClient) List(ctx context.Context, top *int32, expand string) (result ProviderListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProvidersClient.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, top, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "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, "resources.ProvidersClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.plr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client ProvidersClient) ListPreparer(ctx context.Context, top *int32, expand string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-05-10"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+ if len(expand) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers", 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 ProvidersClient) 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 ProvidersClient) ListResponder(resp *http.Response) (result ProviderListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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 ProvidersClient) listNextResults(ctx context.Context, lastResults ProviderListResult) (result ProviderListResult, err error) {
+ req, err := lastResults.providerListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "resources.ProvidersClient", "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.ProvidersClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ProvidersClient) ListComplete(ctx context.Context, top *int32, expand string) (result ProviderListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProvidersClient.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, expand)
+ return
+}
+
+// Register registers a subscription with a resource provider.
+// Parameters:
+// resourceProviderNamespace - the namespace of the resource provider to register.
+func (client ProvidersClient) Register(ctx context.Context, resourceProviderNamespace string) (result Provider, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProvidersClient.Register")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.RegisterPreparer(ctx, resourceProviderNamespace)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "Register", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.RegisterSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "Register", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.RegisterResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "Register", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// RegisterPreparer prepares the Register request.
+func (client ProvidersClient) RegisterPreparer(ctx context.Context, resourceProviderNamespace string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceProviderNamespace": autorest.Encode("path", resourceProviderNamespace),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-05-10"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/register", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// RegisterSender sends the Register request. The method will close the
+// http.Response Body if it receives an error.
+func (client ProvidersClient) RegisterSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// RegisterResponder handles the response to the Register request. The method always
+// closes the http.Response Body.
+func (client ProvidersClient) RegisterResponder(resp *http.Response) (result Provider, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Unregister unregisters a subscription from a resource provider.
+// Parameters:
+// resourceProviderNamespace - the namespace of the resource provider to unregister.
+func (client ProvidersClient) Unregister(ctx context.Context, resourceProviderNamespace string) (result Provider, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProvidersClient.Unregister")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UnregisterPreparer(ctx, resourceProviderNamespace)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "Unregister", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UnregisterSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "Unregister", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UnregisterResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "Unregister", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UnregisterPreparer prepares the Unregister request.
+func (client ProvidersClient) UnregisterPreparer(ctx context.Context, resourceProviderNamespace string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceProviderNamespace": autorest.Encode("path", resourceProviderNamespace),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-05-10"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/unregister", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UnregisterSender sends the Unregister request. The method will close the
+// http.Response Body if it receives an error.
+func (client ProvidersClient) UnregisterSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// UnregisterResponder handles the response to the Unregister request. The method always
+// closes the http.Response Body.
+func (client ProvidersClient) UnregisterResponder(resp *http.Response) (result Provider, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/resources/mgmt/2017-05-10/resources/resources.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/resources.go
new file mode 100644
index 000000000..372114f85
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/resources.go
@@ -0,0 +1,1319 @@
+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"
+)
+
+// Client is the provides operations for working with resources and resource groups.
+type Client struct {
+ BaseClient
+}
+
+// NewClient creates an instance of the Client client.
+func NewClient(subscriptionID string) Client {
+ return NewClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewClientWithBaseURI creates an instance of the Client 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 NewClientWithBaseURI(baseURI string, subscriptionID string) Client {
+ return Client{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CheckExistence checks whether a resource exists.
+// Parameters:
+// resourceGroupName - the name of the resource group containing the resource to check. The name is case
+// insensitive.
+// resourceProviderNamespace - the resource provider of the resource to check.
+// parentResourcePath - the parent resource identity.
+// resourceType - the resource type.
+// resourceName - the name of the resource to check whether it exists.
+// APIVersion - the API version to use for the operation.
+func (client Client) CheckExistence(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.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}}}}); err != nil {
+ return result, validation.NewError("resources.Client", "CheckExistence", err.Error())
+ }
+
+ req, err := client.CheckExistencePreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, APIVersion)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "CheckExistence", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CheckExistenceSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "resources.Client", "CheckExistence", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CheckExistenceResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "CheckExistence", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CheckExistencePreparer prepares the CheckExistence request.
+func (client Client) CheckExistencePreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "parentResourcePath": parentResourcePath,
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "resourceProviderNamespace": autorest.Encode("path", resourceProviderNamespace),
+ "resourceType": resourceType,
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsHead(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}", 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 Client) 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 Client) CheckExistenceResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// CheckExistenceByID checks by ID whether a resource exists.
+// Parameters:
+// resourceID - the fully qualified ID of the resource, including the resource name and resource type. Use the
+// format,
+// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
+// APIVersion - the API version to use for the operation.
+func (client Client) CheckExistenceByID(ctx context.Context, resourceID string, APIVersion string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.CheckExistenceByID")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.CheckExistenceByIDPreparer(ctx, resourceID, APIVersion)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "CheckExistenceByID", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CheckExistenceByIDSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "resources.Client", "CheckExistenceByID", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CheckExistenceByIDResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "CheckExistenceByID", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CheckExistenceByIDPreparer prepares the CheckExistenceByID request.
+func (client Client) CheckExistenceByIDPreparer(ctx context.Context, resourceID string, APIVersion string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceId": resourceID,
+ }
+
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsHead(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{resourceId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CheckExistenceByIDSender sends the CheckExistenceByID request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) CheckExistenceByIDSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// CheckExistenceByIDResponder handles the response to the CheckExistenceByID request. The method always
+// closes the http.Response Body.
+func (client Client) CheckExistenceByIDResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// CreateOrUpdate creates a resource.
+// Parameters:
+// resourceGroupName - the name of the resource group for the resource. The name is case insensitive.
+// resourceProviderNamespace - the namespace of the resource provider.
+// parentResourcePath - the parent resource identity.
+// resourceType - the resource type of the resource to create.
+// resourceName - the name of the resource to create.
+// APIVersion - the API version to use for the operation.
+// parameters - parameters for creating or updating the resource.
+func (client Client) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string, parameters GenericResource) (result CreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.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: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.Kind", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.Kind", Name: validation.Pattern, Rule: `^[-\w\._,\(\)]+$`, Chain: nil}}}}}}); err != nil {
+ return result, validation.NewError("resources.Client", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, APIVersion, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client Client) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string, parameters GenericResource) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "parentResourcePath": parentResourcePath,
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "resourceProviderNamespace": autorest.Encode("path", resourceProviderNamespace),
+ "resourceType": resourceType,
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ 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/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) CreateOrUpdateSender(req *http.Request) (future CreateOrUpdateFuture, 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 Client) CreateOrUpdateResponder(resp *http.Response) (result GenericResource, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// CreateOrUpdateByID create a resource by ID.
+// Parameters:
+// resourceID - the fully qualified ID of the resource, including the resource name and resource type. Use the
+// format,
+// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
+// APIVersion - the API version to use for the operation.
+// parameters - create or update resource parameters.
+func (client Client) CreateOrUpdateByID(ctx context.Context, resourceID string, APIVersion string, parameters GenericResource) (result CreateOrUpdateByIDFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.CreateOrUpdateByID")
+ 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.Kind", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.Kind", Name: validation.Pattern, Rule: `^[-\w\._,\(\)]+$`, Chain: nil}}}}}}); err != nil {
+ return result, validation.NewError("resources.Client", "CreateOrUpdateByID", err.Error())
+ }
+
+ req, err := client.CreateOrUpdateByIDPreparer(ctx, resourceID, APIVersion, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "CreateOrUpdateByID", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateByIDSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "CreateOrUpdateByID", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdateByIDPreparer prepares the CreateOrUpdateByID request.
+func (client Client) CreateOrUpdateByIDPreparer(ctx context.Context, resourceID string, APIVersion string, parameters GenericResource) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceId": resourceID,
+ }
+
+ 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("/{resourceId}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateByIDSender sends the CreateOrUpdateByID request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) CreateOrUpdateByIDSender(req *http.Request) (future CreateOrUpdateByIDFuture, 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
+}
+
+// CreateOrUpdateByIDResponder handles the response to the CreateOrUpdateByID request. The method always
+// closes the http.Response Body.
+func (client Client) CreateOrUpdateByIDResponder(resp *http.Response) (result GenericResource, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete deletes a resource.
+// Parameters:
+// resourceGroupName - the name of the resource group that contains the resource to delete. The name is case
+// insensitive.
+// resourceProviderNamespace - the namespace of the resource provider.
+// parentResourcePath - the parent resource identity.
+// resourceType - the resource type.
+// resourceName - the name of the resource to delete.
+// APIVersion - the API version to use for the operation.
+func (client Client) Delete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string) (result DeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.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}}}}); err != nil {
+ return result, validation.NewError("resources.Client", "Delete", err.Error())
+ }
+
+ req, err := client.DeletePreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, APIVersion)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client Client) DeletePreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "parentResourcePath": parentResourcePath,
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "resourceProviderNamespace": autorest.Encode("path", resourceProviderNamespace),
+ "resourceType": resourceType,
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) DeleteSender(req *http.Request) (future DeleteFuture, 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 Client) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// DeleteByID deletes a resource by ID.
+// Parameters:
+// resourceID - the fully qualified ID of the resource, including the resource name and resource type. Use the
+// format,
+// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
+// APIVersion - the API version to use for the operation.
+func (client Client) DeleteByID(ctx context.Context, resourceID string, APIVersion string) (result DeleteByIDFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.DeleteByID")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeleteByIDPreparer(ctx, resourceID, APIVersion)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "DeleteByID", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteByIDSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "DeleteByID", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeleteByIDPreparer prepares the DeleteByID request.
+func (client Client) DeleteByIDPreparer(ctx context.Context, resourceID string, APIVersion string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceId": resourceID,
+ }
+
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{resourceId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteByIDSender sends the DeleteByID request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) DeleteByIDSender(req *http.Request) (future DeleteByIDFuture, 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
+}
+
+// DeleteByIDResponder handles the response to the DeleteByID request. The method always
+// closes the http.Response Body.
+func (client Client) DeleteByIDResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get gets a resource.
+// Parameters:
+// resourceGroupName - the name of the resource group containing the resource to get. The name is case
+// insensitive.
+// resourceProviderNamespace - the namespace of the resource provider.
+// parentResourcePath - the parent resource identity.
+// resourceType - the resource type of the resource.
+// resourceName - the name of the resource to get.
+// APIVersion - the API version to use for the operation.
+func (client Client) Get(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string) (result GenericResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.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}}}}); err != nil {
+ return result, validation.NewError("resources.Client", "Get", err.Error())
+ }
+
+ req, err := client.GetPreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, APIVersion)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "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.Client", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client Client) GetPreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "parentResourcePath": parentResourcePath,
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "resourceProviderNamespace": autorest.Encode("path", resourceProviderNamespace),
+ "resourceType": resourceType,
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) 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 Client) GetResponder(resp *http.Response) (result GenericResource, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetByID gets a resource by ID.
+// Parameters:
+// resourceID - the fully qualified ID of the resource, including the resource name and resource type. Use the
+// format,
+// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
+// APIVersion - the API version to use for the operation.
+func (client Client) GetByID(ctx context.Context, resourceID string, APIVersion string) (result GenericResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.GetByID")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetByIDPreparer(ctx, resourceID, APIVersion)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "GetByID", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetByIDSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.Client", "GetByID", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetByIDResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "GetByID", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetByIDPreparer prepares the GetByID request.
+func (client Client) GetByIDPreparer(ctx context.Context, resourceID string, APIVersion string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceId": resourceID,
+ }
+
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{resourceId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetByIDSender sends the GetByID request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) GetByIDSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetByIDResponder handles the response to the GetByID request. The method always
+// closes the http.Response Body.
+func (client Client) GetByIDResponder(resp *http.Response) (result GenericResource, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List get all the resources in a subscription.
+// Parameters:
+// 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 resource groups.
+func (client Client) List(ctx context.Context, filter string, expand string, top *int32) (result ListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.List")
+ defer func() {
+ sc := -1
+ if result.lr.Response.Response != nil {
+ sc = result.lr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, filter, expand, top)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.lr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.Client", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.lr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client Client) ListPreparer(ctx context.Context, filter string, expand string, top *int32) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-05-10"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+ if len(expand) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resources", 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 Client) 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 Client) ListResponder(resp *http.Response) (result ListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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 Client) listNextResults(ctx context.Context, lastResults ListResult) (result ListResult, err error) {
+ req, err := lastResults.listResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "resources.Client", "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.Client", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client Client) ListComplete(ctx context.Context, filter string, expand string, top *int32) (result ListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx, filter, expand, top)
+ return
+}
+
+// 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.
+// 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.
+func (client Client) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, expand string, top *int32) (result ListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.lr.Response.Response != nil {
+ sc = result.lr.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.Client", "ListByResourceGroup", err.Error())
+ }
+
+ result.fn = client.listByResourceGroupNextResults
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, filter, expand, top)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.lr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.Client", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.lr, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "ListByResourceGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client Client) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string, filter string, expand string, top *int32) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-05-10"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+ if len(expand) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/resources", 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 Client) 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 Client) ListByResourceGroupResponder(resp *http.Response) (result ListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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 Client) listByResourceGroupNextResults(ctx context.Context, lastResults ListResult) (result ListResult, err error) {
+ req, err := lastResults.listResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "resources.Client", "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.Client", "listByResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client Client) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, expand string, top *int32) (result ListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.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, expand, top)
+ return
+}
+
+// MoveResources the resources to move must be in the same source resource group. The target resource group may be in a
+// different subscription. When moving resources, both the source group and the target group are locked for the
+// duration of the operation. Write and delete operations are blocked on the groups until the move completes.
+// Parameters:
+// sourceResourceGroupName - the name of the resource group containing the resources to move.
+// parameters - parameters for moving resources.
+func (client Client) MoveResources(ctx context.Context, sourceResourceGroupName string, parameters MoveInfo) (result MoveResourcesFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.MoveResources")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: sourceResourceGroupName,
+ Constraints: []validation.Constraint{{Target: "sourceResourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
+ {Target: "sourceResourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "sourceResourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("resources.Client", "MoveResources", err.Error())
+ }
+
+ req, err := client.MoveResourcesPreparer(ctx, sourceResourceGroupName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "MoveResources", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.MoveResourcesSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "MoveResources", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// MoveResourcesPreparer prepares the MoveResources request.
+func (client Client) MoveResourcesPreparer(ctx context.Context, sourceResourceGroupName string, parameters MoveInfo) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "sourceResourceGroupName": autorest.Encode("path", sourceResourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-05-10"
+ 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/{sourceResourceGroupName}/moveResources", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// MoveResourcesSender sends the MoveResources request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) MoveResourcesSender(req *http.Request) (future MoveResourcesFuture, 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
+}
+
+// MoveResourcesResponder handles the response to the MoveResources request. The method always
+// closes the http.Response Body.
+func (client Client) MoveResourcesResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Update updates a resource.
+// Parameters:
+// resourceGroupName - the name of the resource group for the resource. The name is case insensitive.
+// resourceProviderNamespace - the namespace of the resource provider.
+// parentResourcePath - the parent resource identity.
+// resourceType - the resource type of the resource to update.
+// resourceName - the name of the resource to update.
+// APIVersion - the API version to use for the operation.
+// parameters - parameters for updating the resource.
+func (client Client) Update(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string, parameters GenericResource) (result UpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.Update")
+ 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}}}}); err != nil {
+ return result, validation.NewError("resources.Client", "Update", err.Error())
+ }
+
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, APIVersion, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client Client) UpdatePreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string, parameters GenericResource) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "parentResourcePath": parentResourcePath,
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "resourceProviderNamespace": autorest.Encode("path", resourceProviderNamespace),
+ "resourceType": resourceType,
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ 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/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}", 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 Client) UpdateSender(req *http.Request) (future UpdateFuture, 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 Client) UpdateResponder(resp *http.Response) (result GenericResource, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// UpdateByID updates a resource by ID.
+// Parameters:
+// resourceID - the fully qualified ID of the resource, including the resource name and resource type. Use the
+// format,
+// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
+// APIVersion - the API version to use for the operation.
+// parameters - update resource parameters.
+func (client Client) UpdateByID(ctx context.Context, resourceID string, APIVersion string, parameters GenericResource) (result UpdateByIDFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.UpdateByID")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdateByIDPreparer(ctx, resourceID, APIVersion, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "UpdateByID", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateByIDSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "UpdateByID", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdateByIDPreparer prepares the UpdateByID request.
+func (client Client) UpdateByIDPreparer(ctx context.Context, resourceID string, APIVersion string, parameters GenericResource) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceId": resourceID,
+ }
+
+ 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("/{resourceId}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateByIDSender sends the UpdateByID request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) UpdateByIDSender(req *http.Request) (future UpdateByIDFuture, 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
+}
+
+// UpdateByIDResponder handles the response to the UpdateByID request. The method always
+// closes the http.Response Body.
+func (client Client) UpdateByIDResponder(resp *http.Response) (result GenericResource, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ValidateMoveResources this operation checks whether the specified resources can be moved to the target. The
+// resources to move must be in the same source resource group. The target resource group may be in a different
+// subscription. If validation succeeds, it returns HTTP response code 204 (no content). If validation fails, it
+// returns HTTP response code 409 (Conflict) with an error message. Retrieve the URL in the Location header value to
+// check the result of the long-running operation.
+// Parameters:
+// sourceResourceGroupName - the name of the resource group containing the resources to validate for move.
+// parameters - parameters for moving resources.
+func (client Client) ValidateMoveResources(ctx context.Context, sourceResourceGroupName string, parameters MoveInfo) (result ValidateMoveResourcesFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.ValidateMoveResources")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: sourceResourceGroupName,
+ Constraints: []validation.Constraint{{Target: "sourceResourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
+ {Target: "sourceResourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "sourceResourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("resources.Client", "ValidateMoveResources", err.Error())
+ }
+
+ req, err := client.ValidateMoveResourcesPreparer(ctx, sourceResourceGroupName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "ValidateMoveResources", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.ValidateMoveResourcesSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.Client", "ValidateMoveResources", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// ValidateMoveResourcesPreparer prepares the ValidateMoveResources request.
+func (client Client) ValidateMoveResourcesPreparer(ctx context.Context, sourceResourceGroupName string, parameters MoveInfo) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "sourceResourceGroupName": autorest.Encode("path", sourceResourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-05-10"
+ 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/{sourceResourceGroupName}/validateMoveResources", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ValidateMoveResourcesSender sends the ValidateMoveResources request. The method will close the
+// http.Response Body if it receives an error.
+func (client Client) ValidateMoveResourcesSender(req *http.Request) (future ValidateMoveResourcesFuture, 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
+}
+
+// ValidateMoveResourcesResponder handles the response to the ValidateMoveResources request. The method always
+// closes the http.Response Body.
+func (client Client) ValidateMoveResourcesResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusConflict),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/tags.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/tags.go
new file mode 100644
index 000000000..c8df47e69
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/tags.go
@@ -0,0 +1,450 @@
+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/tracing"
+ "net/http"
+)
+
+// TagsClient is the provides operations for working with resources and resource groups.
+type TagsClient struct {
+ BaseClient
+}
+
+// NewTagsClient creates an instance of the TagsClient client.
+func NewTagsClient(subscriptionID string) TagsClient {
+ return NewTagsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewTagsClientWithBaseURI creates an instance of the TagsClient 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 NewTagsClientWithBaseURI(baseURI string, subscriptionID string) TagsClient {
+ return TagsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate the tag name can have a maximum of 512 characters and is case insensitive. Tag names created by Azure
+// have prefixes of microsoft, azure, or windows. You cannot create tags with one of these prefixes.
+// Parameters:
+// tagName - the name of the tag to create.
+func (client TagsClient) CreateOrUpdate(ctx context.Context, tagName string) (result TagDetails, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagsClient.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, tagName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.TagsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateOrUpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.TagsClient", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.TagsClient", "CreateOrUpdate", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client TagsClient) CreateOrUpdatePreparer(ctx context.Context, tagName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "tagName": autorest.Encode("path", tagName),
+ }
+
+ const APIVersion = "2017-05-10"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/tagNames/{tagName}", pathParameters),
+ 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 TagsClient) 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 TagsClient) CreateOrUpdateResponder(resp *http.Response) (result TagDetails, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// CreateOrUpdateValue creates a tag value. The name of the tag must already exist.
+// Parameters:
+// tagName - the name of the tag.
+// tagValue - the value of the tag to create.
+func (client TagsClient) CreateOrUpdateValue(ctx context.Context, tagName string, tagValue string) (result TagValue, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagsClient.CreateOrUpdateValue")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.CreateOrUpdateValuePreparer(ctx, tagName, tagValue)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.TagsClient", "CreateOrUpdateValue", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateOrUpdateValueSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.TagsClient", "CreateOrUpdateValue", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateValueResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.TagsClient", "CreateOrUpdateValue", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateOrUpdateValuePreparer prepares the CreateOrUpdateValue request.
+func (client TagsClient) CreateOrUpdateValuePreparer(ctx context.Context, tagName string, tagValue string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "tagName": autorest.Encode("path", tagName),
+ "tagValue": autorest.Encode("path", tagValue),
+ }
+
+ const APIVersion = "2017-05-10"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/tagNames/{tagName}/tagValues/{tagValue}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateValueSender sends the CreateOrUpdateValue request. The method will close the
+// http.Response Body if it receives an error.
+func (client TagsClient) CreateOrUpdateValueSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateOrUpdateValueResponder handles the response to the CreateOrUpdateValue request. The method always
+// closes the http.Response Body.
+func (client TagsClient) CreateOrUpdateValueResponder(resp *http.Response) (result TagValue, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete you must remove all values from a resource tag before you can delete it.
+// Parameters:
+// tagName - the name of the tag.
+func (client TagsClient) Delete(ctx context.Context, tagName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, tagName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.TagsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "resources.TagsClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.TagsClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client TagsClient) DeletePreparer(ctx context.Context, tagName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "tagName": autorest.Encode("path", tagName),
+ }
+
+ const APIVersion = "2017-05-10"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/tagNames/{tagName}", 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 TagsClient) 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 TagsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// DeleteValue deletes a tag value.
+// Parameters:
+// tagName - the name of the tag.
+// tagValue - the value of the tag to delete.
+func (client TagsClient) DeleteValue(ctx context.Context, tagName string, tagValue string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagsClient.DeleteValue")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeleteValuePreparer(ctx, tagName, tagValue)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.TagsClient", "DeleteValue", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteValueSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "resources.TagsClient", "DeleteValue", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteValueResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.TagsClient", "DeleteValue", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeleteValuePreparer prepares the DeleteValue request.
+func (client TagsClient) DeleteValuePreparer(ctx context.Context, tagName string, tagValue string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "tagName": autorest.Encode("path", tagName),
+ "tagValue": autorest.Encode("path", tagValue),
+ }
+
+ const APIVersion = "2017-05-10"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/tagNames/{tagName}/tagValues/{tagValue}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteValueSender sends the DeleteValue request. The method will close the
+// http.Response Body if it receives an error.
+func (client TagsClient) DeleteValueSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// DeleteValueResponder handles the response to the DeleteValue request. The method always
+// closes the http.Response Body.
+func (client TagsClient) DeleteValueResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// List gets the names and values of all resource tags that are defined in a subscription.
+func (client TagsClient) List(ctx context.Context) (result TagsListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagsClient.List")
+ defer func() {
+ sc := -1
+ if result.tlr.Response.Response != nil {
+ sc = result.tlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.TagsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.tlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.TagsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.tlr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.TagsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client TagsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-05-10"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/tagNames", 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 TagsClient) 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 TagsClient) ListResponder(resp *http.Response) (result TagsListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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 TagsClient) listNextResults(ctx context.Context, lastResults TagsListResult) (result TagsListResult, err error) {
+ req, err := lastResults.tagsListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "resources.TagsClient", "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.TagsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.TagsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client TagsClient) ListComplete(ctx context.Context) (result TagsListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagsClient.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/resources/mgmt/2017-05-10/resources/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/version.go
new file mode 100644
index 000000000..49538e1fc
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/version.go
@@ -0,0 +1,30 @@
+package resources
+
+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() + " resources/2017-05-10"
+}
+
+// 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/storage/mgmt/2019-06-01/storage/accounts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/accounts.go
index 2ac4600dc..6ac5d3235 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/accounts.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/accounts.go
@@ -36,7 +36,8 @@ func NewAccountsClient(subscriptionID string) AccountsClient {
return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client.
+// NewAccountsClientWithBaseURI creates an instance of the AccountsClient 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 NewAccountsClientWithBaseURI(baseURI string, subscriptionID string) AccountsClient {
return AccountsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -110,8 +111,7 @@ func (client AccountsClient) CheckNameAvailabilityPreparer(ctx context.Context,
// CheckNameAvailabilitySender sends the CheckNameAvailability request. The method will close the
// http.Response Body if it receives an error.
func (client AccountsClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always
@@ -221,9 +221,8 @@ func (client AccountsClient) CreatePreparer(ctx context.Context, resourceGroupNa
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client AccountsClient) CreateSender(req *http.Request) (future AccountsCreateFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -319,8 +318,7 @@ func (client AccountsClient) DeletePreparer(ctx context.Context, resourceGroupNa
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client AccountsClient) DeleteSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// DeleteResponder handles the response to the Delete request. The method always
@@ -406,9 +404,8 @@ func (client AccountsClient) FailoverPreparer(ctx context.Context, resourceGroup
// FailoverSender sends the Failover request. The method will close the
// http.Response Body if it receives an error.
func (client AccountsClient) FailoverSender(req *http.Request) (future AccountsFailoverFuture, err error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response
- resp, err = autorest.SendWithSender(client, req, sd...)
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -436,7 +433,7 @@ func (client AccountsClient) FailoverResponder(resp *http.Response) (result auto
// accountName - the name of the storage account within the specified resource group. Storage account names
// must be between 3 and 24 characters in length and use numbers and lower-case letters only.
// expand - may be used to expand the properties within account's properties. By default, data is not included
-// when fetching properties. Currently we only support geoReplicationStats.
+// when fetching properties. Currently we only support geoReplicationStats and blobRestoreStatus.
func (client AccountsClient) GetProperties(ctx context.Context, resourceGroupName string, accountName string, expand AccountExpand) (result Account, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.GetProperties")
@@ -509,8 +506,7 @@ func (client AccountsClient) GetPropertiesPreparer(ctx context.Context, resource
// GetPropertiesSender sends the GetProperties request. The method will close the
// http.Response Body if it receives an error.
func (client AccountsClient) GetPropertiesSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetPropertiesResponder handles the response to the GetProperties request. The method always
@@ -589,8 +585,7 @@ func (client AccountsClient) ListPreparer(ctx context.Context) (*http.Request, e
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client AccountsClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -723,8 +718,7 @@ func (client AccountsClient) ListAccountSASPreparer(ctx context.Context, resourc
// ListAccountSASSender sends the ListAccountSAS request. The method will close the
// http.Response Body if it receives an error.
func (client AccountsClient) ListAccountSASSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListAccountSASResponder handles the response to the ListAccountSAS request. The method always
@@ -810,8 +804,7 @@ func (client AccountsClient) ListByResourceGroupPreparer(ctx context.Context, re
// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
// http.Response Body if it receives an error.
func (client AccountsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
@@ -906,8 +899,7 @@ func (client AccountsClient) ListKeysPreparer(ctx context.Context, resourceGroup
// ListKeysSender sends the ListKeys request. The method will close the
// http.Response Body if it receives an error.
func (client AccountsClient) ListKeysSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListKeysResponder handles the response to the ListKeys request. The method always
@@ -1005,8 +997,7 @@ func (client AccountsClient) ListServiceSASPreparer(ctx context.Context, resourc
// ListServiceSASSender sends the ListServiceSAS request. The method will close the
// http.Response Body if it receives an error.
func (client AccountsClient) ListServiceSASSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListServiceSASResponder handles the response to the ListServiceSAS request. The method always
@@ -1102,8 +1093,7 @@ func (client AccountsClient) RegenerateKeyPreparer(ctx context.Context, resource
// RegenerateKeySender sends the RegenerateKey request. The method will close the
// http.Response Body if it receives an error.
func (client AccountsClient) RegenerateKeySender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// RegenerateKeyResponder handles the response to the RegenerateKey request. The method always
@@ -1119,6 +1109,103 @@ func (client AccountsClient) RegenerateKeyResponder(resp *http.Response) (result
return
}
+// RestoreBlobRanges restore blobs in the specified blob ranges
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - the name of the storage account within the specified resource group. Storage account names
+// must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+// parameters - the parameters to provide for restore blob ranges.
+func (client AccountsClient) RestoreBlobRanges(ctx context.Context, resourceGroupName string, accountName string, parameters BlobRestoreParameters) (result AccountsRestoreBlobRangesFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.RestoreBlobRanges")
+ 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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.TimeToRestore", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.BlobRanges", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.AccountsClient", "RestoreBlobRanges", err.Error())
+ }
+
+ req, err := client.RestoreBlobRangesPreparer(ctx, resourceGroupName, accountName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "RestoreBlobRanges", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.RestoreBlobRangesSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "RestoreBlobRanges", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// RestoreBlobRangesPreparer prepares the RestoreBlobRanges request.
+func (client AccountsClient) RestoreBlobRangesPreparer(ctx context.Context, resourceGroupName string, accountName string, parameters BlobRestoreParameters) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/restoreBlobRanges", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// RestoreBlobRangesSender sends the RestoreBlobRanges request. The method will close the
+// http.Response Body if it receives an error.
+func (client AccountsClient) RestoreBlobRangesSender(req *http.Request) (future AccountsRestoreBlobRangesFuture, 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
+}
+
+// RestoreBlobRangesResponder handles the response to the RestoreBlobRanges request. The method always
+// closes the http.Response Body.
+func (client AccountsClient) RestoreBlobRangesResponder(resp *http.Response) (result BlobRestoreStatus, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
// RevokeUserDelegationKeys revoke user delegation keys.
// Parameters:
// resourceGroupName - the name of the resource group within the user's subscription. The name is case
@@ -1194,8 +1281,7 @@ func (client AccountsClient) RevokeUserDelegationKeysPreparer(ctx context.Contex
// RevokeUserDelegationKeysSender sends the RevokeUserDelegationKeys request. The method will close the
// http.Response Body if it receives an error.
func (client AccountsClient) RevokeUserDelegationKeysSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// RevokeUserDelegationKeysResponder handles the response to the RevokeUserDelegationKeys request. The method always
@@ -1293,8 +1379,7 @@ func (client AccountsClient) UpdatePreparer(ctx context.Context, resourceGroupNa
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client AccountsClient) UpdateSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// UpdateResponder handles the response to the Update request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/blobcontainers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/blobcontainers.go
index 402a0135a..79cd26882 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/blobcontainers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/blobcontainers.go
@@ -36,7 +36,8 @@ func NewBlobContainersClient(subscriptionID string) BlobContainersClient {
return NewBlobContainersClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewBlobContainersClientWithBaseURI creates an instance of the BlobContainersClient client.
+// NewBlobContainersClientWithBaseURI creates an instance of the BlobContainersClient 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 NewBlobContainersClientWithBaseURI(baseURI string, subscriptionID string) BlobContainersClient {
return BlobContainersClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -130,8 +131,7 @@ func (client BlobContainersClient) ClearLegalHoldPreparer(ctx context.Context, r
// ClearLegalHoldSender sends the ClearLegalHold request. The method will close the
// http.Response Body if it receives an error.
func (client BlobContainersClient) ClearLegalHoldSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ClearLegalHoldResponder handles the response to the ClearLegalHold request. The method always
@@ -181,13 +181,6 @@ func (client BlobContainersClient) Create(ctx context.Context, resourceGroupName
{TargetValue: containerName,
Constraints: []validation.Constraint{{Target: "containerName", Name: validation.MaxLength, Rule: 63, Chain: nil},
{Target: "containerName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
- {TargetValue: blobContainer,
- Constraints: []validation.Constraint{{Target: "blobContainer.ContainerProperties", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "blobContainer.ContainerProperties.ImmutabilityPolicy", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "blobContainer.ContainerProperties.ImmutabilityPolicy.ImmutabilityPolicyProperty", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "blobContainer.ContainerProperties.ImmutabilityPolicy.ImmutabilityPolicyProperty.ImmutabilityPeriodSinceCreationInDays", Name: validation.Null, Rule: true, Chain: nil}}},
- }},
- }}}},
{TargetValue: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
return result, validation.NewError("storage.BlobContainersClient", "Create", err.Error())
@@ -241,8 +234,7 @@ func (client BlobContainersClient) CreatePreparer(ctx context.Context, resourceG
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client BlobContainersClient) CreateSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// CreateResponder handles the response to the Create request. The method always
@@ -298,9 +290,7 @@ func (client BlobContainersClient) CreateOrUpdateImmutabilityPolicy(ctx context.
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "parameters.ImmutabilityPolicyProperty", Name: validation.Null, Rule: true,
- Chain: []validation.Constraint{{Target: "parameters.ImmutabilityPolicyProperty.ImmutabilityPeriodSinceCreationInDays", Name: validation.Null, Rule: true, Chain: nil}}},
- }}}}}); err != nil {
+ Chain: []validation.Constraint{{Target: "parameters.ImmutabilityPolicyProperty", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
return result, validation.NewError("storage.BlobContainersClient", "CreateOrUpdateImmutabilityPolicy", err.Error())
}
@@ -360,8 +350,7 @@ func (client BlobContainersClient) CreateOrUpdateImmutabilityPolicyPreparer(ctx
// CreateOrUpdateImmutabilityPolicySender sends the CreateOrUpdateImmutabilityPolicy request. The method will close the
// http.Response Body if it receives an error.
func (client BlobContainersClient) CreateOrUpdateImmutabilityPolicySender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// CreateOrUpdateImmutabilityPolicyResponder handles the response to the CreateOrUpdateImmutabilityPolicy request. The method always
@@ -459,8 +448,7 @@ func (client BlobContainersClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client BlobContainersClient) DeleteSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// DeleteResponder handles the response to the Delete request. The method always
@@ -565,8 +553,7 @@ func (client BlobContainersClient) DeleteImmutabilityPolicyPreparer(ctx context.
// DeleteImmutabilityPolicySender sends the DeleteImmutabilityPolicy request. The method will close the
// http.Response Body if it receives an error.
func (client BlobContainersClient) DeleteImmutabilityPolicySender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// DeleteImmutabilityPolicyResponder handles the response to the DeleteImmutabilityPolicy request. The method always
@@ -622,9 +609,7 @@ func (client BlobContainersClient) ExtendImmutabilityPolicy(ctx context.Context,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "parameters.ImmutabilityPolicyProperty", Name: validation.Null, Rule: true,
- Chain: []validation.Constraint{{Target: "parameters.ImmutabilityPolicyProperty.ImmutabilityPeriodSinceCreationInDays", Name: validation.Null, Rule: true, Chain: nil}}},
- }}}}}); err != nil {
+ Chain: []validation.Constraint{{Target: "parameters.ImmutabilityPolicyProperty", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
return result, validation.NewError("storage.BlobContainersClient", "ExtendImmutabilityPolicy", err.Error())
}
@@ -680,8 +665,7 @@ func (client BlobContainersClient) ExtendImmutabilityPolicyPreparer(ctx context.
// ExtendImmutabilityPolicySender sends the ExtendImmutabilityPolicy request. The method will close the
// http.Response Body if it receives an error.
func (client BlobContainersClient) ExtendImmutabilityPolicySender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ExtendImmutabilityPolicyResponder handles the response to the ExtendImmutabilityPolicy request. The method always
@@ -779,8 +763,7 @@ func (client BlobContainersClient) GetPreparer(ctx context.Context, resourceGrou
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client BlobContainersClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -887,8 +870,7 @@ func (client BlobContainersClient) GetImmutabilityPolicyPreparer(ctx context.Con
// GetImmutabilityPolicySender sends the GetImmutabilityPolicy request. The method will close the
// http.Response Body if it receives an error.
func (client BlobContainersClient) GetImmutabilityPolicySender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetImmutabilityPolicyResponder handles the response to the GetImmutabilityPolicy request. The method always
@@ -993,8 +975,7 @@ func (client BlobContainersClient) LeasePreparer(ctx context.Context, resourceGr
// LeaseSender sends the Lease request. The method will close the
// http.Response Body if it receives an error.
func (client BlobContainersClient) LeaseSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// LeaseResponder handles the response to the Lease request. The method always
@@ -1019,7 +1000,8 @@ func (client BlobContainersClient) LeaseResponder(resp *http.Response) (result L
// must be between 3 and 24 characters in length and use numbers and lower-case letters only.
// maxpagesize - optional. Specified maximum number of containers that can be included in the list.
// filter - optional. When specified, only container names starting with the filter will be listed.
-func (client BlobContainersClient) List(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string) (result ListContainerItemsPage, err error) {
+// include - optional, used to include the properties for soft deleted blob containers.
+func (client BlobContainersClient) List(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string, include ListContainersInclude) (result ListContainerItemsPage, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/BlobContainersClient.List")
defer func() {
@@ -1044,7 +1026,7 @@ func (client BlobContainersClient) List(ctx context.Context, resourceGroupName s
}
result.fn = client.listNextResults
- req, err := client.ListPreparer(ctx, resourceGroupName, accountName, maxpagesize, filter)
+ req, err := client.ListPreparer(ctx, resourceGroupName, accountName, maxpagesize, filter, include)
if err != nil {
err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "List", nil, "Failure preparing request")
return
@@ -1066,7 +1048,7 @@ func (client BlobContainersClient) List(ctx context.Context, resourceGroupName s
}
// ListPreparer prepares the List request.
-func (client BlobContainersClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string) (*http.Request, error) {
+func (client BlobContainersClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string, include ListContainersInclude) (*http.Request, error) {
pathParameters := map[string]interface{}{
"accountName": autorest.Encode("path", accountName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
@@ -1083,6 +1065,9 @@ func (client BlobContainersClient) ListPreparer(ctx context.Context, resourceGro
if len(filter) > 0 {
queryParameters["$filter"] = autorest.Encode("query", filter)
}
+ if len(string(include)) > 0 {
+ queryParameters["$include"] = autorest.Encode("query", include)
+ }
preparer := autorest.CreatePreparer(
autorest.AsGet(),
@@ -1095,8 +1080,7 @@ func (client BlobContainersClient) ListPreparer(ctx context.Context, resourceGro
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client BlobContainersClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -1134,7 +1118,7 @@ func (client BlobContainersClient) listNextResults(ctx context.Context, lastResu
}
// ListComplete enumerates all values, automatically crossing page boundaries as required.
-func (client BlobContainersClient) ListComplete(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string) (result ListContainerItemsIterator, err error) {
+func (client BlobContainersClient) ListComplete(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string, include ListContainersInclude) (result ListContainerItemsIterator, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/BlobContainersClient.List")
defer func() {
@@ -1145,7 +1129,7 @@ func (client BlobContainersClient) ListComplete(ctx context.Context, resourceGro
tracing.EndSpan(ctx, sc, err)
}()
}
- result.page, err = client.List(ctx, resourceGroupName, accountName, maxpagesize, filter)
+ result.page, err = client.List(ctx, resourceGroupName, accountName, maxpagesize, filter, include)
return
}
@@ -1236,8 +1220,7 @@ func (client BlobContainersClient) LockImmutabilityPolicyPreparer(ctx context.Co
// LockImmutabilityPolicySender sends the LockImmutabilityPolicy request. The method will close the
// http.Response Body if it receives an error.
func (client BlobContainersClient) LockImmutabilityPolicySender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// LockImmutabilityPolicyResponder handles the response to the LockImmutabilityPolicy request. The method always
@@ -1342,8 +1325,7 @@ func (client BlobContainersClient) SetLegalHoldPreparer(ctx context.Context, res
// SetLegalHoldSender sends the SetLegalHold request. The method will close the
// http.Response Body if it receives an error.
func (client BlobContainersClient) SetLegalHoldSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// SetLegalHoldResponder handles the response to the SetLegalHold request. The method always
@@ -1445,8 +1427,7 @@ func (client BlobContainersClient) UpdatePreparer(ctx context.Context, resourceG
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client BlobContainersClient) UpdateSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// UpdateResponder handles the response to the Update request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/blobservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/blobservices.go
index bd3dc1ea0..198ef47b2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/blobservices.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/blobservices.go
@@ -36,7 +36,8 @@ func NewBlobServicesClient(subscriptionID string) BlobServicesClient {
return NewBlobServicesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewBlobServicesClientWithBaseURI creates an instance of the BlobServicesClient client.
+// NewBlobServicesClientWithBaseURI creates an instance of the BlobServicesClient 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 NewBlobServicesClientWithBaseURI(baseURI string, subscriptionID string) BlobServicesClient {
return BlobServicesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -118,8 +119,7 @@ func (client BlobServicesClient) GetServicePropertiesPreparer(ctx context.Contex
// GetServicePropertiesSender sends the GetServiceProperties request. The method will close the
// http.Response Body if it receives an error.
func (client BlobServicesClient) GetServicePropertiesSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetServicePropertiesResponder handles the response to the GetServiceProperties request. The method always
@@ -210,8 +210,7 @@ func (client BlobServicesClient) ListPreparer(ctx context.Context, resourceGroup
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client BlobServicesClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -262,9 +261,22 @@ func (client BlobServicesClient) SetServiceProperties(ctx context.Context, resou
Chain: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties.DeleteRetentionPolicy", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties.DeleteRetentionPolicy.Days", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties.DeleteRetentionPolicy.Days", Name: validation.InclusiveMaximum, Rule: int64(365), Chain: nil},
- {Target: "parameters.BlobServicePropertiesProperties.DeleteRetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil},
+ {Target: "parameters.BlobServicePropertiesProperties.DeleteRetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil},
}},
}},
+ {Target: "parameters.BlobServicePropertiesProperties.RestorePolicy", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties.RestorePolicy.Enabled", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.BlobServicePropertiesProperties.RestorePolicy.Days", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties.RestorePolicy.Days", Name: validation.InclusiveMaximum, Rule: int64(365), Chain: nil},
+ {Target: "parameters.BlobServicePropertiesProperties.RestorePolicy.Days", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil},
+ }},
+ }},
+ {Target: "parameters.BlobServicePropertiesProperties.ContainerDeleteRetentionPolicy", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties.ContainerDeleteRetentionPolicy.Days", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties.ContainerDeleteRetentionPolicy.Days", Name: validation.InclusiveMaximum, Rule: int64(365), Chain: nil},
+ {Target: "parameters.BlobServicePropertiesProperties.ContainerDeleteRetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil},
+ }},
+ }},
}}}}}); err != nil {
return result, validation.NewError("storage.BlobServicesClient", "SetServiceProperties", err.Error())
}
@@ -304,6 +316,7 @@ func (client BlobServicesClient) SetServicePropertiesPreparer(ctx context.Contex
"api-version": APIVersion,
}
+ parameters.Sku = nil
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPut(),
@@ -317,8 +330,7 @@ func (client BlobServicesClient) SetServicePropertiesPreparer(ctx context.Contex
// SetServicePropertiesSender sends the SetServiceProperties request. The method will close the
// http.Response Body if it receives an error.
func (client BlobServicesClient) SetServicePropertiesSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// SetServicePropertiesResponder handles the response to the SetServiceProperties request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/client.go
index 98630b5d4..af6ab21c6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/client.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/client.go
@@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient {
return NewWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewWithBaseURI creates an instance of the BaseClient client.
+// 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()),
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/encryptionscopes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/encryptionscopes.go
new file mode 100644
index 000000000..23176009f
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/encryptionscopes.go
@@ -0,0 +1,476 @@
+package storage
+
+// 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"
+)
+
+// EncryptionScopesClient is the the Azure Storage Management API.
+type EncryptionScopesClient struct {
+ BaseClient
+}
+
+// NewEncryptionScopesClient creates an instance of the EncryptionScopesClient client.
+func NewEncryptionScopesClient(subscriptionID string) EncryptionScopesClient {
+ return NewEncryptionScopesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewEncryptionScopesClientWithBaseURI creates an instance of the EncryptionScopesClient 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 NewEncryptionScopesClientWithBaseURI(baseURI string, subscriptionID string) EncryptionScopesClient {
+ return EncryptionScopesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Get returns the properties for the specified encryption scope.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - the name of the storage account within the specified resource group. Storage account names
+// must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+// encryptionScopeName - the name of the encryption scope within the specified storage account. Encryption
+// scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-)
+// only. Every dash (-) character must be immediately preceded and followed by a letter or number.
+func (client EncryptionScopesClient) Get(ctx context.Context, resourceGroupName string, accountName string, encryptionScopeName string) (result EncryptionScope, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionScopesClient.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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: encryptionScopeName,
+ Constraints: []validation.Constraint{{Target: "encryptionScopeName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "encryptionScopeName", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.EncryptionScopesClient", "Get", err.Error())
+ }
+
+ req, err := client.GetPreparer(ctx, resourceGroupName, accountName, encryptionScopeName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client EncryptionScopesClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, encryptionScopeName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "encryptionScopeName": autorest.Encode("path", encryptionScopeName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/encryptionScopes/{encryptionScopeName}", 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 EncryptionScopesClient) 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 EncryptionScopesClient) GetResponder(resp *http.Response) (result EncryptionScope, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List lists all the encryption scopes available under the specified storage account.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - the name of the storage account within the specified resource group. Storage account names
+// must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+func (client EncryptionScopesClient) List(ctx context.Context, resourceGroupName string, accountName string) (result EncryptionScopeListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionScopesClient.List")
+ defer func() {
+ sc := -1
+ if result.eslr.Response.Response != nil {
+ sc = result.eslr.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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.EncryptionScopesClient", "List", err.Error())
+ }
+
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName, accountName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.eslr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.eslr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client EncryptionScopesClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/encryptionScopes", 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 EncryptionScopesClient) 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 EncryptionScopesClient) ListResponder(resp *http.Response) (result EncryptionScopeListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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 EncryptionScopesClient) listNextResults(ctx context.Context, lastResults EncryptionScopeListResult) (result EncryptionScopeListResult, err error) {
+ req, err := lastResults.encryptionScopeListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "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, "storage.EncryptionScopesClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client EncryptionScopesClient) ListComplete(ctx context.Context, resourceGroupName string, accountName string) (result EncryptionScopeListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionScopesClient.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, accountName)
+ return
+}
+
+// Patch update encryption scope properties as specified in the request body. Update fails if the specified encryption
+// scope does not already exist.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - the name of the storage account within the specified resource group. Storage account names
+// must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+// encryptionScopeName - the name of the encryption scope within the specified storage account. Encryption
+// scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-)
+// only. Every dash (-) character must be immediately preceded and followed by a letter or number.
+// encryptionScope - encryption scope properties to be used for the update.
+func (client EncryptionScopesClient) Patch(ctx context.Context, resourceGroupName string, accountName string, encryptionScopeName string, encryptionScope EncryptionScope) (result EncryptionScope, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionScopesClient.Patch")
+ 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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: encryptionScopeName,
+ Constraints: []validation.Constraint{{Target: "encryptionScopeName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "encryptionScopeName", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.EncryptionScopesClient", "Patch", err.Error())
+ }
+
+ req, err := client.PatchPreparer(ctx, resourceGroupName, accountName, encryptionScopeName, encryptionScope)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "Patch", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.PatchSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "Patch", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.PatchResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "Patch", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// PatchPreparer prepares the Patch request.
+func (client EncryptionScopesClient) PatchPreparer(ctx context.Context, resourceGroupName string, accountName string, encryptionScopeName string, encryptionScope EncryptionScope) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "encryptionScopeName": autorest.Encode("path", encryptionScopeName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/encryptionScopes/{encryptionScopeName}", pathParameters),
+ autorest.WithJSON(encryptionScope),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// PatchSender sends the Patch request. The method will close the
+// http.Response Body if it receives an error.
+func (client EncryptionScopesClient) PatchSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// PatchResponder handles the response to the Patch request. The method always
+// closes the http.Response Body.
+func (client EncryptionScopesClient) PatchResponder(resp *http.Response) (result EncryptionScope, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Put synchronously creates or updates an encryption scope under the specified storage account. If an encryption scope
+// is already created and a subsequent request is issued with different properties, the encryption scope properties
+// will be updated per the specified request.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - the name of the storage account within the specified resource group. Storage account names
+// must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+// encryptionScopeName - the name of the encryption scope within the specified storage account. Encryption
+// scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-)
+// only. Every dash (-) character must be immediately preceded and followed by a letter or number.
+// encryptionScope - encryption scope properties to be used for the create or update.
+func (client EncryptionScopesClient) Put(ctx context.Context, resourceGroupName string, accountName string, encryptionScopeName string, encryptionScope EncryptionScope) (result EncryptionScope, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionScopesClient.Put")
+ 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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: encryptionScopeName,
+ Constraints: []validation.Constraint{{Target: "encryptionScopeName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "encryptionScopeName", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.EncryptionScopesClient", "Put", err.Error())
+ }
+
+ req, err := client.PutPreparer(ctx, resourceGroupName, accountName, encryptionScopeName, encryptionScope)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "Put", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.PutSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "Put", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.PutResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "Put", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// PutPreparer prepares the Put request.
+func (client EncryptionScopesClient) PutPreparer(ctx context.Context, resourceGroupName string, accountName string, encryptionScopeName string, encryptionScope EncryptionScope) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "encryptionScopeName": autorest.Encode("path", encryptionScopeName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/encryptionScopes/{encryptionScopeName}", pathParameters),
+ autorest.WithJSON(encryptionScope),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// PutSender sends the Put request. The method will close the
+// http.Response Body if it receives an error.
+func (client EncryptionScopesClient) PutSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// PutResponder handles the response to the Put request. The method always
+// closes the http.Response Body.
+func (client EncryptionScopesClient) PutResponder(resp *http.Response) (result EncryptionScope, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/storage/mgmt/2019-06-01/storage/fileservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/fileservices.go
index 8e51cb0cb..7c3e7689b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/fileservices.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/fileservices.go
@@ -36,7 +36,8 @@ func NewFileServicesClient(subscriptionID string) FileServicesClient {
return NewFileServicesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewFileServicesClientWithBaseURI creates an instance of the FileServicesClient client.
+// NewFileServicesClientWithBaseURI creates an instance of the FileServicesClient 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 NewFileServicesClientWithBaseURI(baseURI string, subscriptionID string) FileServicesClient {
return FileServicesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -118,8 +119,7 @@ func (client FileServicesClient) GetServicePropertiesPreparer(ctx context.Contex
// GetServicePropertiesSender sends the GetServiceProperties request. The method will close the
// http.Response Body if it receives an error.
func (client FileServicesClient) GetServicePropertiesSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetServicePropertiesResponder handles the response to the GetServiceProperties request. The method always
@@ -210,8 +210,7 @@ func (client FileServicesClient) ListPreparer(ctx context.Context, resourceGroup
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client FileServicesClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -256,7 +255,16 @@ func (client FileServicesClient) SetServiceProperties(ctx context.Context, resou
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
{Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
{TargetValue: client.SubscriptionID,
- Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.FileServicePropertiesProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.FileServicePropertiesProperties.ShareDeleteRetentionPolicy", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.FileServicePropertiesProperties.ShareDeleteRetentionPolicy.Days", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.FileServicePropertiesProperties.ShareDeleteRetentionPolicy.Days", Name: validation.InclusiveMaximum, Rule: int64(365), Chain: nil},
+ {Target: "parameters.FileServicePropertiesProperties.ShareDeleteRetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil},
+ }},
+ }},
+ }}}}}); err != nil {
return result, validation.NewError("storage.FileServicesClient", "SetServiceProperties", err.Error())
}
@@ -295,6 +303,7 @@ func (client FileServicesClient) SetServicePropertiesPreparer(ctx context.Contex
"api-version": APIVersion,
}
+ parameters.Sku = nil
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPut(),
@@ -308,8 +317,7 @@ func (client FileServicesClient) SetServicePropertiesPreparer(ctx context.Contex
// SetServicePropertiesSender sends the SetServiceProperties request. The method will close the
// http.Response Body if it receives an error.
func (client FileServicesClient) SetServicePropertiesSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// SetServicePropertiesResponder handles the response to the SetServiceProperties request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/fileshares.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/fileshares.go
index eb5ca77d0..5991c6ffb 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/fileshares.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/fileshares.go
@@ -36,7 +36,8 @@ func NewFileSharesClient(subscriptionID string) FileSharesClient {
return NewFileSharesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewFileSharesClientWithBaseURI creates an instance of the FileSharesClient client.
+// NewFileSharesClientWithBaseURI creates an instance of the FileSharesClient 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 NewFileSharesClientWithBaseURI(baseURI string, subscriptionID string) FileSharesClient {
return FileSharesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -77,8 +78,8 @@ func (client FileSharesClient) Create(ctx context.Context, resourceGroupName str
{TargetValue: fileShare,
Constraints: []validation.Constraint{{Target: "fileShare.FileShareProperties", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "fileShare.FileShareProperties.ShareQuota", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "fileShare.FileShareProperties.ShareQuota", Name: validation.InclusiveMaximum, Rule: int64(5120), Chain: nil},
- {Target: "fileShare.FileShareProperties.ShareQuota", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil},
+ Chain: []validation.Constraint{{Target: "fileShare.FileShareProperties.ShareQuota", Name: validation.InclusiveMaximum, Rule: int64(102400), Chain: nil},
+ {Target: "fileShare.FileShareProperties.ShareQuota", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil},
}},
}}}},
{TargetValue: client.SubscriptionID,
@@ -134,8 +135,7 @@ func (client FileSharesClient) CreatePreparer(ctx context.Context, resourceGroup
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client FileSharesClient) CreateSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// CreateResponder handles the response to the Create request. The method always
@@ -233,8 +233,7 @@ func (client FileSharesClient) DeletePreparer(ctx context.Context, resourceGroup
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client FileSharesClient) DeleteSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// DeleteResponder handles the response to the Delete request. The method always
@@ -258,7 +257,8 @@ func (client FileSharesClient) DeleteResponder(resp *http.Response) (result auto
// shareName - the name of the file share within the specified storage account. File share names must be
// between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-)
// character must be immediately preceded and followed by a letter or number.
-func (client FileSharesClient) Get(ctx context.Context, resourceGroupName string, accountName string, shareName string) (result FileShare, err error) {
+// expand - optional, used to expand the properties within share's properties.
+func (client FileSharesClient) Get(ctx context.Context, resourceGroupName string, accountName string, shareName string, expand GetShareExpand) (result FileShare, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/FileSharesClient.Get")
defer func() {
@@ -285,7 +285,7 @@ func (client FileSharesClient) Get(ctx context.Context, resourceGroupName string
return result, validation.NewError("storage.FileSharesClient", "Get", err.Error())
}
- req, err := client.GetPreparer(ctx, resourceGroupName, accountName, shareName)
+ req, err := client.GetPreparer(ctx, resourceGroupName, accountName, shareName, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "storage.FileSharesClient", "Get", nil, "Failure preparing request")
return
@@ -307,7 +307,7 @@ func (client FileSharesClient) Get(ctx context.Context, resourceGroupName string
}
// GetPreparer prepares the Get request.
-func (client FileSharesClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, shareName string) (*http.Request, error) {
+func (client FileSharesClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, shareName string, expand GetShareExpand) (*http.Request, error) {
pathParameters := map[string]interface{}{
"accountName": autorest.Encode("path", accountName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
@@ -319,6 +319,9 @@ func (client FileSharesClient) GetPreparer(ctx context.Context, resourceGroupNam
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
+ if len(string(expand)) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
preparer := autorest.CreatePreparer(
autorest.AsGet(),
@@ -331,8 +334,7 @@ func (client FileSharesClient) GetPreparer(ctx context.Context, resourceGroupNam
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client FileSharesClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -356,7 +358,8 @@ func (client FileSharesClient) GetResponder(resp *http.Response) (result FileSha
// must be between 3 and 24 characters in length and use numbers and lower-case letters only.
// maxpagesize - optional. Specified maximum number of shares that can be included in the list.
// filter - optional. When specified, only share names starting with the filter will be listed.
-func (client FileSharesClient) List(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string) (result FileShareItemsPage, err error) {
+// expand - optional, used to expand the properties within share's properties.
+func (client FileSharesClient) List(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string, expand ListSharesExpand) (result FileShareItemsPage, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/FileSharesClient.List")
defer func() {
@@ -381,7 +384,7 @@ func (client FileSharesClient) List(ctx context.Context, resourceGroupName strin
}
result.fn = client.listNextResults
- req, err := client.ListPreparer(ctx, resourceGroupName, accountName, maxpagesize, filter)
+ req, err := client.ListPreparer(ctx, resourceGroupName, accountName, maxpagesize, filter, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "storage.FileSharesClient", "List", nil, "Failure preparing request")
return
@@ -403,7 +406,7 @@ func (client FileSharesClient) List(ctx context.Context, resourceGroupName strin
}
// ListPreparer prepares the List request.
-func (client FileSharesClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string) (*http.Request, error) {
+func (client FileSharesClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string, expand ListSharesExpand) (*http.Request, error) {
pathParameters := map[string]interface{}{
"accountName": autorest.Encode("path", accountName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
@@ -420,6 +423,9 @@ func (client FileSharesClient) ListPreparer(ctx context.Context, resourceGroupNa
if len(filter) > 0 {
queryParameters["$filter"] = autorest.Encode("query", filter)
}
+ if len(string(expand)) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
preparer := autorest.CreatePreparer(
autorest.AsGet(),
@@ -432,8 +438,7 @@ func (client FileSharesClient) ListPreparer(ctx context.Context, resourceGroupNa
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client FileSharesClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
@@ -471,7 +476,7 @@ func (client FileSharesClient) listNextResults(ctx context.Context, lastResults
}
// ListComplete enumerates all values, automatically crossing page boundaries as required.
-func (client FileSharesClient) ListComplete(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string) (result FileShareItemsIterator, err error) {
+func (client FileSharesClient) ListComplete(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string, expand ListSharesExpand) (result FileShareItemsIterator, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/FileSharesClient.List")
defer func() {
@@ -482,7 +487,109 @@ func (client FileSharesClient) ListComplete(ctx context.Context, resourceGroupNa
tracing.EndSpan(ctx, sc, err)
}()
}
- result.page, err = client.List(ctx, resourceGroupName, accountName, maxpagesize, filter)
+ result.page, err = client.List(ctx, resourceGroupName, accountName, maxpagesize, filter, expand)
+ return
+}
+
+// Restore restore a file share within a valid retention days if share soft delete is enabled
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - the name of the storage account within the specified resource group. Storage account names
+// must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+// shareName - the name of the file share within the specified storage account. File share names must be
+// between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-)
+// character must be immediately preceded and followed by a letter or number.
+func (client FileSharesClient) Restore(ctx context.Context, resourceGroupName string, accountName string, shareName string, deletedShare DeletedShare) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FileSharesClient.Restore")
+ 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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: shareName,
+ Constraints: []validation.Constraint{{Target: "shareName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "shareName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: deletedShare,
+ Constraints: []validation.Constraint{{Target: "deletedShare.DeletedShareName", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "deletedShare.DeletedShareVersion", Name: validation.Null, Rule: true, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.FileSharesClient", "Restore", err.Error())
+ }
+
+ req, err := client.RestorePreparer(ctx, resourceGroupName, accountName, shareName, deletedShare)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.FileSharesClient", "Restore", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.RestoreSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "storage.FileSharesClient", "Restore", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.RestoreResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.FileSharesClient", "Restore", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// RestorePreparer prepares the Restore request.
+func (client FileSharesClient) RestorePreparer(ctx context.Context, resourceGroupName string, accountName string, shareName string, deletedShare DeletedShare) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "shareName": autorest.Encode("path", shareName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}/restore", pathParameters),
+ autorest.WithJSON(deletedShare),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// RestoreSender sends the Restore request. The method will close the
+// http.Response Body if it receives an error.
+func (client FileSharesClient) RestoreSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// RestoreResponder handles the response to the Restore request. The method always
+// closes the http.Response Body.
+func (client FileSharesClient) RestoreResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByClosing())
+ result.Response = resp
return
}
@@ -572,8 +679,7 @@ func (client FileSharesClient) UpdatePreparer(ctx context.Context, resourceGroup
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client FileSharesClient) UpdateSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// UpdateResponder handles the response to the Update request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/managementpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/managementpolicies.go
index c91d84c20..bce44a997 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/managementpolicies.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/managementpolicies.go
@@ -36,7 +36,9 @@ func NewManagementPoliciesClient(subscriptionID string) ManagementPoliciesClient
return NewManagementPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewManagementPoliciesClientWithBaseURI creates an instance of the ManagementPoliciesClient client.
+// NewManagementPoliciesClientWithBaseURI creates an instance of the ManagementPoliciesClient 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 NewManagementPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ManagementPoliciesClient {
return ManagementPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -125,8 +127,7 @@ func (client ManagementPoliciesClient) CreateOrUpdatePreparer(ctx context.Contex
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ManagementPoliciesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
@@ -218,8 +219,7 @@ func (client ManagementPoliciesClient) DeletePreparer(ctx context.Context, resou
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ManagementPoliciesClient) DeleteSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// DeleteResponder handles the response to the Delete request. The method always
@@ -310,8 +310,7 @@ func (client ManagementPoliciesClient) GetPreparer(ctx context.Context, resource
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client ManagementPoliciesClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/models.go
index 7a0a714f7..57db327f8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/models.go
@@ -50,13 +50,15 @@ func PossibleAccessTierValues() []AccessTier {
type AccountExpand string
const (
+ // AccountExpandBlobRestoreStatus ...
+ AccountExpandBlobRestoreStatus AccountExpand = "blobRestoreStatus"
// AccountExpandGeoReplicationStats ...
AccountExpandGeoReplicationStats AccountExpand = "geoReplicationStats"
)
// PossibleAccountExpandValues returns an array of possible values for the AccountExpand const type.
func PossibleAccountExpandValues() []AccountExpand {
- return []AccountExpand{AccountExpandGeoReplicationStats}
+ return []AccountExpand{AccountExpandBlobRestoreStatus, AccountExpandGeoReplicationStats}
}
// AccountStatus enumerates the values for account status.
@@ -108,6 +110,23 @@ func PossibleAction1Values() []Action1 {
return []Action1{Acquire, Break, Change, Release, Renew}
}
+// BlobRestoreProgressStatus enumerates the values for blob restore progress status.
+type BlobRestoreProgressStatus string
+
+const (
+ // Complete ...
+ Complete BlobRestoreProgressStatus = "Complete"
+ // Failed ...
+ Failed BlobRestoreProgressStatus = "Failed"
+ // InProgress ...
+ InProgress BlobRestoreProgressStatus = "InProgress"
+)
+
+// PossibleBlobRestoreProgressStatusValues returns an array of possible values for the BlobRestoreProgressStatus const type.
+func PossibleBlobRestoreProgressStatusValues() []BlobRestoreProgressStatus {
+ return []BlobRestoreProgressStatus{Complete, Failed, InProgress}
+}
+
// Bypass enumerates the values for bypass.
type Bypass string
@@ -159,6 +178,51 @@ func PossibleDirectoryServiceOptionsValues() []DirectoryServiceOptions {
return []DirectoryServiceOptions{DirectoryServiceOptionsAADDS, DirectoryServiceOptionsAD, DirectoryServiceOptionsNone}
}
+// EnabledProtocols enumerates the values for enabled protocols.
+type EnabledProtocols string
+
+const (
+ // NFS ...
+ NFS EnabledProtocols = "NFS"
+ // SMB ...
+ SMB EnabledProtocols = "SMB"
+)
+
+// PossibleEnabledProtocolsValues returns an array of possible values for the EnabledProtocols const type.
+func PossibleEnabledProtocolsValues() []EnabledProtocols {
+ return []EnabledProtocols{NFS, SMB}
+}
+
+// EncryptionScopeSource enumerates the values for encryption scope source.
+type EncryptionScopeSource string
+
+const (
+ // MicrosoftKeyVault ...
+ MicrosoftKeyVault EncryptionScopeSource = "Microsoft.KeyVault"
+ // MicrosoftStorage ...
+ MicrosoftStorage EncryptionScopeSource = "Microsoft.Storage"
+)
+
+// PossibleEncryptionScopeSourceValues returns an array of possible values for the EncryptionScopeSource const type.
+func PossibleEncryptionScopeSourceValues() []EncryptionScopeSource {
+ return []EncryptionScopeSource{MicrosoftKeyVault, MicrosoftStorage}
+}
+
+// EncryptionScopeState enumerates the values for encryption scope state.
+type EncryptionScopeState string
+
+const (
+ // Disabled ...
+ Disabled EncryptionScopeState = "Disabled"
+ // Enabled ...
+ Enabled EncryptionScopeState = "Enabled"
+)
+
+// PossibleEncryptionScopeStateValues returns an array of possible values for the EncryptionScopeState const type.
+func PossibleEncryptionScopeStateValues() []EncryptionScopeState {
+ return []EncryptionScopeState{Disabled, Enabled}
+}
+
// GeoReplicationStatus enumerates the values for geo replication status.
type GeoReplicationStatus string
@@ -176,6 +240,19 @@ func PossibleGeoReplicationStatusValues() []GeoReplicationStatus {
return []GeoReplicationStatus{GeoReplicationStatusBootstrap, GeoReplicationStatusLive, GeoReplicationStatusUnavailable}
}
+// GetShareExpand enumerates the values for get share expand.
+type GetShareExpand string
+
+const (
+ // Stats ...
+ Stats GetShareExpand = "stats"
+)
+
+// PossibleGetShareExpandValues returns an array of possible values for the GetShareExpand const type.
+func PossibleGetShareExpandValues() []GetShareExpand {
+ return []GetShareExpand{Stats}
+}
+
// HTTPProtocol enumerates the values for http protocol.
type HTTPProtocol string
@@ -242,15 +319,30 @@ func PossibleKeyPermissionValues() []KeyPermission {
type KeySource string
const (
- // MicrosoftKeyvault ...
- MicrosoftKeyvault KeySource = "Microsoft.Keyvault"
- // MicrosoftStorage ...
- MicrosoftStorage KeySource = "Microsoft.Storage"
+ // KeySourceMicrosoftKeyvault ...
+ KeySourceMicrosoftKeyvault KeySource = "Microsoft.Keyvault"
+ // KeySourceMicrosoftStorage ...
+ KeySourceMicrosoftStorage KeySource = "Microsoft.Storage"
)
// PossibleKeySourceValues returns an array of possible values for the KeySource const type.
func PossibleKeySourceValues() []KeySource {
- return []KeySource{MicrosoftKeyvault, MicrosoftStorage}
+ return []KeySource{KeySourceMicrosoftKeyvault, KeySourceMicrosoftStorage}
+}
+
+// KeyType enumerates the values for key type.
+type KeyType string
+
+const (
+ // KeyTypeAccount ...
+ KeyTypeAccount KeyType = "Account"
+ // KeyTypeService ...
+ KeyTypeService KeyType = "Service"
+)
+
+// PossibleKeyTypeValues returns an array of possible values for the KeyType const type.
+func PossibleKeyTypeValues() []KeyType {
+ return []KeyType{KeyTypeAccount, KeyTypeService}
}
// Kind enumerates the values for kind.
@@ -278,15 +370,15 @@ func PossibleKindValues() []Kind {
type LargeFileSharesState string
const (
- // Disabled ...
- Disabled LargeFileSharesState = "Disabled"
- // Enabled ...
- Enabled LargeFileSharesState = "Enabled"
+ // LargeFileSharesStateDisabled ...
+ LargeFileSharesStateDisabled LargeFileSharesState = "Disabled"
+ // LargeFileSharesStateEnabled ...
+ LargeFileSharesStateEnabled LargeFileSharesState = "Enabled"
)
// PossibleLargeFileSharesStateValues returns an array of possible values for the LargeFileSharesState const type.
func PossibleLargeFileSharesStateValues() []LargeFileSharesState {
- return []LargeFileSharesState{Disabled, Enabled}
+ return []LargeFileSharesState{LargeFileSharesStateDisabled, LargeFileSharesStateEnabled}
}
// LeaseDuration enumerates the values for lease duration.
@@ -340,6 +432,19 @@ func PossibleLeaseStatusValues() []LeaseStatus {
return []LeaseStatus{LeaseStatusLocked, LeaseStatusUnlocked}
}
+// ListContainersInclude enumerates the values for list containers include.
+type ListContainersInclude string
+
+const (
+ // Deleted ...
+ Deleted ListContainersInclude = "deleted"
+)
+
+// PossibleListContainersIncludeValues returns an array of possible values for the ListContainersInclude const type.
+func PossibleListContainersIncludeValues() []ListContainersInclude {
+ return []ListContainersInclude{Deleted}
+}
+
// ListKeyExpand enumerates the values for list key expand.
type ListKeyExpand string
@@ -353,6 +458,19 @@ func PossibleListKeyExpandValues() []ListKeyExpand {
return []ListKeyExpand{Kerb}
}
+// ListSharesExpand enumerates the values for list shares expand.
+type ListSharesExpand string
+
+const (
+ // ListSharesExpandDeleted ...
+ ListSharesExpandDeleted ListSharesExpand = "deleted"
+)
+
+// PossibleListSharesExpandValues returns an array of possible values for the ListSharesExpand const type.
+func PossibleListSharesExpandValues() []ListSharesExpand {
+ return []ListSharesExpand{ListSharesExpandDeleted}
+}
+
// Permissions enumerates the values for permissions.
type Permissions string
@@ -385,19 +503,19 @@ func PossiblePermissionsValues() []Permissions {
type PrivateEndpointConnectionProvisioningState string
const (
- // Creating ...
- Creating PrivateEndpointConnectionProvisioningState = "Creating"
- // Deleting ...
- Deleting PrivateEndpointConnectionProvisioningState = "Deleting"
- // Failed ...
- Failed PrivateEndpointConnectionProvisioningState = "Failed"
- // Succeeded ...
- Succeeded PrivateEndpointConnectionProvisioningState = "Succeeded"
+ // PrivateEndpointConnectionProvisioningStateCreating ...
+ PrivateEndpointConnectionProvisioningStateCreating PrivateEndpointConnectionProvisioningState = "Creating"
+ // PrivateEndpointConnectionProvisioningStateDeleting ...
+ PrivateEndpointConnectionProvisioningStateDeleting PrivateEndpointConnectionProvisioningState = "Deleting"
+ // PrivateEndpointConnectionProvisioningStateFailed ...
+ PrivateEndpointConnectionProvisioningStateFailed PrivateEndpointConnectionProvisioningState = "Failed"
+ // PrivateEndpointConnectionProvisioningStateSucceeded ...
+ PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded"
)
// PossiblePrivateEndpointConnectionProvisioningStateValues returns an array of possible values for the PrivateEndpointConnectionProvisioningState const type.
func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState {
- return []PrivateEndpointConnectionProvisioningState{Creating, Deleting, Failed, Succeeded}
+ return []PrivateEndpointConnectionProvisioningState{PrivateEndpointConnectionProvisioningStateCreating, PrivateEndpointConnectionProvisioningStateDeleting, PrivateEndpointConnectionProvisioningStateFailed, PrivateEndpointConnectionProvisioningStateSucceeded}
}
// PrivateEndpointServiceConnectionStatus enumerates the values for private endpoint service connection status.
@@ -421,17 +539,17 @@ func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointSer
type ProvisioningState string
const (
- // ProvisioningStateCreating ...
- ProvisioningStateCreating ProvisioningState = "Creating"
- // ProvisioningStateResolvingDNS ...
- ProvisioningStateResolvingDNS ProvisioningState = "ResolvingDNS"
- // ProvisioningStateSucceeded ...
- ProvisioningStateSucceeded ProvisioningState = "Succeeded"
+ // Creating ...
+ Creating ProvisioningState = "Creating"
+ // ResolvingDNS ...
+ ResolvingDNS ProvisioningState = "ResolvingDNS"
+ // Succeeded ...
+ Succeeded ProvisioningState = "Succeeded"
)
// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type.
func PossibleProvisioningStateValues() []ProvisioningState {
- return []ProvisioningState{ProvisioningStateCreating, ProvisioningStateResolvingDNS, ProvisioningStateSucceeded}
+ return []ProvisioningState{Creating, ResolvingDNS, Succeeded}
}
// PublicAccess enumerates the values for public access.
@@ -481,6 +599,38 @@ func PossibleReasonCodeValues() []ReasonCode {
return []ReasonCode{NotAvailableForSubscription, QuotaID}
}
+// RootSquashType enumerates the values for root squash type.
+type RootSquashType string
+
+const (
+ // AllSquash ...
+ AllSquash RootSquashType = "AllSquash"
+ // NoRootSquash ...
+ NoRootSquash RootSquashType = "NoRootSquash"
+ // RootSquash ...
+ RootSquash RootSquashType = "RootSquash"
+)
+
+// PossibleRootSquashTypeValues returns an array of possible values for the RootSquashType const type.
+func PossibleRootSquashTypeValues() []RootSquashType {
+ return []RootSquashType{AllSquash, NoRootSquash, RootSquash}
+}
+
+// RoutingChoice enumerates the values for routing choice.
+type RoutingChoice string
+
+const (
+ // InternetRouting ...
+ InternetRouting RoutingChoice = "InternetRouting"
+ // MicrosoftRouting ...
+ MicrosoftRouting RoutingChoice = "MicrosoftRouting"
+)
+
+// PossibleRoutingChoiceValues returns an array of possible values for the RoutingChoice const type.
+func PossibleRoutingChoiceValues() []RoutingChoice {
+ return []RoutingChoice{InternetRouting, MicrosoftRouting}
+}
+
// Services enumerates the values for services.
type Services string
@@ -500,6 +650,25 @@ func PossibleServicesValues() []Services {
return []Services{B, F, Q, T}
}
+// ShareAccessTier enumerates the values for share access tier.
+type ShareAccessTier string
+
+const (
+ // ShareAccessTierCool ...
+ ShareAccessTierCool ShareAccessTier = "Cool"
+ // ShareAccessTierHot ...
+ ShareAccessTierHot ShareAccessTier = "Hot"
+ // ShareAccessTierPremium ...
+ ShareAccessTierPremium ShareAccessTier = "Premium"
+ // ShareAccessTierTransactionOptimized ...
+ ShareAccessTierTransactionOptimized ShareAccessTier = "TransactionOptimized"
+)
+
+// PossibleShareAccessTierValues returns an array of possible values for the ShareAccessTier const type.
+func PossibleShareAccessTierValues() []ShareAccessTier {
+ return []ShareAccessTier{ShareAccessTierCool, ShareAccessTierHot, ShareAccessTierPremium, ShareAccessTierTransactionOptimized}
+}
+
// SignedResource enumerates the values for signed resource.
type SignedResource string
@@ -877,6 +1046,19 @@ func (acp *AccountCreateParameters) UnmarshalJSON(body []byte) error {
return nil
}
+// AccountInternetEndpoints the URIs that are used to perform a retrieval of a public blob, file, web or
+// dfs object via a internet routing endpoint.
+type AccountInternetEndpoints struct {
+ // Blob - READ-ONLY; Gets the blob endpoint.
+ Blob *string `json:"blob,omitempty"`
+ // File - READ-ONLY; Gets the file endpoint.
+ File *string `json:"file,omitempty"`
+ // Web - READ-ONLY; Gets the web endpoint.
+ Web *string `json:"web,omitempty"`
+ // Dfs - READ-ONLY; Gets the dfs endpoint.
+ Dfs *string `json:"dfs,omitempty"`
+}
+
// AccountKey an access key for the storage account.
type AccountKey struct {
// KeyName - READ-ONLY; Name of the key.
@@ -1040,9 +1222,26 @@ func NewAccountListResultPage(getNextPage func(context.Context, AccountListResul
return AccountListResultPage{fn: getNextPage}
}
+// AccountMicrosoftEndpoints the URIs that are used to perform a retrieval of a public blob, queue, table,
+// web or dfs object via a microsoft routing endpoint.
+type AccountMicrosoftEndpoints struct {
+ // Blob - READ-ONLY; Gets the blob endpoint.
+ Blob *string `json:"blob,omitempty"`
+ // Queue - READ-ONLY; Gets the queue endpoint.
+ Queue *string `json:"queue,omitempty"`
+ // Table - READ-ONLY; Gets the table endpoint.
+ Table *string `json:"table,omitempty"`
+ // File - READ-ONLY; Gets the file endpoint.
+ File *string `json:"file,omitempty"`
+ // Web - READ-ONLY; Gets the web endpoint.
+ Web *string `json:"web,omitempty"`
+ // Dfs - READ-ONLY; Gets the dfs endpoint.
+ Dfs *string `json:"dfs,omitempty"`
+}
+
// AccountProperties properties of the storage account.
type AccountProperties struct {
- // ProvisioningState - READ-ONLY; Gets the status of the storage account at the time the operation was called. Possible values include: 'ProvisioningStateCreating', 'ProvisioningStateResolvingDNS', 'ProvisioningStateSucceeded'
+ // ProvisioningState - READ-ONLY; Gets the status of the storage account at the time the operation was called. Possible values include: 'Creating', 'ResolvingDNS', 'Succeeded'
ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
// PrimaryEndpoints - READ-ONLY; Gets the URLs that are used to perform a retrieval of a public blob, queue, or table object. Note that Standard_ZRS and Premium_LRS accounts only return the blob endpoint.
PrimaryEndpoints *Endpoints `json:"primaryEndpoints,omitempty"`
@@ -1078,10 +1277,14 @@ type AccountProperties struct {
GeoReplicationStats *GeoReplicationStats `json:"geoReplicationStats,omitempty"`
// FailoverInProgress - READ-ONLY; If the failover is in progress, the value will be true, otherwise, it will be null.
FailoverInProgress *bool `json:"failoverInProgress,omitempty"`
- // LargeFileSharesState - Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'Disabled', 'Enabled'
+ // LargeFileSharesState - Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'LargeFileSharesStateDisabled', 'LargeFileSharesStateEnabled'
LargeFileSharesState LargeFileSharesState `json:"largeFileSharesState,omitempty"`
// PrivateEndpointConnections - READ-ONLY; List of private endpoint connection associated with the specified storage account
PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"`
+ // RoutingPreference - Maintains information about the network routing choice opted by the user for data transfer
+ RoutingPreference *RoutingPreference `json:"routingPreference,omitempty"`
+ // BlobRestoreStatus - READ-ONLY; Blob restore status
+ BlobRestoreStatus *BlobRestoreStatus `json:"blobRestoreStatus,omitempty"`
}
// AccountPropertiesCreateParameters the parameters used to create the storage account.
@@ -1100,8 +1303,10 @@ type AccountPropertiesCreateParameters struct {
EnableHTTPSTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"`
// IsHnsEnabled - Account HierarchicalNamespace enabled if sets to true.
IsHnsEnabled *bool `json:"isHnsEnabled,omitempty"`
- // LargeFileSharesState - Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'Disabled', 'Enabled'
+ // LargeFileSharesState - Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'LargeFileSharesStateDisabled', 'LargeFileSharesStateEnabled'
LargeFileSharesState LargeFileSharesState `json:"largeFileSharesState,omitempty"`
+ // RoutingPreference - Maintains information about the network routing choice opted by the user for data transfer
+ RoutingPreference *RoutingPreference `json:"routingPreference,omitempty"`
}
// AccountPropertiesUpdateParameters the parameters used when updating a storage account.
@@ -1118,8 +1323,10 @@ type AccountPropertiesUpdateParameters struct {
EnableHTTPSTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"`
// NetworkRuleSet - Network rule set
NetworkRuleSet *NetworkRuleSet `json:"networkAcls,omitempty"`
- // LargeFileSharesState - Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'Disabled', 'Enabled'
+ // LargeFileSharesState - Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'LargeFileSharesStateDisabled', 'LargeFileSharesStateEnabled'
LargeFileSharesState LargeFileSharesState `json:"largeFileSharesState,omitempty"`
+ // RoutingPreference - Maintains information about the network routing choice opted by the user for data transfer
+ RoutingPreference *RoutingPreference `json:"routingPreference,omitempty"`
}
// AccountRegenerateKeyParameters the parameters used to regenerate the storage account key.
@@ -1200,6 +1407,35 @@ func (future *AccountsFailoverFuture) Result(client AccountsClient) (ar autorest
return
}
+// AccountsRestoreBlobRangesFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type AccountsRestoreBlobRangesFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *AccountsRestoreBlobRangesFuture) Result(client AccountsClient) (brs BlobRestoreStatus, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.AccountsRestoreBlobRangesFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("storage.AccountsRestoreBlobRangesFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if brs.Response.Response, err = future.GetResult(sender); err == nil && brs.Response.Response.StatusCode != http.StatusNoContent {
+ brs, err = client.RestoreBlobRangesResponder(brs.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.AccountsRestoreBlobRangesFuture", "Result", brs.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// AccountUpdateParameters the parameters that can be provided when updating the storage account
// properties.
type AccountUpdateParameters struct {
@@ -1416,6 +1652,35 @@ func (bc *BlobContainer) UnmarshalJSON(body []byte) error {
return nil
}
+// BlobRestoreParameters blob restore parameters
+type BlobRestoreParameters struct {
+ // TimeToRestore - Restore blob to the specified time.
+ TimeToRestore *date.Time `json:"timeToRestore,omitempty"`
+ // BlobRanges - Blob ranges to restore.
+ BlobRanges *[]BlobRestoreRange `json:"blobRanges,omitempty"`
+}
+
+// BlobRestoreRange blob range
+type BlobRestoreRange struct {
+ // StartRange - Blob start range. This is inclusive. Empty means account start.
+ StartRange *string `json:"startRange,omitempty"`
+ // EndRange - Blob end range. This is exclusive. Empty means account end.
+ EndRange *string `json:"endRange,omitempty"`
+}
+
+// BlobRestoreStatus blob restore status.
+type BlobRestoreStatus struct {
+ autorest.Response `json:"-"`
+ // Status - READ-ONLY; The status of blob restore progress. Possible values are: - InProgress: Indicates that blob restore is ongoing. - Complete: Indicates that blob restore has been completed successfully. - Failed: Indicates that blob restore is failed. Possible values include: 'InProgress', 'Complete', 'Failed'
+ Status BlobRestoreProgressStatus `json:"status,omitempty"`
+ // FailureReason - READ-ONLY; Failure reason when blob restore is failed.
+ FailureReason *string `json:"failureReason,omitempty"`
+ // RestoreID - READ-ONLY; Id for tracking blob restore request.
+ RestoreID *string `json:"restoreId,omitempty"`
+ // Parameters - READ-ONLY; Blob restore request parameters.
+ Parameters *BlobRestoreParameters `json:"parameters,omitempty"`
+}
+
// BlobServiceItems ...
type BlobServiceItems struct {
autorest.Response `json:"-"`
@@ -1428,6 +1693,8 @@ type BlobServiceProperties struct {
autorest.Response `json:"-"`
// BlobServicePropertiesProperties - The properties of a storage account’s Blob service.
*BlobServicePropertiesProperties `json:"properties,omitempty"`
+ // Sku - READ-ONLY; Sku name and tier.
+ Sku *Sku `json:"sku,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
@@ -1463,6 +1730,15 @@ func (bsp *BlobServiceProperties) UnmarshalJSON(body []byte) error {
}
bsp.BlobServicePropertiesProperties = &blobServiceProperties
}
+ case "sku":
+ if v != nil {
+ var sku Sku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ bsp.Sku = &sku
+ }
case "id":
if v != nil {
var ID string
@@ -1502,12 +1778,18 @@ type BlobServicePropertiesProperties struct {
Cors *CorsRules `json:"cors,omitempty"`
// DefaultServiceVersion - DefaultServiceVersion indicates the default version to use for requests to the Blob service if an incoming request’s version is not specified. Possible values include version 2008-10-27 and all more recent versions.
DefaultServiceVersion *string `json:"defaultServiceVersion,omitempty"`
- // DeleteRetentionPolicy - The blob service properties for soft delete.
+ // DeleteRetentionPolicy - The blob service properties for blob soft delete.
DeleteRetentionPolicy *DeleteRetentionPolicy `json:"deleteRetentionPolicy,omitempty"`
- // AutomaticSnapshotPolicyEnabled - Automatic Snapshot is enabled if set to true.
+ // IsVersioningEnabled - Versioning is enabled if set to true.
+ IsVersioningEnabled *bool `json:"isVersioningEnabled,omitempty"`
+ // AutomaticSnapshotPolicyEnabled - Deprecated in favor of isVersioningEnabled property.
AutomaticSnapshotPolicyEnabled *bool `json:"automaticSnapshotPolicyEnabled,omitempty"`
// ChangeFeed - The blob service properties for change feed events.
ChangeFeed *ChangeFeed `json:"changeFeed,omitempty"`
+ // RestorePolicy - The blob service properties for blob restore policy.
+ RestorePolicy *RestorePolicyProperties `json:"restorePolicy,omitempty"`
+ // ContainerDeleteRetentionPolicy - The blob service properties for container soft delete.
+ ContainerDeleteRetentionPolicy *DeleteRetentionPolicy `json:"containerDeleteRetentionPolicy,omitempty"`
}
// ChangeFeed the blob service properties for change feed events.
@@ -1546,6 +1828,18 @@ type CloudErrorBody struct {
// ContainerProperties the properties of a container.
type ContainerProperties struct {
+ // Version - READ-ONLY; The version of the deleted blob container.
+ Version *string `json:"version,omitempty"`
+ // Deleted - READ-ONLY; Indicates whether the blob container was deleted.
+ Deleted *bool `json:"deleted,omitempty"`
+ // DeletedTime - READ-ONLY; Blob container deletion time.
+ DeletedTime *date.Time `json:"deletedTime,omitempty"`
+ // RemainingRetentionDays - READ-ONLY; Remaining retention days for soft deleted blob container.
+ RemainingRetentionDays *int32 `json:"remainingRetentionDays,omitempty"`
+ // DefaultEncryptionScope - Default the container to use specified encryption scope for all writes.
+ DefaultEncryptionScope *string `json:"defaultEncryptionScope,omitempty"`
+ // DenyEncryptionScopeOverride - Block override of encryption scope from the container default.
+ DenyEncryptionScopeOverride *bool `json:"denyEncryptionScopeOverride,omitempty"`
// PublicAccess - Specifies whether data in the container may be accessed publicly and the level of access. Possible values include: 'PublicAccessContainer', 'PublicAccessBlob', 'PublicAccessNone'
PublicAccess PublicAccess `json:"publicAccess,omitempty"`
// LastModifiedTime - READ-ONLY; Returns the date and time the container was last modified.
@@ -1571,6 +1865,12 @@ type ContainerProperties struct {
// MarshalJSON is the custom marshaler for ContainerProperties.
func (cp ContainerProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
+ if cp.DefaultEncryptionScope != nil {
+ objectMap["defaultEncryptionScope"] = cp.DefaultEncryptionScope
+ }
+ if cp.DenyEncryptionScopeOverride != nil {
+ objectMap["denyEncryptionScopeOverride"] = cp.DenyEncryptionScopeOverride
+ }
if cp.PublicAccess != "" {
objectMap["publicAccess"] = cp.PublicAccess
}
@@ -1620,11 +1920,19 @@ type DateAfterModification struct {
DaysAfterModificationGreaterThan *float64 `json:"daysAfterModificationGreaterThan,omitempty"`
}
-// DeleteRetentionPolicy the blob service properties for soft delete.
+// DeletedShare the deleted share to be restored.
+type DeletedShare struct {
+ // DeletedShareName - Required. Identify the name of the deleted share that will be restored.
+ DeletedShareName *string `json:"deletedShareName,omitempty"`
+ // DeletedShareVersion - Required. Identify the version of the deleted share that will be restored.
+ DeletedShareVersion *string `json:"deletedShareVersion,omitempty"`
+}
+
+// DeleteRetentionPolicy the service properties for soft delete.
type DeleteRetentionPolicy struct {
- // Enabled - Indicates whether DeleteRetentionPolicy is enabled for the Blob service.
+ // Enabled - Indicates whether DeleteRetentionPolicy is enabled.
Enabled *bool `json:"enabled,omitempty"`
- // Days - Indicates the number of days that the deleted blob should be retained. The minimum specified value can be 1 and the maximum value can be 365.
+ // Days - Indicates the number of days that the deleted item should be retained. The minimum specified value can be 1 and the maximum value can be 365.
Days *int32 `json:"days,omitempty"`
}
@@ -1640,69 +1948,19 @@ type Dimension struct {
type Encryption struct {
// Services - List of services which support encryption.
Services *EncryptionServices `json:"services,omitempty"`
- // KeySource - The encryption keySource (provider). Possible values (case-insensitive): Microsoft.Storage, Microsoft.Keyvault. Possible values include: 'MicrosoftStorage', 'MicrosoftKeyvault'
+ // KeySource - The encryption keySource (provider). Possible values (case-insensitive): Microsoft.Storage, Microsoft.Keyvault. Possible values include: 'KeySourceMicrosoftStorage', 'KeySourceMicrosoftKeyvault'
KeySource KeySource `json:"keySource,omitempty"`
+ // RequireInfrastructureEncryption - A boolean indicating whether or not the service applies a secondary layer of encryption with platform managed keys for data at rest.
+ RequireInfrastructureEncryption *bool `json:"requireInfrastructureEncryption,omitempty"`
// KeyVaultProperties - Properties provided by key vault.
KeyVaultProperties *KeyVaultProperties `json:"keyvaultproperties,omitempty"`
}
-// EncryptionService a service that allows server-side encryption to be used.
-type EncryptionService struct {
- // Enabled - A boolean indicating whether or not the service encrypts the data as it is stored.
- Enabled *bool `json:"enabled,omitempty"`
- // LastEnabledTime - READ-ONLY; Gets a rough estimate of the date/time when the encryption was last enabled by the user. Only returned when encryption is enabled. There might be some unencrypted blobs which were written after this time, as it is just a rough estimate.
- LastEnabledTime *date.Time `json:"lastEnabledTime,omitempty"`
-}
-
-// EncryptionServices a list of services that support encryption.
-type EncryptionServices struct {
- // Blob - The encryption function of the blob storage service.
- Blob *EncryptionService `json:"blob,omitempty"`
- // File - The encryption function of the file storage service.
- File *EncryptionService `json:"file,omitempty"`
- // Table - READ-ONLY; The encryption function of the table storage service.
- Table *EncryptionService `json:"table,omitempty"`
- // Queue - READ-ONLY; The encryption function of the queue storage service.
- Queue *EncryptionService `json:"queue,omitempty"`
-}
-
-// Endpoints the URIs that are used to perform a retrieval of a public blob, queue, table, web or dfs
-// object.
-type Endpoints struct {
- // Blob - READ-ONLY; Gets the blob endpoint.
- Blob *string `json:"blob,omitempty"`
- // Queue - READ-ONLY; Gets the queue endpoint.
- Queue *string `json:"queue,omitempty"`
- // Table - READ-ONLY; Gets the table endpoint.
- Table *string `json:"table,omitempty"`
- // File - READ-ONLY; Gets the file endpoint.
- File *string `json:"file,omitempty"`
- // Web - READ-ONLY; Gets the web endpoint.
- Web *string `json:"web,omitempty"`
- // Dfs - READ-ONLY; Gets the dfs endpoint.
- Dfs *string `json:"dfs,omitempty"`
-}
-
-// ErrorResponse an error response from the storage resource provider.
-type ErrorResponse 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"`
-}
-
-// FileServiceItems ...
-type FileServiceItems struct {
- autorest.Response `json:"-"`
- // Value - READ-ONLY; List of file services returned.
- Value *[]FileServiceProperties `json:"value,omitempty"`
-}
-
-// FileServiceProperties the properties of File services in storage account.
-type FileServiceProperties struct {
+// EncryptionScope the Encryption Scope resource.
+type EncryptionScope struct {
autorest.Response `json:"-"`
- // FileServicePropertiesProperties - The properties of File services in storage account.
- *FileServicePropertiesProperties `json:"properties,omitempty"`
+ // EncryptionScopeProperties - Properties of the encryption scope.
+ *EncryptionScopeProperties `json:"properties,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
@@ -1711,17 +1969,17 @@ type FileServiceProperties struct {
Type *string `json:"type,omitempty"`
}
-// MarshalJSON is the custom marshaler for FileServiceProperties.
-func (fsp FileServiceProperties) MarshalJSON() ([]byte, error) {
+// MarshalJSON is the custom marshaler for EncryptionScope.
+func (es EncryptionScope) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
- if fsp.FileServicePropertiesProperties != nil {
- objectMap["properties"] = fsp.FileServicePropertiesProperties
+ if es.EncryptionScopeProperties != nil {
+ objectMap["properties"] = es.EncryptionScopeProperties
}
return json.Marshal(objectMap)
}
-// UnmarshalJSON is the custom unmarshaler for FileServiceProperties struct.
-func (fsp *FileServiceProperties) UnmarshalJSON(body []byte) error {
+// UnmarshalJSON is the custom unmarshaler for EncryptionScope struct.
+func (es *EncryptionScope) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
@@ -1731,12 +1989,12 @@ func (fsp *FileServiceProperties) UnmarshalJSON(body []byte) error {
switch k {
case "properties":
if v != nil {
- var fileServiceProperties FileServicePropertiesProperties
- err = json.Unmarshal(*v, &fileServiceProperties)
+ var encryptionScopeProperties EncryptionScopeProperties
+ err = json.Unmarshal(*v, &encryptionScopeProperties)
if err != nil {
return err
}
- fsp.FileServicePropertiesProperties = &fileServiceProperties
+ es.EncryptionScopeProperties = &encryptionScopeProperties
}
case "id":
if v != nil {
@@ -1745,7 +2003,7 @@ func (fsp *FileServiceProperties) UnmarshalJSON(body []byte) error {
if err != nil {
return err
}
- fsp.ID = &ID
+ es.ID = &ID
}
case "name":
if v != nil {
@@ -1754,7 +2012,7 @@ func (fsp *FileServiceProperties) UnmarshalJSON(body []byte) error {
if err != nil {
return err
}
- fsp.Name = &name
+ es.Name = &name
}
case "type":
if v != nil {
@@ -1763,7 +2021,7 @@ func (fsp *FileServiceProperties) UnmarshalJSON(body []byte) error {
if err != nil {
return err
}
- fsp.Type = &typeVar
+ es.Type = &typeVar
}
}
}
@@ -1771,45 +2029,357 @@ func (fsp *FileServiceProperties) UnmarshalJSON(body []byte) error {
return nil
}
-// FileServicePropertiesProperties the properties of File services in storage account.
-type FileServicePropertiesProperties struct {
- // Cors - Specifies CORS rules for the File service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the File service.
- Cors *CorsRules `json:"cors,omitempty"`
+// EncryptionScopeKeyVaultProperties the key vault properties for the encryption scope. This is a required
+// field if encryption scope 'source' attribute is set to 'Microsoft.KeyVault'.
+type EncryptionScopeKeyVaultProperties struct {
+ // KeyURI - The object identifier for a key vault key object. When applied, the encryption scope will use the key referenced by the identifier to enable customer-managed key support on this encryption scope.
+ KeyURI *string `json:"keyUri,omitempty"`
}
-// FileShare properties of the file share, including Id, resource name, resource type, Etag.
-type FileShare struct {
+// EncryptionScopeListResult list of encryption scopes requested, and if paging is required, a URL to the
+// next page of encryption scopes.
+type EncryptionScopeListResult struct {
autorest.Response `json:"-"`
- // FileShareProperties - Properties of the file share.
- *FileShareProperties `json:"properties,omitempty"`
- // 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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
- Type *string `json:"type,omitempty"`
+ // Value - READ-ONLY; List of encryption scopes requested.
+ Value *[]EncryptionScope `json:"value,omitempty"`
+ // NextLink - READ-ONLY; Request URL that can be used to query next page of encryption scopes. Returned when total number of requested encryption scopes exceeds the maximum page size.
+ NextLink *string `json:"nextLink,omitempty"`
}
-// MarshalJSON is the custom marshaler for FileShare.
-func (fs FileShare) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if fs.FileShareProperties != nil {
- objectMap["properties"] = fs.FileShareProperties
- }
- return json.Marshal(objectMap)
+// EncryptionScopeListResultIterator provides access to a complete listing of EncryptionScope values.
+type EncryptionScopeListResultIterator struct {
+ i int
+ page EncryptionScopeListResultPage
}
-// UnmarshalJSON is the custom unmarshaler for FileShare struct.
-func (fs *FileShare) UnmarshalJSON(body []byte) error {
- var m map[string]*json.RawMessage
- err := json.Unmarshal(body, &m)
+// 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 *EncryptionScopeListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionScopeListResultIterator.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
}
- for k, v := range m {
- switch k {
+ 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 *EncryptionScopeListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter EncryptionScopeListResultIterator) 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 EncryptionScopeListResultIterator) Response() EncryptionScopeListResult {
+ 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 EncryptionScopeListResultIterator) Value() EncryptionScope {
+ if !iter.page.NotDone() {
+ return EncryptionScope{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the EncryptionScopeListResultIterator type.
+func NewEncryptionScopeListResultIterator(page EncryptionScopeListResultPage) EncryptionScopeListResultIterator {
+ return EncryptionScopeListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (eslr EncryptionScopeListResult) IsEmpty() bool {
+ return eslr.Value == nil || len(*eslr.Value) == 0
+}
+
+// encryptionScopeListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (eslr EncryptionScopeListResult) encryptionScopeListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if eslr.NextLink == nil || len(to.String(eslr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(eslr.NextLink)))
+}
+
+// EncryptionScopeListResultPage contains a page of EncryptionScope values.
+type EncryptionScopeListResultPage struct {
+ fn func(context.Context, EncryptionScopeListResult) (EncryptionScopeListResult, error)
+ eslr EncryptionScopeListResult
+}
+
+// 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 *EncryptionScopeListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionScopeListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.eslr)
+ if err != nil {
+ return err
+ }
+ page.eslr = next
+ 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 *EncryptionScopeListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page EncryptionScopeListResultPage) NotDone() bool {
+ return !page.eslr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page EncryptionScopeListResultPage) Response() EncryptionScopeListResult {
+ return page.eslr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page EncryptionScopeListResultPage) Values() []EncryptionScope {
+ if page.eslr.IsEmpty() {
+ return nil
+ }
+ return *page.eslr.Value
+}
+
+// Creates a new instance of the EncryptionScopeListResultPage type.
+func NewEncryptionScopeListResultPage(getNextPage func(context.Context, EncryptionScopeListResult) (EncryptionScopeListResult, error)) EncryptionScopeListResultPage {
+ return EncryptionScopeListResultPage{fn: getNextPage}
+}
+
+// EncryptionScopeProperties properties of the encryption scope.
+type EncryptionScopeProperties struct {
+ // Source - The provider for the encryption scope. Possible values (case-insensitive): Microsoft.Storage, Microsoft.KeyVault. Possible values include: 'MicrosoftStorage', 'MicrosoftKeyVault'
+ Source EncryptionScopeSource `json:"source,omitempty"`
+ // State - The state of the encryption scope. Possible values (case-insensitive): Enabled, Disabled. Possible values include: 'Enabled', 'Disabled'
+ State EncryptionScopeState `json:"state,omitempty"`
+ // CreationTime - READ-ONLY; Gets the creation date and time of the encryption scope in UTC.
+ CreationTime *date.Time `json:"creationTime,omitempty"`
+ // LastModifiedTime - READ-ONLY; Gets the last modification date and time of the encryption scope in UTC.
+ LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
+ // KeyVaultProperties - The key vault properties for the encryption scope. This is a required field if encryption scope 'source' attribute is set to 'Microsoft.KeyVault'.
+ KeyVaultProperties *EncryptionScopeKeyVaultProperties `json:"keyVaultProperties,omitempty"`
+}
+
+// EncryptionService a service that allows server-side encryption to be used.
+type EncryptionService struct {
+ // Enabled - A boolean indicating whether or not the service encrypts the data as it is stored.
+ Enabled *bool `json:"enabled,omitempty"`
+ // LastEnabledTime - READ-ONLY; Gets a rough estimate of the date/time when the encryption was last enabled by the user. Only returned when encryption is enabled. There might be some unencrypted blobs which were written after this time, as it is just a rough estimate.
+ LastEnabledTime *date.Time `json:"lastEnabledTime,omitempty"`
+ // KeyType - Encryption key type to be used for the encryption service. 'Account' key type implies that an account-scoped encryption key will be used. 'Service' key type implies that a default service key is used. Possible values include: 'KeyTypeService', 'KeyTypeAccount'
+ KeyType KeyType `json:"keyType,omitempty"`
+}
+
+// EncryptionServices a list of services that support encryption.
+type EncryptionServices struct {
+ // Blob - The encryption function of the blob storage service.
+ Blob *EncryptionService `json:"blob,omitempty"`
+ // File - The encryption function of the file storage service.
+ File *EncryptionService `json:"file,omitempty"`
+ // Table - The encryption function of the table storage service.
+ Table *EncryptionService `json:"table,omitempty"`
+ // Queue - The encryption function of the queue storage service.
+ Queue *EncryptionService `json:"queue,omitempty"`
+}
+
+// Endpoints the URIs that are used to perform a retrieval of a public blob, queue, table, web or dfs
+// object.
+type Endpoints struct {
+ // Blob - READ-ONLY; Gets the blob endpoint.
+ Blob *string `json:"blob,omitempty"`
+ // Queue - READ-ONLY; Gets the queue endpoint.
+ Queue *string `json:"queue,omitempty"`
+ // Table - READ-ONLY; Gets the table endpoint.
+ Table *string `json:"table,omitempty"`
+ // File - READ-ONLY; Gets the file endpoint.
+ File *string `json:"file,omitempty"`
+ // Web - READ-ONLY; Gets the web endpoint.
+ Web *string `json:"web,omitempty"`
+ // Dfs - READ-ONLY; Gets the dfs endpoint.
+ Dfs *string `json:"dfs,omitempty"`
+ // MicrosoftEndpoints - Gets the microsoft routing storage endpoints.
+ MicrosoftEndpoints *AccountMicrosoftEndpoints `json:"microsoftEndpoints,omitempty"`
+ // InternetEndpoints - Gets the internet routing storage endpoints
+ InternetEndpoints *AccountInternetEndpoints `json:"internetEndpoints,omitempty"`
+}
+
+// ErrorResponse an error response from the storage resource provider.
+type ErrorResponse 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"`
+}
+
+// FileServiceItems ...
+type FileServiceItems struct {
+ autorest.Response `json:"-"`
+ // Value - READ-ONLY; List of file services returned.
+ Value *[]FileServiceProperties `json:"value,omitempty"`
+}
+
+// FileServiceProperties the properties of File services in storage account.
+type FileServiceProperties struct {
+ autorest.Response `json:"-"`
+ // FileServicePropertiesProperties - The properties of File services in storage account.
+ *FileServicePropertiesProperties `json:"properties,omitempty"`
+ // Sku - READ-ONLY; Sku name and tier.
+ Sku *Sku `json:"sku,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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for FileServiceProperties.
+func (fsp FileServiceProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if fsp.FileServicePropertiesProperties != nil {
+ objectMap["properties"] = fsp.FileServicePropertiesProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for FileServiceProperties struct.
+func (fsp *FileServiceProperties) UnmarshalJSON(body []byte) error {
+ 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 fileServiceProperties FileServicePropertiesProperties
+ err = json.Unmarshal(*v, &fileServiceProperties)
+ if err != nil {
+ return err
+ }
+ fsp.FileServicePropertiesProperties = &fileServiceProperties
+ }
+ case "sku":
+ if v != nil {
+ var sku Sku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ fsp.Sku = &sku
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ fsp.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ fsp.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ fsp.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// FileServicePropertiesProperties the properties of File services in storage account.
+type FileServicePropertiesProperties struct {
+ // Cors - Specifies CORS rules for the File service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the File service.
+ Cors *CorsRules `json:"cors,omitempty"`
+ // ShareDeleteRetentionPolicy - The file service properties for share soft delete.
+ ShareDeleteRetentionPolicy *DeleteRetentionPolicy `json:"shareDeleteRetentionPolicy,omitempty"`
+}
+
+// FileShare properties of the file share, including Id, resource name, resource type, Etag.
+type FileShare struct {
+ autorest.Response `json:"-"`
+ // FileShareProperties - Properties of the file share.
+ *FileShareProperties `json:"properties,omitempty"`
+ // 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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for FileShare.
+func (fs FileShare) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if fs.FileShareProperties != nil {
+ objectMap["properties"] = fs.FileShareProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for FileShare struct.
+func (fs *FileShare) UnmarshalJSON(body []byte) error {
+ 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 fileShareProperties FileShareProperties
@@ -2097,8 +2667,28 @@ type FileShareProperties struct {
LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
// Metadata - A name-value pair to associate with the share as metadata.
Metadata map[string]*string `json:"metadata"`
- // ShareQuota - The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120).
+ // ShareQuota - The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400.
ShareQuota *int32 `json:"shareQuota,omitempty"`
+ // EnabledProtocols - The authentication protocol that is used for the file share. Can only be specified when creating a share. Possible values include: 'SMB', 'NFS'
+ EnabledProtocols EnabledProtocols `json:"enabledProtocols,omitempty"`
+ // RootSquash - The property is for NFS share only. The default is NoRootSquash. Possible values include: 'NoRootSquash', 'RootSquash', 'AllSquash'
+ RootSquash RootSquashType `json:"rootSquash,omitempty"`
+ // Version - READ-ONLY; The version of the share.
+ Version *string `json:"version,omitempty"`
+ // Deleted - READ-ONLY; Indicates whether the share was deleted.
+ Deleted *bool `json:"deleted,omitempty"`
+ // DeletedTime - READ-ONLY; The deleted time if the share was deleted.
+ DeletedTime *date.Time `json:"deletedTime,omitempty"`
+ // RemainingRetentionDays - READ-ONLY; Remaining retention days for share that was soft deleted.
+ RemainingRetentionDays *int32 `json:"remainingRetentionDays,omitempty"`
+ // AccessTier - Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium. Possible values include: 'ShareAccessTierTransactionOptimized', 'ShareAccessTierHot', 'ShareAccessTierCool', 'ShareAccessTierPremium'
+ AccessTier ShareAccessTier `json:"accessTier,omitempty"`
+ // AccessTierChangeTime - READ-ONLY; Indicates the last modification time for share access tier.
+ AccessTierChangeTime *date.Time `json:"accessTierChangeTime,omitempty"`
+ // AccessTierStatus - READ-ONLY; Indicates if there is a pending transition for access tier.
+ AccessTierStatus *string `json:"accessTierStatus,omitempty"`
+ // ShareUsageBytes - READ-ONLY; The approximate size of the data stored on the share. Note that this value may not include all recently created or recently resized files.
+ ShareUsageBytes *int64 `json:"shareUsageBytes,omitempty"`
}
// MarshalJSON is the custom marshaler for FileShareProperties.
@@ -2110,6 +2700,15 @@ func (fsp FileShareProperties) MarshalJSON() ([]byte, error) {
if fsp.ShareQuota != nil {
objectMap["shareQuota"] = fsp.ShareQuota
}
+ if fsp.EnabledProtocols != "" {
+ objectMap["enabledProtocols"] = fsp.EnabledProtocols
+ }
+ if fsp.RootSquash != "" {
+ objectMap["rootSquash"] = fsp.RootSquash
+ }
+ if fsp.AccessTier != "" {
+ objectMap["accessTier"] = fsp.AccessTier
+ }
return json.Marshal(objectMap)
}
@@ -2286,6 +2885,8 @@ type ImmutabilityPolicyProperty struct {
ImmutabilityPeriodSinceCreationInDays *int32 `json:"immutabilityPeriodSinceCreationInDays,omitempty"`
// State - READ-ONLY; The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked. Possible values include: 'Locked', 'Unlocked'
State ImmutabilityPolicyState `json:"state,omitempty"`
+ // AllowProtectedAppendWrites - This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API
+ AllowProtectedAppendWrites *bool `json:"allowProtectedAppendWrites,omitempty"`
}
// IPRule IP rule with specific IP or IP range in CIDR format.
@@ -2304,6 +2905,10 @@ type KeyVaultProperties struct {
KeyVersion *string `json:"keyversion,omitempty"`
// KeyVaultURI - The Uri of KeyVault.
KeyVaultURI *string `json:"keyvaulturi,omitempty"`
+ // CurrentVersionedKeyIdentifier - READ-ONLY; The object identifier of the current versioned Key Vault Key in use.
+ CurrentVersionedKeyIdentifier *string `json:"currentVersionedKeyIdentifier,omitempty"`
+ // LastKeyRotationTimestamp - READ-ONLY; Timestamp of last rotation of the Key Vault Key.
+ LastKeyRotationTimestamp *date.Time `json:"lastKeyRotationTimestamp,omitempty"`
}
// LeaseContainerRequest lease Container request schema.
@@ -2583,11 +3188,404 @@ func NewListContainerItemsPage(getNextPage func(context.Context, ListContainerIt
return ListContainerItemsPage{fn: getNextPage}
}
-// ListServiceSasResponse the List service SAS credentials operation response.
-type ListServiceSasResponse struct {
+// ListQueue ...
+type ListQueue struct {
+ // ListQueueProperties - List Queue resource properties.
+ *ListQueueProperties `json:"properties,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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ListQueue.
+func (lq ListQueue) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if lq.ListQueueProperties != nil {
+ objectMap["properties"] = lq.ListQueueProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ListQueue struct.
+func (lq *ListQueue) UnmarshalJSON(body []byte) error {
+ 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 queueProperties ListQueueProperties
+ err = json.Unmarshal(*v, &queueProperties)
+ if err != nil {
+ return err
+ }
+ lq.ListQueueProperties = &queueProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ lq.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ lq.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ lq.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// ListQueueProperties ...
+type ListQueueProperties struct {
+ // Metadata - A name-value pair that represents queue metadata.
+ Metadata map[string]*string `json:"metadata"`
+}
+
+// MarshalJSON is the custom marshaler for ListQueueProperties.
+func (lqp ListQueueProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if lqp.Metadata != nil {
+ objectMap["metadata"] = lqp.Metadata
+ }
+ return json.Marshal(objectMap)
+}
+
+// ListQueueResource response schema. Contains list of queues returned
+type ListQueueResource struct {
+ autorest.Response `json:"-"`
+ // Value - READ-ONLY; List of queues returned.
+ Value *[]ListQueue `json:"value,omitempty"`
+ // NextLink - READ-ONLY; Request URL that can be used to list next page of queues
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ListQueueResourceIterator provides access to a complete listing of ListQueue values.
+type ListQueueResourceIterator struct {
+ i int
+ page ListQueueResourcePage
+}
+
+// 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 *ListQueueResourceIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListQueueResourceIterator.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 *ListQueueResourceIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ListQueueResourceIterator) 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 ListQueueResourceIterator) Response() ListQueueResource {
+ 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 ListQueueResourceIterator) Value() ListQueue {
+ if !iter.page.NotDone() {
+ return ListQueue{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the ListQueueResourceIterator type.
+func NewListQueueResourceIterator(page ListQueueResourcePage) ListQueueResourceIterator {
+ return ListQueueResourceIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (lqr ListQueueResource) IsEmpty() bool {
+ return lqr.Value == nil || len(*lqr.Value) == 0
+}
+
+// listQueueResourcePreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (lqr ListQueueResource) listQueueResourcePreparer(ctx context.Context) (*http.Request, error) {
+ if lqr.NextLink == nil || len(to.String(lqr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(lqr.NextLink)))
+}
+
+// ListQueueResourcePage contains a page of ListQueue values.
+type ListQueueResourcePage struct {
+ fn func(context.Context, ListQueueResource) (ListQueueResource, error)
+ lqr ListQueueResource
+}
+
+// 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 *ListQueueResourcePage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListQueueResourcePage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.lqr)
+ if err != nil {
+ return err
+ }
+ page.lqr = next
+ 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 *ListQueueResourcePage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ListQueueResourcePage) NotDone() bool {
+ return !page.lqr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ListQueueResourcePage) Response() ListQueueResource {
+ return page.lqr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ListQueueResourcePage) Values() []ListQueue {
+ if page.lqr.IsEmpty() {
+ return nil
+ }
+ return *page.lqr.Value
+}
+
+// Creates a new instance of the ListQueueResourcePage type.
+func NewListQueueResourcePage(getNextPage func(context.Context, ListQueueResource) (ListQueueResource, error)) ListQueueResourcePage {
+ return ListQueueResourcePage{fn: getNextPage}
+}
+
+// ListQueueServices ...
+type ListQueueServices struct {
+ autorest.Response `json:"-"`
+ // Value - READ-ONLY; List of queue services returned.
+ Value *[]QueueServiceProperties `json:"value,omitempty"`
+}
+
+// ListServiceSasResponse the List service SAS credentials operation response.
+type ListServiceSasResponse struct {
+ autorest.Response `json:"-"`
+ // ServiceSasToken - READ-ONLY; List service SAS credentials of specific resource.
+ ServiceSasToken *string `json:"serviceSasToken,omitempty"`
+}
+
+// ListTableResource response schema. Contains list of tables returned
+type ListTableResource struct {
+ autorest.Response `json:"-"`
+ // Value - READ-ONLY; List of tables returned.
+ Value *[]Table `json:"value,omitempty"`
+ // NextLink - READ-ONLY; Request URL that can be used to query next page of tables
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ListTableResourceIterator provides access to a complete listing of Table values.
+type ListTableResourceIterator struct {
+ i int
+ page ListTableResourcePage
+}
+
+// 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 *ListTableResourceIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListTableResourceIterator.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 *ListTableResourceIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ListTableResourceIterator) 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 ListTableResourceIterator) Response() ListTableResource {
+ 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 ListTableResourceIterator) Value() Table {
+ if !iter.page.NotDone() {
+ return Table{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the ListTableResourceIterator type.
+func NewListTableResourceIterator(page ListTableResourcePage) ListTableResourceIterator {
+ return ListTableResourceIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (ltr ListTableResource) IsEmpty() bool {
+ return ltr.Value == nil || len(*ltr.Value) == 0
+}
+
+// listTableResourcePreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (ltr ListTableResource) listTableResourcePreparer(ctx context.Context) (*http.Request, error) {
+ if ltr.NextLink == nil || len(to.String(ltr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(ltr.NextLink)))
+}
+
+// ListTableResourcePage contains a page of Table values.
+type ListTableResourcePage struct {
+ fn func(context.Context, ListTableResource) (ListTableResource, error)
+ ltr ListTableResource
+}
+
+// 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 *ListTableResourcePage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListTableResourcePage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.ltr)
+ if err != nil {
+ return err
+ }
+ page.ltr = next
+ 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 *ListTableResourcePage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ListTableResourcePage) NotDone() bool {
+ return !page.ltr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ListTableResourcePage) Response() ListTableResource {
+ return page.ltr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ListTableResourcePage) Values() []Table {
+ if page.ltr.IsEmpty() {
+ return nil
+ }
+ return *page.ltr.Value
+}
+
+// Creates a new instance of the ListTableResourcePage type.
+func NewListTableResourcePage(getNextPage func(context.Context, ListTableResource) (ListTableResource, error)) ListTableResourcePage {
+ return ListTableResourcePage{fn: getNextPage}
+}
+
+// ListTableServices ...
+type ListTableServices struct {
autorest.Response `json:"-"`
- // ServiceSasToken - READ-ONLY; List service SAS credentials of specific resource.
- ServiceSasToken *string `json:"serviceSasToken,omitempty"`
+ // Value - READ-ONLY; List of table services returned.
+ Value *[]TableServiceProperties `json:"value,omitempty"`
}
// ManagementPolicy the Get Storage Account ManagementPolicies operation response.
@@ -2697,6 +3695,8 @@ type ManagementPolicyFilter struct {
PrefixMatch *[]string `json:"prefixMatch,omitempty"`
// BlobTypes - An array of predefined enum values. Only blockBlob is supported.
BlobTypes *[]string `json:"blobTypes,omitempty"`
+ // BlobIndexMatch - An array of blob index tag based filters, there can be at most 10 tag filters
+ BlobIndexMatch *[]TagFilter `json:"blobIndexMatch,omitempty"`
}
// ManagementPolicyProperties the Storage Account ManagementPolicy properties.
@@ -2766,6 +3766,123 @@ type NetworkRuleSet struct {
DefaultAction DefaultAction `json:"defaultAction,omitempty"`
}
+// ObjectReplicationPolicies list storage account object replication policies.
+type ObjectReplicationPolicies struct {
+ autorest.Response `json:"-"`
+ // Value - The replication policy between two storage accounts.
+ Value *[]ObjectReplicationPolicy `json:"value,omitempty"`
+}
+
+// ObjectReplicationPolicy the replication policy between two storage accounts. Multiple rules can be
+// defined in one policy.
+type ObjectReplicationPolicy struct {
+ autorest.Response `json:"-"`
+ // ObjectReplicationPolicyProperties - Returns the Storage Account Object Replication Policy.
+ *ObjectReplicationPolicyProperties `json:"properties,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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ObjectReplicationPolicy.
+func (orp ObjectReplicationPolicy) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if orp.ObjectReplicationPolicyProperties != nil {
+ objectMap["properties"] = orp.ObjectReplicationPolicyProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ObjectReplicationPolicy struct.
+func (orp *ObjectReplicationPolicy) UnmarshalJSON(body []byte) error {
+ 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 objectReplicationPolicyProperties ObjectReplicationPolicyProperties
+ err = json.Unmarshal(*v, &objectReplicationPolicyProperties)
+ if err != nil {
+ return err
+ }
+ orp.ObjectReplicationPolicyProperties = &objectReplicationPolicyProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ orp.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ orp.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ orp.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// ObjectReplicationPolicyFilter filters limit replication to a subset of blobs within the storage account.
+// A logical OR is performed on values in the filter. If multiple filters are defined, a logical AND is
+// performed on all filters.
+type ObjectReplicationPolicyFilter struct {
+ // PrefixMatch - Optional. Filters the results to replicate only blobs whose names begin with the specified prefix.
+ PrefixMatch *[]string `json:"prefixMatch,omitempty"`
+ // MinCreationTime - Blobs created after the time will be replicated to the destination. It must be in datetime format 'yyyy-MM-ddTHH:mm:ssZ'. Example: 2020-02-19T16:05:00Z
+ MinCreationTime *string `json:"minCreationTime,omitempty"`
+}
+
+// ObjectReplicationPolicyProperties the Storage Account ObjectReplicationPolicy properties.
+type ObjectReplicationPolicyProperties struct {
+ // PolicyID - READ-ONLY; A unique id for object replication policy.
+ PolicyID *string `json:"policyId,omitempty"`
+ // EnabledTime - READ-ONLY; Indicates when the policy is enabled on the source account.
+ EnabledTime *date.Time `json:"enabledTime,omitempty"`
+ // SourceAccount - Required. Source account name.
+ SourceAccount *string `json:"sourceAccount,omitempty"`
+ // DestinationAccount - Required. Destination account name.
+ DestinationAccount *string `json:"destinationAccount,omitempty"`
+ // Rules - The storage account object replication rules.
+ Rules *[]ObjectReplicationPolicyRule `json:"rules,omitempty"`
+}
+
+// ObjectReplicationPolicyRule the replication policy rule between two containers.
+type ObjectReplicationPolicyRule struct {
+ // RuleID - Rule Id is auto-generated for each new rule on destination account. It is required for put policy on source account.
+ RuleID *string `json:"ruleId,omitempty"`
+ // SourceContainer - Required. Source container name.
+ SourceContainer *string `json:"sourceContainer,omitempty"`
+ // DestinationContainer - Required. Destination container name.
+ DestinationContainer *string `json:"destinationContainer,omitempty"`
+ // Filters - Optional. An object that defines the filter set.
+ Filters *ObjectReplicationPolicyFilter `json:"filters,omitempty"`
+}
+
// Operation storage REST API operation definition.
type Operation struct {
// Name - Operation name: {provider}/{resource}/{operation}
@@ -2873,17 +3990,219 @@ type OperationProperties struct {
ServiceSpecification *ServiceSpecification `json:"serviceSpecification,omitempty"`
}
-// PrivateEndpoint the Private Endpoint resource.
-type PrivateEndpoint struct {
- // ID - READ-ONLY; The ARM identifier for Private Endpoint
+// PrivateEndpoint the Private Endpoint resource.
+type PrivateEndpoint struct {
+ // ID - READ-ONLY; The ARM identifier for Private Endpoint
+ ID *string `json:"id,omitempty"`
+}
+
+// PrivateEndpointConnection the Private Endpoint Connection resource.
+type PrivateEndpointConnection struct {
+ autorest.Response `json:"-"`
+ // PrivateEndpointConnectionProperties - Resource properties.
+ *PrivateEndpointConnectionProperties `json:"properties,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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for PrivateEndpointConnection.
+func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if pec.PrivateEndpointConnectionProperties != nil {
+ objectMap["properties"] = pec.PrivateEndpointConnectionProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct.
+func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var privateEndpointConnectionProperties PrivateEndpointConnectionProperties
+ err = json.Unmarshal(*v, &privateEndpointConnectionProperties)
+ if err != nil {
+ return err
+ }
+ pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ pec.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ pec.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ pec.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// PrivateEndpointConnectionListResult list of private endpoint connection associated with the specified
+// storage account
+type PrivateEndpointConnectionListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Array of private endpoint connections
+ Value *[]PrivateEndpointConnection `json:"value,omitempty"`
+}
+
+// PrivateEndpointConnectionProperties properties of the PrivateEndpointConnectProperties.
+type PrivateEndpointConnectionProperties struct {
+ // PrivateEndpoint - The resource of private end point.
+ PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
+ // PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider.
+ PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
+ // ProvisioningState - The provisioning state of the private endpoint connection resource. Possible values include: 'PrivateEndpointConnectionProvisioningStateSucceeded', 'PrivateEndpointConnectionProvisioningStateCreating', 'PrivateEndpointConnectionProvisioningStateDeleting', 'PrivateEndpointConnectionProvisioningStateFailed'
+ ProvisioningState PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"`
+}
+
+// PrivateLinkResource a private link resource
+type PrivateLinkResource struct {
+ // PrivateLinkResourceProperties - Resource properties.
+ *PrivateLinkResourceProperties `json:"properties,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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for PrivateLinkResource.
+func (plr PrivateLinkResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if plr.PrivateLinkResourceProperties != nil {
+ objectMap["properties"] = plr.PrivateLinkResourceProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for PrivateLinkResource struct.
+func (plr *PrivateLinkResource) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var privateLinkResourceProperties PrivateLinkResourceProperties
+ err = json.Unmarshal(*v, &privateLinkResourceProperties)
+ if err != nil {
+ return err
+ }
+ plr.PrivateLinkResourceProperties = &privateLinkResourceProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ plr.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ plr.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ plr.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// PrivateLinkResourceListResult a list of private link resources
+type PrivateLinkResourceListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Array of private link resources
+ Value *[]PrivateLinkResource `json:"value,omitempty"`
+}
+
+// PrivateLinkResourceProperties properties of a private link resource.
+type PrivateLinkResourceProperties struct {
+ // GroupID - READ-ONLY; The private link resource group id.
+ GroupID *string `json:"groupId,omitempty"`
+ // RequiredMembers - READ-ONLY; The private link resource required member names.
+ RequiredMembers *[]string `json:"requiredMembers,omitempty"`
+ // RequiredZoneNames - The private link resource Private link DNS zone name.
+ RequiredZoneNames *[]string `json:"requiredZoneNames,omitempty"`
+}
+
+// PrivateLinkServiceConnectionState a collection of information about the state of the connection between
+// service consumer and provider.
+type PrivateLinkServiceConnectionState struct {
+ // Status - Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. Possible values include: 'Pending', 'Approved', 'Rejected'
+ Status PrivateEndpointServiceConnectionStatus `json:"status,omitempty"`
+ // Description - The reason for approval/rejection of the connection.
+ Description *string `json:"description,omitempty"`
+ // ActionRequired - A message indicating if changes on the service provider require any updates on the consumer.
+ ActionRequired *string `json:"actionRequired,omitempty"`
+}
+
+// ProxyResource the resource model definition for a ARM proxy resource. It will have everything other than
+// required location and tags
+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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
+ Type *string `json:"type,omitempty"`
}
-// PrivateEndpointConnection the Private Endpoint Connection resource.
-type PrivateEndpointConnection struct {
+// Queue ...
+type Queue struct {
autorest.Response `json:"-"`
- // PrivateEndpointConnectionProperties - Resource properties.
- *PrivateEndpointConnectionProperties `json:"properties,omitempty"`
+ // QueueProperties - Queue resource properties.
+ *QueueProperties `json:"properties,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
@@ -2892,17 +4211,17 @@ type PrivateEndpointConnection struct {
Type *string `json:"type,omitempty"`
}
-// MarshalJSON is the custom marshaler for PrivateEndpointConnection.
-func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) {
+// MarshalJSON is the custom marshaler for Queue.
+func (q Queue) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
- if pec.PrivateEndpointConnectionProperties != nil {
- objectMap["properties"] = pec.PrivateEndpointConnectionProperties
+ if q.QueueProperties != nil {
+ objectMap["properties"] = q.QueueProperties
}
return json.Marshal(objectMap)
}
-// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct.
-func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error {
+// UnmarshalJSON is the custom unmarshaler for Queue struct.
+func (q *Queue) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
@@ -2912,12 +4231,12 @@ func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error {
switch k {
case "properties":
if v != nil {
- var privateEndpointConnectionProperties PrivateEndpointConnectionProperties
- err = json.Unmarshal(*v, &privateEndpointConnectionProperties)
+ var queueProperties QueueProperties
+ err = json.Unmarshal(*v, &queueProperties)
if err != nil {
return err
}
- pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties
+ q.QueueProperties = &queueProperties
}
case "id":
if v != nil {
@@ -2926,7 +4245,7 @@ func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error {
if err != nil {
return err
}
- pec.ID = &ID
+ q.ID = &ID
}
case "name":
if v != nil {
@@ -2935,7 +4254,7 @@ func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error {
if err != nil {
return err
}
- pec.Name = &name
+ q.Name = &name
}
case "type":
if v != nil {
@@ -2944,7 +4263,7 @@ func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error {
if err != nil {
return err
}
- pec.Type = &typeVar
+ q.Type = &typeVar
}
}
}
@@ -2952,20 +4271,28 @@ func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error {
return nil
}
-// PrivateEndpointConnectionProperties properties of the PrivateEndpointConnectProperties.
-type PrivateEndpointConnectionProperties struct {
- // PrivateEndpoint - The resource of private end point.
- PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
- // PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider.
- PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
- // ProvisioningState - The provisioning state of the private endpoint connection resource. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Failed'
- ProvisioningState PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"`
+// QueueProperties ...
+type QueueProperties struct {
+ // Metadata - A name-value pair that represents queue metadata.
+ Metadata map[string]*string `json:"metadata"`
+ // ApproximateMessageCount - READ-ONLY; Integer indicating an approximate number of messages in the queue. This number is not lower than the actual number of messages in the queue, but could be higher.
+ ApproximateMessageCount *int32 `json:"approximateMessageCount,omitempty"`
}
-// PrivateLinkResource a private link resource
-type PrivateLinkResource struct {
- // PrivateLinkResourceProperties - Resource properties.
- *PrivateLinkResourceProperties `json:"properties,omitempty"`
+// MarshalJSON is the custom marshaler for QueueProperties.
+func (qp QueueProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if qp.Metadata != nil {
+ objectMap["metadata"] = qp.Metadata
+ }
+ return json.Marshal(objectMap)
+}
+
+// QueueServiceProperties the properties of a storage account’s Queue service.
+type QueueServiceProperties struct {
+ autorest.Response `json:"-"`
+ // QueueServicePropertiesProperties - The properties of a storage account’s Queue service.
+ *QueueServicePropertiesProperties `json:"properties,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
@@ -2974,17 +4301,17 @@ type PrivateLinkResource struct {
Type *string `json:"type,omitempty"`
}
-// MarshalJSON is the custom marshaler for PrivateLinkResource.
-func (plr PrivateLinkResource) MarshalJSON() ([]byte, error) {
+// MarshalJSON is the custom marshaler for QueueServiceProperties.
+func (qsp QueueServiceProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
- if plr.PrivateLinkResourceProperties != nil {
- objectMap["properties"] = plr.PrivateLinkResourceProperties
+ if qsp.QueueServicePropertiesProperties != nil {
+ objectMap["properties"] = qsp.QueueServicePropertiesProperties
}
return json.Marshal(objectMap)
}
-// UnmarshalJSON is the custom unmarshaler for PrivateLinkResource struct.
-func (plr *PrivateLinkResource) UnmarshalJSON(body []byte) error {
+// UnmarshalJSON is the custom unmarshaler for QueueServiceProperties struct.
+func (qsp *QueueServiceProperties) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
@@ -2994,12 +4321,12 @@ func (plr *PrivateLinkResource) UnmarshalJSON(body []byte) error {
switch k {
case "properties":
if v != nil {
- var privateLinkResourceProperties PrivateLinkResourceProperties
- err = json.Unmarshal(*v, &privateLinkResourceProperties)
+ var queueServiceProperties QueueServicePropertiesProperties
+ err = json.Unmarshal(*v, &queueServiceProperties)
if err != nil {
return err
}
- plr.PrivateLinkResourceProperties = &privateLinkResourceProperties
+ qsp.QueueServicePropertiesProperties = &queueServiceProperties
}
case "id":
if v != nil {
@@ -3008,7 +4335,7 @@ func (plr *PrivateLinkResource) UnmarshalJSON(body []byte) error {
if err != nil {
return err
}
- plr.ID = &ID
+ qsp.ID = &ID
}
case "name":
if v != nil {
@@ -3017,7 +4344,7 @@ func (plr *PrivateLinkResource) UnmarshalJSON(body []byte) error {
if err != nil {
return err
}
- plr.Name = &name
+ qsp.Name = &name
}
case "type":
if v != nil {
@@ -3026,7 +4353,7 @@ func (plr *PrivateLinkResource) UnmarshalJSON(body []byte) error {
if err != nil {
return err
}
- plr.Type = &typeVar
+ qsp.Type = &typeVar
}
}
}
@@ -3034,43 +4361,10 @@ func (plr *PrivateLinkResource) UnmarshalJSON(body []byte) error {
return nil
}
-// PrivateLinkResourceListResult a list of private link resources
-type PrivateLinkResourceListResult struct {
- autorest.Response `json:"-"`
- // Value - Array of private link resources
- Value *[]PrivateLinkResource `json:"value,omitempty"`
-}
-
-// PrivateLinkResourceProperties properties of a private link resource.
-type PrivateLinkResourceProperties struct {
- // GroupID - READ-ONLY; The private link resource group id.
- GroupID *string `json:"groupId,omitempty"`
- // RequiredMembers - READ-ONLY; The private link resource required member names.
- RequiredMembers *[]string `json:"requiredMembers,omitempty"`
- // RequiredZoneNames - The private link resource Private link DNS zone name.
- RequiredZoneNames *[]string `json:"requiredZoneNames,omitempty"`
-}
-
-// PrivateLinkServiceConnectionState a collection of information about the state of the connection between
-// service consumer and provider.
-type PrivateLinkServiceConnectionState struct {
- // Status - Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. Possible values include: 'Pending', 'Approved', 'Rejected'
- Status PrivateEndpointServiceConnectionStatus `json:"status,omitempty"`
- // Description - The reason for approval/rejection of the connection.
- Description *string `json:"description,omitempty"`
- // ActionRequired - A message indicating if changes on the service provider require any updates on the consumer.
- ActionRequired *string `json:"actionRequired,omitempty"`
-}
-
-// ProxyResource the resource model definition for a ARM proxy resource. It will have everything other than
-// required location and tags
-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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
- Type *string `json:"type,omitempty"`
+// QueueServicePropertiesProperties the properties of a storage account’s Queue service.
+type QueueServicePropertiesProperties struct {
+ // Cors - Specifies CORS rules for the Queue service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Queue service.
+ Cors *CorsRules `json:"cors,omitempty"`
}
// Resource ...
@@ -3083,6 +4377,16 @@ type Resource struct {
Type *string `json:"type,omitempty"`
}
+// RestorePolicyProperties the blob service properties for blob restore policy
+type RestorePolicyProperties struct {
+ // Enabled - Blob restore is enabled if set to true.
+ Enabled *bool `json:"enabled,omitempty"`
+ // Days - how long this blob can be restored. It should be great than zero and less than DeleteRetentionPolicy.days.
+ Days *int32 `json:"days,omitempty"`
+ // LastEnabledTime - READ-ONLY; Returns the date and time the restore policy was last enabled.
+ LastEnabledTime *date.Time `json:"lastEnabledTime,omitempty"`
+}
+
// Restriction the restriction because of which SKU cannot be used.
type Restriction struct {
// Type - READ-ONLY; The type of restrictions. As of now only possible value for this is location.
@@ -3093,6 +4397,17 @@ type Restriction struct {
ReasonCode ReasonCode `json:"reasonCode,omitempty"`
}
+// RoutingPreference routing preference defines the type of network, either microsoft or internet routing
+// to be used to deliver the user data, the default option is microsoft routing
+type RoutingPreference struct {
+ // RoutingChoice - Routing Choice defines the kind of network routing opted by the user. Possible values include: 'MicrosoftRouting', 'InternetRouting'
+ RoutingChoice RoutingChoice `json:"routingChoice,omitempty"`
+ // PublishMicrosoftEndpoints - A boolean flag which indicates whether microsoft routing storage endpoints are to be published
+ PublishMicrosoftEndpoints *bool `json:"publishMicrosoftEndpoints,omitempty"`
+ // PublishInternetEndpoints - A boolean flag which indicates whether internet routing storage endpoints are to be published
+ PublishInternetEndpoints *bool `json:"publishInternetEndpoints,omitempty"`
+}
+
// ServiceSasParameters the parameters to list service SAS credentials of a specific resource.
type ServiceSasParameters struct {
// CanonicalizedResource - The canonical path to the signed resource.
@@ -3141,9 +4456,26 @@ type ServiceSpecification struct {
// Sku the SKU of the storage account.
type Sku struct {
- // Name - Gets or sets the SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called accountType. Possible values include: 'StandardLRS', 'StandardGRS', 'StandardRAGRS', 'StandardZRS', 'PremiumLRS', 'PremiumZRS', 'StandardGZRS', 'StandardRAGZRS'
+ // Name - Possible values include: 'StandardLRS', 'StandardGRS', 'StandardRAGRS', 'StandardZRS', 'PremiumLRS', 'PremiumZRS', 'StandardGZRS', 'StandardRAGZRS'
+ Name SkuName `json:"name,omitempty"`
+ // Tier - Possible values include: 'Standard', 'Premium'
+ Tier SkuTier `json:"tier,omitempty"`
+}
+
+// SKUCapability the capability information in the specified SKU, including file encryption, network ACLs,
+// change notification, etc.
+type SKUCapability struct {
+ // Name - READ-ONLY; The name of capability, The capability information in the specified SKU, including file encryption, network ACLs, change notification, etc.
+ Name *string `json:"name,omitempty"`
+ // Value - READ-ONLY; A string value to indicate states of given capability. Possibly 'true' or 'false'.
+ Value *string `json:"value,omitempty"`
+}
+
+// SkuInformation storage SKU and its properties
+type SkuInformation struct {
+ // Name - Possible values include: 'StandardLRS', 'StandardGRS', 'StandardRAGRS', 'StandardZRS', 'PremiumLRS', 'PremiumZRS', 'StandardGZRS', 'StandardRAGZRS'
Name SkuName `json:"name,omitempty"`
- // Tier - READ-ONLY; Gets the SKU tier. This is based on the SKU name. Possible values include: 'Standard', 'Premium'
+ // Tier - Possible values include: 'Standard', 'Premium'
Tier SkuTier `json:"tier,omitempty"`
// ResourceType - READ-ONLY; The type of the resource, usually it is 'storageAccounts'.
ResourceType *string `json:"resourceType,omitempty"`
@@ -3157,20 +4489,179 @@ type Sku struct {
Restrictions *[]Restriction `json:"restrictions,omitempty"`
}
-// SKUCapability the capability information in the specified SKU, including file encryption, network ACLs,
-// change notification, etc.
-type SKUCapability struct {
- // Name - READ-ONLY; The name of capability, The capability information in the specified SKU, including file encryption, network ACLs, change notification, etc.
- Name *string `json:"name,omitempty"`
- // Value - READ-ONLY; A string value to indicate states of given capability. Possibly 'true' or 'false'.
- Value *string `json:"value,omitempty"`
-}
-
// SkuListResult the response from the List Storage SKUs operation.
type SkuListResult struct {
autorest.Response `json:"-"`
// Value - READ-ONLY; Get the list result of storage SKUs and their properties.
- Value *[]Sku `json:"value,omitempty"`
+ Value *[]SkuInformation `json:"value,omitempty"`
+}
+
+// Table properties of the table, including Id, resource name, resource type.
+type Table struct {
+ autorest.Response `json:"-"`
+ // TableProperties - Table resource properties.
+ *TableProperties `json:"properties,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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for Table.
+func (t Table) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if t.TableProperties != nil {
+ objectMap["properties"] = t.TableProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Table struct.
+func (t *Table) UnmarshalJSON(body []byte) error {
+ 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 tableProperties TableProperties
+ err = json.Unmarshal(*v, &tableProperties)
+ if err != nil {
+ return err
+ }
+ t.TableProperties = &tableProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ t.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ t.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ t.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// TableProperties ...
+type TableProperties struct {
+ // TableName - READ-ONLY; Table name under the specified account
+ TableName *string `json:"tableName,omitempty"`
+}
+
+// TableServiceProperties the properties of a storage account’s Table service.
+type TableServiceProperties struct {
+ autorest.Response `json:"-"`
+ // TableServicePropertiesProperties - The properties of a storage account’s Table service.
+ *TableServicePropertiesProperties `json:"properties,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. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for TableServiceProperties.
+func (tsp TableServiceProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if tsp.TableServicePropertiesProperties != nil {
+ objectMap["properties"] = tsp.TableServicePropertiesProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for TableServiceProperties struct.
+func (tsp *TableServiceProperties) UnmarshalJSON(body []byte) error {
+ 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 tableServiceProperties TableServicePropertiesProperties
+ err = json.Unmarshal(*v, &tableServiceProperties)
+ if err != nil {
+ return err
+ }
+ tsp.TableServicePropertiesProperties = &tableServiceProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ tsp.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ tsp.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ tsp.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// TableServicePropertiesProperties the properties of a storage account’s Table service.
+type TableServicePropertiesProperties struct {
+ // Cors - Specifies CORS rules for the Table service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Table service.
+ Cors *CorsRules `json:"cors,omitempty"`
+}
+
+// TagFilter blob index tag based filtering for blob objects
+type TagFilter struct {
+ // Name - This is the filter tag name, it can have 1 - 128 characters
+ Name *string `json:"name,omitempty"`
+ // Op - This is the comparison operator which is used for object comparison and filtering. Only == (equality operator) is currently supported
+ Op *string `json:"op,omitempty"`
+ // Value - This is the filter tag value field used for tag based filtering, it can have 0 - 256 characters
+ Value *string `json:"value,omitempty"`
}
// TagProperty a tag of the LegalHold of a blob container.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/objectreplicationpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/objectreplicationpolicies.go
new file mode 100644
index 000000000..4e7a97eea
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/objectreplicationpolicies.go
@@ -0,0 +1,428 @@
+package storage
+
+// 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"
+)
+
+// ObjectReplicationPoliciesClient is the the Azure Storage Management API.
+type ObjectReplicationPoliciesClient struct {
+ BaseClient
+}
+
+// NewObjectReplicationPoliciesClient creates an instance of the ObjectReplicationPoliciesClient client.
+func NewObjectReplicationPoliciesClient(subscriptionID string) ObjectReplicationPoliciesClient {
+ return NewObjectReplicationPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewObjectReplicationPoliciesClientWithBaseURI creates an instance of the ObjectReplicationPoliciesClient 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 NewObjectReplicationPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ObjectReplicationPoliciesClient {
+ return ObjectReplicationPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate create or update the object replication policy of the storage account.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - the name of the storage account within the specified resource group. Storage account names
+// must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+// objectReplicationPolicyID - the ID of object replication policy or 'default' if the policy ID is unknown.
+// properties - the object replication policy set to a storage account. A unique policy ID will be created if
+// absent.
+func (client ObjectReplicationPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, objectReplicationPolicyID string, properties ObjectReplicationPolicy) (result ObjectReplicationPolicy, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ObjectReplicationPoliciesClient.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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: objectReplicationPolicyID,
+ Constraints: []validation.Constraint{{Target: "objectReplicationPolicyID", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: properties,
+ Constraints: []validation.Constraint{{Target: "properties.ObjectReplicationPolicyProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "properties.ObjectReplicationPolicyProperties.SourceAccount", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "properties.ObjectReplicationPolicyProperties.DestinationAccount", Name: validation.Null, Rule: true, Chain: nil},
+ }}}}}); err != nil {
+ return result, validation.NewError("storage.ObjectReplicationPoliciesClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, accountName, objectReplicationPolicyID, properties)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.ObjectReplicationPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateOrUpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.ObjectReplicationPoliciesClient", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.ObjectReplicationPoliciesClient", "CreateOrUpdate", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client ObjectReplicationPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, objectReplicationPolicyID string, properties ObjectReplicationPolicy) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "objectReplicationPolicyId": autorest.Encode("path", objectReplicationPolicyID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/objectReplicationPolicies/{objectReplicationPolicyId}", pathParameters),
+ autorest.WithJSON(properties),
+ 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 ObjectReplicationPoliciesClient) 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 ObjectReplicationPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result ObjectReplicationPolicy, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete deletes the object replication policy associated with the specified storage account.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - the name of the storage account within the specified resource group. Storage account names
+// must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+// objectReplicationPolicyID - the ID of object replication policy or 'default' if the policy ID is unknown.
+func (client ObjectReplicationPoliciesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, objectReplicationPolicyID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ObjectReplicationPoliciesClient.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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: objectReplicationPolicyID,
+ Constraints: []validation.Constraint{{Target: "objectReplicationPolicyID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.ObjectReplicationPoliciesClient", "Delete", err.Error())
+ }
+
+ req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, objectReplicationPolicyID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.ObjectReplicationPoliciesClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "storage.ObjectReplicationPoliciesClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.ObjectReplicationPoliciesClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client ObjectReplicationPoliciesClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string, objectReplicationPolicyID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "objectReplicationPolicyId": autorest.Encode("path", objectReplicationPolicyID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/objectReplicationPolicies/{objectReplicationPolicyId}", 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 ObjectReplicationPoliciesClient) 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 ObjectReplicationPoliciesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get get the object replication policy of the storage account by policy ID.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - the name of the storage account within the specified resource group. Storage account names
+// must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+// objectReplicationPolicyID - the ID of object replication policy or 'default' if the policy ID is unknown.
+func (client ObjectReplicationPoliciesClient) Get(ctx context.Context, resourceGroupName string, accountName string, objectReplicationPolicyID string) (result ObjectReplicationPolicy, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ObjectReplicationPoliciesClient.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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: objectReplicationPolicyID,
+ Constraints: []validation.Constraint{{Target: "objectReplicationPolicyID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.ObjectReplicationPoliciesClient", "Get", err.Error())
+ }
+
+ req, err := client.GetPreparer(ctx, resourceGroupName, accountName, objectReplicationPolicyID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.ObjectReplicationPoliciesClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.ObjectReplicationPoliciesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.ObjectReplicationPoliciesClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client ObjectReplicationPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, objectReplicationPolicyID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "objectReplicationPolicyId": autorest.Encode("path", objectReplicationPolicyID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/objectReplicationPolicies/{objectReplicationPolicyId}", 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 ObjectReplicationPoliciesClient) 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 ObjectReplicationPoliciesClient) GetResponder(resp *http.Response) (result ObjectReplicationPolicy, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List list the object replication policies associated with the storage account.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - the name of the storage account within the specified resource group. Storage account names
+// must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+func (client ObjectReplicationPoliciesClient) List(ctx context.Context, resourceGroupName string, accountName string) (result ObjectReplicationPolicies, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ObjectReplicationPoliciesClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}},
+ {TargetValue: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.ObjectReplicationPoliciesClient", "List", err.Error())
+ }
+
+ req, err := client.ListPreparer(ctx, resourceGroupName, accountName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.ObjectReplicationPoliciesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.ObjectReplicationPoliciesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.ObjectReplicationPoliciesClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client ObjectReplicationPoliciesClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/objectReplicationPolicies", 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 ObjectReplicationPoliciesClient) 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 ObjectReplicationPoliciesClient) ListResponder(resp *http.Response) (result ObjectReplicationPolicies, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/storage/mgmt/2019-06-01/storage/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/operations.go
index cd01bf135..7a5a9c7df 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/operations.go
@@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient {
return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client.
+// 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)}
}
@@ -91,8 +92,7 @@ func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request,
// 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) {
- sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/privateendpointconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/privateendpointconnections.go
index 4cad9cb30..326ba923a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/privateendpointconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/privateendpointconnections.go
@@ -36,7 +36,9 @@ func NewPrivateEndpointConnectionsClient(subscriptionID string) PrivateEndpointC
return NewPrivateEndpointConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewPrivateEndpointConnectionsClientWithBaseURI creates an instance of the PrivateEndpointConnectionsClient client.
+// NewPrivateEndpointConnectionsClientWithBaseURI creates an instance of the PrivateEndpointConnectionsClient client
+// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign
+// clouds, Azure stack).
func NewPrivateEndpointConnectionsClientWithBaseURI(baseURI string, subscriptionID string) PrivateEndpointConnectionsClient {
return PrivateEndpointConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -47,8 +49,8 @@ func NewPrivateEndpointConnectionsClientWithBaseURI(baseURI string, subscription
// insensitive.
// accountName - the name of the storage account within the specified resource group. Storage account names
// must be between 3 and 24 characters in length and use numbers and lower-case letters only.
-// privateEndpointConnectionName - the name of the private endpoint connection associated with the Storage
-// Account
+// privateEndpointConnectionName - the name of the private endpoint connection associated with the Azure
+// resource
func (client PrivateEndpointConnectionsClient) Delete(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string) (result autorest.Response, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.Delete")
@@ -119,8 +121,7 @@ func (client PrivateEndpointConnectionsClient) DeletePreparer(ctx context.Contex
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client PrivateEndpointConnectionsClient) DeleteSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// DeleteResponder handles the response to the Delete request. The method always
@@ -141,8 +142,8 @@ func (client PrivateEndpointConnectionsClient) DeleteResponder(resp *http.Respon
// insensitive.
// accountName - the name of the storage account within the specified resource group. Storage account names
// must be between 3 and 24 characters in length and use numbers and lower-case letters only.
-// privateEndpointConnectionName - the name of the private endpoint connection associated with the Storage
-// Account
+// privateEndpointConnectionName - the name of the private endpoint connection associated with the Azure
+// resource
func (client PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string) (result PrivateEndpointConnection, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.Get")
@@ -213,8 +214,7 @@ func (client PrivateEndpointConnectionsClient) GetPreparer(ctx context.Context,
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client PrivateEndpointConnectionsClient) GetSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
@@ -230,14 +230,105 @@ func (client PrivateEndpointConnectionsClient) GetResponder(resp *http.Response)
return
}
+// List list all the private endpoint connections associated with the storage account.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - the name of the storage account within the specified resource group. Storage account names
+// must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+func (client PrivateEndpointConnectionsClient) List(ctx context.Context, resourceGroupName string, accountName string) (result PrivateEndpointConnectionListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}},
+ {TargetValue: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.PrivateEndpointConnectionsClient", "List", err.Error())
+ }
+
+ req, err := client.ListPreparer(ctx, resourceGroupName, accountName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.PrivateEndpointConnectionsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.PrivateEndpointConnectionsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.PrivateEndpointConnectionsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client PrivateEndpointConnectionsClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/privateEndpointConnections", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client PrivateEndpointConnectionsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client PrivateEndpointConnectionsClient) ListResponder(resp *http.Response) (result PrivateEndpointConnectionListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
// Put update the state of specified private endpoint connection associated with the storage account.
// Parameters:
// resourceGroupName - the name of the resource group within the user's subscription. The name is case
// insensitive.
// accountName - the name of the storage account within the specified resource group. Storage account names
// must be between 3 and 24 characters in length and use numbers and lower-case letters only.
-// privateEndpointConnectionName - the name of the private endpoint connection associated with the Storage
-// Account
+// privateEndpointConnectionName - the name of the private endpoint connection associated with the Azure
+// resource
// properties - the private endpoint connection properties.
func (client PrivateEndpointConnectionsClient) Put(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, properties PrivateEndpointConnection) (result PrivateEndpointConnection, err error) {
if tracing.IsEnabled() {
@@ -314,8 +405,7 @@ func (client PrivateEndpointConnectionsClient) PutPreparer(ctx context.Context,
// PutSender sends the Put request. The method will close the
// http.Response Body if it receives an error.
func (client PrivateEndpointConnectionsClient) PutSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// PutResponder handles the response to the Put request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/privatelinkresources.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/privatelinkresources.go
index 369db691e..db93be642 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/privatelinkresources.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/privatelinkresources.go
@@ -36,7 +36,9 @@ func NewPrivateLinkResourcesClient(subscriptionID string) PrivateLinkResourcesCl
return NewPrivateLinkResourcesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewPrivateLinkResourcesClientWithBaseURI creates an instance of the PrivateLinkResourcesClient client.
+// NewPrivateLinkResourcesClientWithBaseURI creates an instance of the PrivateLinkResourcesClient client using a custom
+// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure
+// stack).
func NewPrivateLinkResourcesClientWithBaseURI(baseURI string, subscriptionID string) PrivateLinkResourcesClient {
return PrivateLinkResourcesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -116,8 +118,7 @@ func (client PrivateLinkResourcesClient) ListByStorageAccountPreparer(ctx contex
// ListByStorageAccountSender sends the ListByStorageAccount request. The method will close the
// http.Response Body if it receives an error.
func (client PrivateLinkResourcesClient) ListByStorageAccountSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByStorageAccountResponder handles the response to the ListByStorageAccount request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/queue.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/queue.go
new file mode 100644
index 000000000..d44aaac7d
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/queue.go
@@ -0,0 +1,578 @@
+package storage
+
+// 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"
+)
+
+// QueueClient is the the Azure Storage Management API.
+type QueueClient struct {
+ BaseClient
+}
+
+// NewQueueClient creates an instance of the QueueClient client.
+func NewQueueClient(subscriptionID string) QueueClient {
+ return NewQueueClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewQueueClientWithBaseURI creates an instance of the QueueClient 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 NewQueueClientWithBaseURI(baseURI string, subscriptionID string) QueueClient {
+ return QueueClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Create creates a new queue with the specified queue name, under the specified account.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - the name of the storage account within the specified resource group. Storage account names
+// must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+// queueName - a queue name must be unique within a storage account and must be between 3 and 63 characters.The
+// name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an
+// alphanumeric character and it cannot have two consecutive dash(-) characters.
+// queue - queue properties and metadata to be created with
+func (client QueueClient) Create(ctx context.Context, resourceGroupName string, accountName string, queueName string, queue Queue) (result Queue, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/QueueClient.Create")
+ 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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: queueName,
+ Constraints: []validation.Constraint{{Target: "queueName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "queueName", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.QueueClient", "Create", err.Error())
+ }
+
+ req, err := client.CreatePreparer(ctx, resourceGroupName, accountName, queueName, queue)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.QueueClient", "Create", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.QueueClient", "Create", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.QueueClient", "Create", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreatePreparer prepares the Create request.
+func (client QueueClient) CreatePreparer(ctx context.Context, resourceGroupName string, accountName string, queueName string, queue Queue) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "queueName": autorest.Encode("path", queueName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/queueServices/default/queues/{queueName}", pathParameters),
+ autorest.WithJSON(queue),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateSender sends the Create request. The method will close the
+// http.Response Body if it receives an error.
+func (client QueueClient) CreateSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateResponder handles the response to the Create request. The method always
+// closes the http.Response Body.
+func (client QueueClient) CreateResponder(resp *http.Response) (result Queue, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete deletes the queue with the specified queue name, under the specified account if it exists.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - the name of the storage account within the specified resource group. Storage account names
+// must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+// queueName - a queue name must be unique within a storage account and must be between 3 and 63 characters.The
+// name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an
+// alphanumeric character and it cannot have two consecutive dash(-) characters.
+func (client QueueClient) Delete(ctx context.Context, resourceGroupName string, accountName string, queueName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/QueueClient.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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: queueName,
+ Constraints: []validation.Constraint{{Target: "queueName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "queueName", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.QueueClient", "Delete", err.Error())
+ }
+
+ req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, queueName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.QueueClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "storage.QueueClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.QueueClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client QueueClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string, queueName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "queueName": autorest.Encode("path", queueName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/queueServices/default/queues/{queueName}", 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 QueueClient) 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 QueueClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get gets the queue with the specified queue name, under the specified account if it exists.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - the name of the storage account within the specified resource group. Storage account names
+// must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+// queueName - a queue name must be unique within a storage account and must be between 3 and 63 characters.The
+// name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an
+// alphanumeric character and it cannot have two consecutive dash(-) characters.
+func (client QueueClient) Get(ctx context.Context, resourceGroupName string, accountName string, queueName string) (result Queue, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/QueueClient.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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: queueName,
+ Constraints: []validation.Constraint{{Target: "queueName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "queueName", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.QueueClient", "Get", err.Error())
+ }
+
+ req, err := client.GetPreparer(ctx, resourceGroupName, accountName, queueName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.QueueClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.QueueClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.QueueClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client QueueClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, queueName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "queueName": autorest.Encode("path", queueName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/queueServices/default/queues/{queueName}", 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 QueueClient) 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 QueueClient) GetResponder(resp *http.Response) (result Queue, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List gets a list of all the queues under the specified storage account
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - the name of the storage account within the specified resource group. Storage account names
+// must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+// maxpagesize - optional, a maximum number of queues that should be included in a list queue response
+// filter - optional, When specified, only the queues with a name starting with the given filter will be
+// listed.
+func (client QueueClient) List(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string) (result ListQueueResourcePage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/QueueClient.List")
+ defer func() {
+ sc := -1
+ if result.lqr.Response.Response != nil {
+ sc = result.lqr.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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.QueueClient", "List", err.Error())
+ }
+
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName, accountName, maxpagesize, filter)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.QueueClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.lqr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.QueueClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.lqr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.QueueClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client QueueClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(maxpagesize) > 0 {
+ queryParameters["$maxpagesize"] = autorest.Encode("query", maxpagesize)
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default/queues", 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 QueueClient) 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 QueueClient) ListResponder(resp *http.Response) (result ListQueueResource, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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 QueueClient) listNextResults(ctx context.Context, lastResults ListQueueResource) (result ListQueueResource, err error) {
+ req, err := lastResults.listQueueResourcePreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "storage.QueueClient", "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, "storage.QueueClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.QueueClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client QueueClient) ListComplete(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string) (result ListQueueResourceIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/QueueClient.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, accountName, maxpagesize, filter)
+ return
+}
+
+// Update creates a new queue with the specified queue name, under the specified account.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - the name of the storage account within the specified resource group. Storage account names
+// must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+// queueName - a queue name must be unique within a storage account and must be between 3 and 63 characters.The
+// name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an
+// alphanumeric character and it cannot have two consecutive dash(-) characters.
+// queue - queue properties and metadata to be created with
+func (client QueueClient) Update(ctx context.Context, resourceGroupName string, accountName string, queueName string, queue Queue) (result Queue, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/QueueClient.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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: queueName,
+ Constraints: []validation.Constraint{{Target: "queueName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "queueName", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.QueueClient", "Update", err.Error())
+ }
+
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, accountName, queueName, queue)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.QueueClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.QueueClient", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.QueueClient", "Update", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client QueueClient) UpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, queueName string, queue Queue) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "queueName": autorest.Encode("path", queueName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/queueServices/default/queues/{queueName}", pathParameters),
+ autorest.WithJSON(queue),
+ 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 QueueClient) 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 QueueClient) UpdateResponder(resp *http.Response) (result Queue, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/storage/mgmt/2019-06-01/storage/queueservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/queueservices.go
new file mode 100644
index 000000000..100131162
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/queueservices.go
@@ -0,0 +1,324 @@
+package storage
+
+// 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"
+)
+
+// QueueServicesClient is the the Azure Storage Management API.
+type QueueServicesClient struct {
+ BaseClient
+}
+
+// NewQueueServicesClient creates an instance of the QueueServicesClient client.
+func NewQueueServicesClient(subscriptionID string) QueueServicesClient {
+ return NewQueueServicesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewQueueServicesClientWithBaseURI creates an instance of the QueueServicesClient 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 NewQueueServicesClientWithBaseURI(baseURI string, subscriptionID string) QueueServicesClient {
+ return QueueServicesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// GetServiceProperties gets the properties of a storage account’s Queue service, including properties for Storage
+// Analytics and CORS (Cross-Origin Resource Sharing) rules.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - the name of the storage account within the specified resource group. Storage account names
+// must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+func (client QueueServicesClient) GetServiceProperties(ctx context.Context, resourceGroupName string, accountName string) (result QueueServiceProperties, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/QueueServicesClient.GetServiceProperties")
+ 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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.QueueServicesClient", "GetServiceProperties", err.Error())
+ }
+
+ req, err := client.GetServicePropertiesPreparer(ctx, resourceGroupName, accountName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.QueueServicesClient", "GetServiceProperties", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetServicePropertiesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.QueueServicesClient", "GetServiceProperties", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetServicePropertiesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.QueueServicesClient", "GetServiceProperties", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetServicePropertiesPreparer prepares the GetServiceProperties request.
+func (client QueueServicesClient) GetServicePropertiesPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "queueServiceName": autorest.Encode("path", "default"),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/queueServices/{queueServiceName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetServicePropertiesSender sends the GetServiceProperties request. The method will close the
+// http.Response Body if it receives an error.
+func (client QueueServicesClient) GetServicePropertiesSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetServicePropertiesResponder handles the response to the GetServiceProperties request. The method always
+// closes the http.Response Body.
+func (client QueueServicesClient) GetServicePropertiesResponder(resp *http.Response) (result QueueServiceProperties, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List list all queue services for the storage account
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - the name of the storage account within the specified resource group. Storage account names
+// must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+func (client QueueServicesClient) List(ctx context.Context, resourceGroupName string, accountName string) (result ListQueueServices, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/QueueServicesClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}},
+ {TargetValue: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.QueueServicesClient", "List", err.Error())
+ }
+
+ req, err := client.ListPreparer(ctx, resourceGroupName, accountName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.QueueServicesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.QueueServicesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.QueueServicesClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client QueueServicesClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/queueServices", 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 QueueServicesClient) 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 QueueServicesClient) ListResponder(resp *http.Response) (result ListQueueServices, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// SetServiceProperties sets the properties of a storage account’s Queue service, including properties for Storage
+// Analytics and CORS (Cross-Origin Resource Sharing) rules.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - the name of the storage account within the specified resource group. Storage account names
+// must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+// parameters - the properties of a storage account’s Queue service, only properties for Storage Analytics and
+// CORS (Cross-Origin Resource Sharing) rules can be specified.
+func (client QueueServicesClient) SetServiceProperties(ctx context.Context, resourceGroupName string, accountName string, parameters QueueServiceProperties) (result QueueServiceProperties, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/QueueServicesClient.SetServiceProperties")
+ 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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.QueueServicesClient", "SetServiceProperties", err.Error())
+ }
+
+ req, err := client.SetServicePropertiesPreparer(ctx, resourceGroupName, accountName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.QueueServicesClient", "SetServiceProperties", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.SetServicePropertiesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.QueueServicesClient", "SetServiceProperties", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.SetServicePropertiesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.QueueServicesClient", "SetServiceProperties", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// SetServicePropertiesPreparer prepares the SetServiceProperties request.
+func (client QueueServicesClient) SetServicePropertiesPreparer(ctx context.Context, resourceGroupName string, accountName string, parameters QueueServiceProperties) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "queueServiceName": autorest.Encode("path", "default"),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/queueServices/{queueServiceName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// SetServicePropertiesSender sends the SetServiceProperties request. The method will close the
+// http.Response Body if it receives an error.
+func (client QueueServicesClient) SetServicePropertiesSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// SetServicePropertiesResponder handles the response to the SetServiceProperties request. The method always
+// closes the http.Response Body.
+func (client QueueServicesClient) SetServicePropertiesResponder(resp *http.Response) (result QueueServiceProperties, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/storage/mgmt/2019-06-01/storage/skus.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/skus.go
index db346f8fb..a207bb305 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/skus.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/skus.go
@@ -36,7 +36,8 @@ func NewSkusClient(subscriptionID string) SkusClient {
return NewSkusClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewSkusClientWithBaseURI creates an instance of the SkusClient client.
+// NewSkusClientWithBaseURI creates an instance of the SkusClient 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 NewSkusClientWithBaseURI(baseURI string, subscriptionID string) SkusClient {
return SkusClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -102,8 +103,7 @@ func (client SkusClient) ListPreparer(ctx context.Context) (*http.Request, error
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client SkusClient) ListSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/table.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/table.go
new file mode 100644
index 000000000..c484e3758
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/table.go
@@ -0,0 +1,563 @@
+package storage
+
+// 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"
+)
+
+// TableClient is the the Azure Storage Management API.
+type TableClient struct {
+ BaseClient
+}
+
+// NewTableClient creates an instance of the TableClient client.
+func NewTableClient(subscriptionID string) TableClient {
+ return NewTableClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewTableClientWithBaseURI creates an instance of the TableClient 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 NewTableClientWithBaseURI(baseURI string, subscriptionID string) TableClient {
+ return TableClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Create creates a new table with the specified table name, under the specified account.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - the name of the storage account within the specified resource group. Storage account names
+// must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+// tableName - a table name must be unique within a storage account and must be between 3 and 63 characters.The
+// name must comprise of only alphanumeric characters and it cannot begin with a numeric character.
+func (client TableClient) Create(ctx context.Context, resourceGroupName string, accountName string, tableName string) (result Table, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TableClient.Create")
+ 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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: tableName,
+ Constraints: []validation.Constraint{{Target: "tableName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "tableName", Name: validation.MinLength, Rule: 3, Chain: nil},
+ {Target: "tableName", Name: validation.Pattern, Rule: `^[A-Za-z][A-Za-z0-9]{2,62}$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.TableClient", "Create", err.Error())
+ }
+
+ req, err := client.CreatePreparer(ctx, resourceGroupName, accountName, tableName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.TableClient", "Create", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.TableClient", "Create", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.TableClient", "Create", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// CreatePreparer prepares the Create request.
+func (client TableClient) CreatePreparer(ctx context.Context, resourceGroupName string, accountName string, tableName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "tableName": autorest.Encode("path", tableName),
+ }
+
+ const APIVersion = "2019-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables/{tableName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateSender sends the Create request. The method will close the
+// http.Response Body if it receives an error.
+func (client TableClient) CreateSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateResponder handles the response to the Create request. The method always
+// closes the http.Response Body.
+func (client TableClient) CreateResponder(resp *http.Response) (result Table, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete deletes the table with the specified table name, under the specified account if it exists.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - the name of the storage account within the specified resource group. Storage account names
+// must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+// tableName - a table name must be unique within a storage account and must be between 3 and 63 characters.The
+// name must comprise of only alphanumeric characters and it cannot begin with a numeric character.
+func (client TableClient) Delete(ctx context.Context, resourceGroupName string, accountName string, tableName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TableClient.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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: tableName,
+ Constraints: []validation.Constraint{{Target: "tableName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "tableName", Name: validation.MinLength, Rule: 3, Chain: nil},
+ {Target: "tableName", Name: validation.Pattern, Rule: `^[A-Za-z][A-Za-z0-9]{2,62}$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.TableClient", "Delete", err.Error())
+ }
+
+ req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, tableName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.TableClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "storage.TableClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.TableClient", "Delete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client TableClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string, tableName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "tableName": autorest.Encode("path", tableName),
+ }
+
+ const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/tableServices/default/tables/{tableName}", 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 TableClient) 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 TableClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get gets the table with the specified table name, under the specified account if it exists.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - the name of the storage account within the specified resource group. Storage account names
+// must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+// tableName - a table name must be unique within a storage account and must be between 3 and 63 characters.The
+// name must comprise of only alphanumeric characters and it cannot begin with a numeric character.
+func (client TableClient) Get(ctx context.Context, resourceGroupName string, accountName string, tableName string) (result Table, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TableClient.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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: tableName,
+ Constraints: []validation.Constraint{{Target: "tableName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "tableName", Name: validation.MinLength, Rule: 3, Chain: nil},
+ {Target: "tableName", Name: validation.Pattern, Rule: `^[A-Za-z][A-Za-z0-9]{2,62}$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.TableClient", "Get", err.Error())
+ }
+
+ req, err := client.GetPreparer(ctx, resourceGroupName, accountName, tableName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.TableClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.TableClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.TableClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client TableClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, tableName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "tableName": autorest.Encode("path", tableName),
+ }
+
+ const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/tableServices/default/tables/{tableName}", 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 TableClient) 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 TableClient) GetResponder(resp *http.Response) (result Table, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List gets a list of all the tables under the specified storage account
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - the name of the storage account within the specified resource group. Storage account names
+// must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+func (client TableClient) List(ctx context.Context, resourceGroupName string, accountName string) (result ListTableResourcePage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TableClient.List")
+ defer func() {
+ sc := -1
+ if result.ltr.Response.Response != nil {
+ sc = result.ltr.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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.TableClient", "List", err.Error())
+ }
+
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName, accountName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.TableClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.ltr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.TableClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.ltr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.TableClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client TableClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/tableServices/default/tables", 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 TableClient) 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 TableClient) ListResponder(resp *http.Response) (result ListTableResource, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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 TableClient) listNextResults(ctx context.Context, lastResults ListTableResource) (result ListTableResource, err error) {
+ req, err := lastResults.listTableResourcePreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "storage.TableClient", "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, "storage.TableClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.TableClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client TableClient) ListComplete(ctx context.Context, resourceGroupName string, accountName string) (result ListTableResourceIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TableClient.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, accountName)
+ return
+}
+
+// Update creates a new table with the specified table name, under the specified account.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - the name of the storage account within the specified resource group. Storage account names
+// must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+// tableName - a table name must be unique within a storage account and must be between 3 and 63 characters.The
+// name must comprise of only alphanumeric characters and it cannot begin with a numeric character.
+func (client TableClient) Update(ctx context.Context, resourceGroupName string, accountName string, tableName string) (result Table, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TableClient.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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: tableName,
+ Constraints: []validation.Constraint{{Target: "tableName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "tableName", Name: validation.MinLength, Rule: 3, Chain: nil},
+ {Target: "tableName", Name: validation.Pattern, Rule: `^[A-Za-z][A-Za-z0-9]{2,62}$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.TableClient", "Update", err.Error())
+ }
+
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, accountName, tableName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.TableClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.TableClient", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.TableClient", "Update", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client TableClient) UpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, tableName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "tableName": autorest.Encode("path", tableName),
+ }
+
+ const APIVersion = "2019-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables/{tableName}", pathParameters),
+ 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 TableClient) 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 TableClient) UpdateResponder(resp *http.Response) (result Table, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/storage/mgmt/2019-06-01/storage/tableservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/tableservices.go
new file mode 100644
index 000000000..371904a22
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/tableservices.go
@@ -0,0 +1,324 @@
+package storage
+
+// 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"
+)
+
+// TableServicesClient is the the Azure Storage Management API.
+type TableServicesClient struct {
+ BaseClient
+}
+
+// NewTableServicesClient creates an instance of the TableServicesClient client.
+func NewTableServicesClient(subscriptionID string) TableServicesClient {
+ return NewTableServicesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewTableServicesClientWithBaseURI creates an instance of the TableServicesClient 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 NewTableServicesClientWithBaseURI(baseURI string, subscriptionID string) TableServicesClient {
+ return TableServicesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// GetServiceProperties gets the properties of a storage account’s Table service, including properties for Storage
+// Analytics and CORS (Cross-Origin Resource Sharing) rules.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - the name of the storage account within the specified resource group. Storage account names
+// must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+func (client TableServicesClient) GetServiceProperties(ctx context.Context, resourceGroupName string, accountName string) (result TableServiceProperties, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TableServicesClient.GetServiceProperties")
+ 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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.TableServicesClient", "GetServiceProperties", err.Error())
+ }
+
+ req, err := client.GetServicePropertiesPreparer(ctx, resourceGroupName, accountName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.TableServicesClient", "GetServiceProperties", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetServicePropertiesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.TableServicesClient", "GetServiceProperties", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetServicePropertiesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.TableServicesClient", "GetServiceProperties", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetServicePropertiesPreparer prepares the GetServiceProperties request.
+func (client TableServicesClient) GetServicePropertiesPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "tableServiceName": autorest.Encode("path", "default"),
+ }
+
+ const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/tableServices/{tableServiceName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetServicePropertiesSender sends the GetServiceProperties request. The method will close the
+// http.Response Body if it receives an error.
+func (client TableServicesClient) GetServicePropertiesSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetServicePropertiesResponder handles the response to the GetServiceProperties request. The method always
+// closes the http.Response Body.
+func (client TableServicesClient) GetServicePropertiesResponder(resp *http.Response) (result TableServiceProperties, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List list all table services for the storage account.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - the name of the storage account within the specified resource group. Storage account names
+// must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+func (client TableServicesClient) List(ctx context.Context, resourceGroupName string, accountName string) (result ListTableServices, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TableServicesClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}},
+ {TargetValue: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.TableServicesClient", "List", err.Error())
+ }
+
+ req, err := client.ListPreparer(ctx, resourceGroupName, accountName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.TableServicesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.TableServicesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.TableServicesClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client TableServicesClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/tableServices", 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 TableServicesClient) 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 TableServicesClient) ListResponder(resp *http.Response) (result ListTableServices, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// SetServiceProperties sets the properties of a storage account’s Table service, including properties for Storage
+// Analytics and CORS (Cross-Origin Resource Sharing) rules.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// accountName - the name of the storage account within the specified resource group. Storage account names
+// must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+// parameters - the properties of a storage account’s Table service, only properties for Storage Analytics and
+// CORS (Cross-Origin Resource Sharing) rules can be specified.
+func (client TableServicesClient) SetServiceProperties(ctx context.Context, resourceGroupName string, accountName string, parameters TableServiceProperties) (result TableServiceProperties, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TableServicesClient.SetServiceProperties")
+ 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: accountName,
+ Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
+ {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("storage.TableServicesClient", "SetServiceProperties", err.Error())
+ }
+
+ req, err := client.SetServicePropertiesPreparer(ctx, resourceGroupName, accountName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.TableServicesClient", "SetServiceProperties", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.SetServicePropertiesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "storage.TableServicesClient", "SetServiceProperties", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.SetServicePropertiesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "storage.TableServicesClient", "SetServiceProperties", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// SetServicePropertiesPreparer prepares the SetServiceProperties request.
+func (client TableServicesClient) SetServicePropertiesPreparer(ctx context.Context, resourceGroupName string, accountName string, parameters TableServiceProperties) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "accountName": autorest.Encode("path", accountName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "tableServiceName": autorest.Encode("path", "default"),
+ }
+
+ const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/tableServices/{tableServiceName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// SetServicePropertiesSender sends the SetServiceProperties request. The method will close the
+// http.Response Body if it receives an error.
+func (client TableServicesClient) SetServicePropertiesSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// SetServicePropertiesResponder handles the response to the SetServiceProperties request. The method always
+// closes the http.Response Body.
+func (client TableServicesClient) SetServicePropertiesResponder(resp *http.Response) (result TableServiceProperties, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ 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/storage/mgmt/2019-06-01/storage/usages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/usages.go
index 60d0d4bdc..bea70e107 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/usages.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/usages.go
@@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient {
return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
-// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client.
+// NewUsagesClientWithBaseURI creates an instance of the UsagesClient 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 NewUsagesClientWithBaseURI(baseURI string, subscriptionID string) UsagesClient {
return UsagesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
@@ -105,8 +106,7 @@ func (client UsagesClient) ListByLocationPreparer(ctx context.Context, location
// ListByLocationSender sends the ListByLocation request. The method will close the
// http.Response Body if it receives an error.
func (client UsagesClient) ListByLocationSender(req *http.Request) (*http.Response, error) {
- sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
- return autorest.SendWithSender(client, req, sd...)
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByLocationResponder handles the response to the ListByLocation request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/version.go
index 7f2a6a743..78053be11 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/version.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/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.Number + " storage/2019-06-01"
+ return "Azure-SDK-For-Go/" + Version() + " storage/2019-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/storage/blob.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/blob.go
index 1d2248625..0b02e52bd 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/storage/blob.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/blob.go
@@ -566,7 +566,7 @@ type DeleteBlobOptions struct {
}
// Delete deletes the given blob from the specified container.
-// If the blob does not exists at the time of the Delete Blob operation, it
+// If the blob does not exist at the time of the Delete Blob operation, it
// returns error.
// See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Delete-Blob
func (b *Blob) Delete(options *DeleteBlobOptions) error {
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/client.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/client.go
index 99702effe..98ca9bbaa 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/storage/client.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/client.go
@@ -141,15 +141,16 @@ type Client struct {
// automatic retry strategy built in. The Sender can be customized.
Sender Sender
- accountName string
- accountKey []byte
- useHTTPS bool
- UseSharedKeyLite bool
- baseURL string
- apiVersion string
- userAgent string
- sasClient bool
- accountSASToken url.Values
+ accountName string
+ accountKey []byte
+ useHTTPS bool
+ UseSharedKeyLite bool
+ baseURL string
+ apiVersion string
+ userAgent string
+ sasClient bool
+ accountSASToken url.Values
+ additionalHeaders map[string]string
}
type odataResponse struct {
@@ -432,6 +433,16 @@ func (c *Client) AddToUserAgent(extension string) error {
return fmt.Errorf("Extension was empty, User Agent stayed as %s", c.userAgent)
}
+// AddAdditionalHeaders adds additional standard headers
+func (c *Client) AddAdditionalHeaders(headers map[string]string) {
+ if headers != nil {
+ c.additionalHeaders = map[string]string{}
+ for k, v := range headers {
+ c.additionalHeaders[k] = v
+ }
+ }
+}
+
// protectUserAgent is used in funcs that include extraheaders as a parameter.
// It prevents the User-Agent header to be overwritten, instead if it happens to
// be present, it gets added to the current User-Agent. Use it before getStandardHeaders
@@ -696,11 +707,16 @@ func (c Client) GetFileService() FileServiceClient {
}
func (c Client) getStandardHeaders() map[string]string {
- return map[string]string{
- userAgentHeader: c.userAgent,
- "x-ms-version": c.apiVersion,
- "x-ms-date": currentTimeRfc1123Formatted(),
+ headers := map[string]string{}
+ for k, v := range c.additionalHeaders {
+ headers[k] = v
}
+
+ headers[userAgentHeader] = c.userAgent
+ headers["x-ms-version"] = c.apiVersion
+ headers["x-ms-date"] = currentTimeRfc1123Formatted()
+
+ return headers
}
func (c Client) exec(verb, url string, headers map[string]string, body io.Reader, auth authentication) (*http.Response, error) {
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/directory.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/directory.go
index 2e805e7df..6c0c6caf7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/storage/directory.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/directory.go
@@ -94,7 +94,7 @@ func (d *Directory) Create(options *FileRequestOptions) error {
}
// CreateIfNotExists creates this directory under the associated share if the
-// directory does not exists. Returns true if the directory is newly created or
+// directory does not exist. Returns true if the directory is newly created or
// false if the directory already exists.
//
// See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Create-Directory
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/entity.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/entity.go
index 385253527..07dc0df1f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/storage/entity.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/entity.go
@@ -207,7 +207,7 @@ func (e *Entity) Delete(force bool, options *EntityOptions) error {
uri := e.Table.tsc.client.getEndpoint(tableServiceName, e.buildPath(), query)
resp, err := e.Table.tsc.client.exec(http.MethodDelete, uri, headers, nil, e.Table.tsc.auth)
if err != nil {
- if resp.StatusCode == http.StatusPreconditionFailed {
+ if resp != nil && resp.StatusCode == http.StatusPreconditionFailed {
return fmt.Errorf(etagErrorTemplate, err)
}
return err
@@ -234,7 +234,7 @@ func (e *Entity) InsertOrMerge(options *EntityOptions) error {
}
func (e *Entity) buildPath() string {
- return fmt.Sprintf("%s(PartitionKey='%s', RowKey='%s')", e.Table.buildPath(), e.PartitionKey, e.RowKey)
+ return fmt.Sprintf("%s(PartitionKey='%s',RowKey='%s')", e.Table.buildPath(), e.PartitionKey, e.RowKey)
}
// MarshalJSON is a custom marshaller for entity
@@ -433,7 +433,7 @@ func (e *Entity) updateMerge(force bool, verb string, options *EntityOptions) er
uri := e.Table.tsc.client.getEndpoint(tableServiceName, e.buildPath(), query)
resp, err := e.Table.tsc.client.exec(verb, uri, headers, bytes.NewReader(body), e.Table.tsc.auth)
if err != nil {
- if resp.StatusCode == http.StatusPreconditionFailed {
+ if resp != nil && resp.StatusCode == http.StatusPreconditionFailed {
return fmt.Errorf(etagErrorTemplate, err)
}
return err
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 38c89d8f8..ae1ef97e1 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 = "v35.0.0"
+const Number = "v43.0.0"
diff --git a/vendor/github.com/Azure/go-autorest/.gitignore b/vendor/github.com/Azure/go-autorest/.gitignore
new file mode 100644
index 000000000..3350aaf70
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/.gitignore
@@ -0,0 +1,32 @@
+# The standard Go .gitignore file follows. (Sourced from: github.com/github/gitignore/master/Go.gitignore)
+# Compiled Object files, Static and Dynamic libs (Shared Objects)
+*.o
+*.a
+*.so
+
+# Folders
+_obj
+_test
+.DS_Store
+.idea/
+.vscode/
+
+# Architecture specific extensions/prefixes
+*.[568vq]
+[568vq].out
+
+*.cgo1.go
+*.cgo2.c
+_cgo_defun.c
+_cgo_gotypes.go
+_cgo_export.*
+
+_testmain.go
+
+*.exe
+*.test
+*.prof
+
+# go-autorest specific
+vendor/
+autorest/azure/example/example
diff --git a/vendor/github.com/Azure/go-autorest/CHANGELOG.md b/vendor/github.com/Azure/go-autorest/CHANGELOG.md
new file mode 100644
index 000000000..d1f596bfc
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/CHANGELOG.md
@@ -0,0 +1,1004 @@
+# CHANGELOG
+
+## v14.2.0
+
+- Added package comment to make `github.com/Azure/go-autorest` importable.
+
+## v14.1.1
+
+### Bug Fixes
+
+- Change `x-ms-authorization-auxiliary` header value separator to comma.
+
+## v14.1.0
+
+### New Features
+
+- Added `azure.SetEnvironment()` that will update the global environments map with the specified values.
+
+## v14.0.1
+
+### Bug Fixes
+
+- Fix race condition when refreshing token.
+- Fixed some tests to work with Go 1.14.
+
+## v14.0.0
+
+## Breaking Changes
+
+- By default, the `DoRetryForStatusCodes` functions will no longer infinitely retry a request when the response returns an HTTP status code of 429 (StatusTooManyRequests). To opt in to the old behavior set `autorest.Count429AsRetry` to `false`.
+
+## New Features
+
+- Variable `autorest.Max429Delay` can be used to control the maximum delay between retries when a 429 is received with no `Retry-After` header. The default is zero which means there is no cap.
+
+## v13.4.0
+
+## New Features
+
+- Added field `SendDecorators` to the `Client` type. This can be used to specify a custom chain of SendDecorators per client.
+- Added method `Client.Send()` which includes logic for selecting the preferred chain of SendDecorators.
+
+## v13.3.3
+
+### Bug Fixes
+
+- Fixed connection leak when retrying requests.
+- Enabled exponential back-off with a 2-minute cap when retrying on 429.
+- Fixed some cases where errors were inadvertently dropped.
+
+## v13.3.2
+
+### Bug Fixes
+
+- Updated `autorest.AsStringSlice()` to convert slice elements to their string representation.
+
+## v13.3.1
+
+- Updated external dependencies.
+
+### Bug Fixes
+
+## v13.3.0
+
+### New Features
+
+- Added support for shared key and shared access signature token authorization.
+ - `autorest.NewSharedKeyAuthorizer()` and dependent types.
+ - `autorest.NewSASTokenAuthorizer()` and dependent types.
+- Added `ServicePrincipalToken.SetCustomRefresh()` so a custom refresh function can be invoked when a token has expired.
+
+### Bug Fixes
+
+- Fixed `cli.AccessTokensPath()` to respect `AZURE_CONFIG_DIR` when set.
+- Support parsing error messages in XML responses.
+
+## v13.2.0
+
+### New Features
+
+- Added the following functions to replace their versions that don't take a context.
+ - `adal.InitiateDeviceAuthWithContext()`
+ - `adal.CheckForUserCompletionWithContext()`
+ - `adal.WaitForUserCompletionWithContext()`
+
+## v13.1.0
+
+### New Features
+
+- Added support for MSI authentication on Azure App Service and Azure Functions.
+
+## v13.0.2
+
+### Bug Fixes
+
+- Always retry a request even if the sender returns a non-nil error.
+
+## v13.0.1
+
+## Bug Fixes
+
+- Fixed `autorest.WithQueryParameters()` so that it properly encodes multi-value query parameters.
+
+## v13.0.0
+
+## Breaking Changes
+
+The `tracing` package has been rewritten to provide a common interface for consumers to wire in the tracing package of their choice.
+What this means is that by default no tracing provider will be compiled into your program and setting the `AZURE_SDK_TRACING_ENABLED`
+environment variable will have no effect. To enable this previous behavior you must now add the following import to your source file.
+```go
+ import _ "github.com/Azure/go-autorest/tracing/opencensus"
+```
+The APIs required by autorest-generated code have remained but some APIs have been removed and new ones added.
+The following APIs and variables have been removed (the majority of them were moved to the `opencensus` package).
+- tracing.Transport
+- tracing.Enable()
+- tracing.EnableWithAIForwarding()
+- tracing.Disable()
+
+The following APIs and types have been added
+- tracing.Tracer
+- tracing.Register()
+
+To hook up a tracer simply call `tracing.Register()` passing in a type that satisfies the `tracing.Tracer` interface.
+
+## v12.4.3
+
+### Bug Fixes
+
+- `autorest.MultiTenantServicePrincipalTokenAuthorizer` will now properly add its auxiliary bearer tokens.
+
+## v12.4.2
+
+### Bug Fixes
+
+- Improvements to the fixes made in v12.4.1.
+ - Remove `override` stanza from Gopkg.toml and `replace` directive from go.mod as they don't apply when being consumed as a dependency.
+ - Switched to latest version of `ocagent` that still depends on protobuf v1.2.
+ - Add indirect dependencies to the `required` clause with matching `constraint` stanzas so that `dep` dependencies match go.sum.
+
+## v12.4.1
+
+### Bug Fixes
+
+- Updated OpenCensus and OCAgent versions to versions that don't depend on v1.3+ of protobuf as it was breaking kubernetes.
+- Pinned opencensus-proto to a version that's compatible with our versions of OpenCensus and OCAgent.
+
+## v12.4.0
+
+### New Features
+
+- Added `autorest.WithPrepareDecorators` and `autorest.GetPrepareDecorators` for adding and retrieving a custom chain of PrepareDecorators to the provided context.
+
+## v12.3.0
+
+### New Features
+
+- Support for multi-tenant via x-ms-authorization-auxiliary header has been added for client credentials with
+ secret scenario; this basically bundles multiple OAuthConfig and ServicePrincipalToken types into corresponding
+ MultiTenant* types along with a new authorizer that adds the primary and auxiliary token headers to the reqest.
+ The authenticaion helpers have been updated to support this scenario; if environment var AZURE_AUXILIARY_TENANT_IDS
+ is set with a semicolon delimited list of tenants the multi-tenant codepath will kick in to create the appropriate authorizer.
+ See `adal.NewMultiTenantOAuthConfig`, `adal.NewMultiTenantServicePrincipalToken` and `autorest.NewMultiTenantServicePrincipalTokenAuthorizer`
+ along with their supporting types and methods.
+- Added `autorest.WithSendDecorators` and `autorest.GetSendDecorators` for adding and retrieving a custom chain of SendDecorators to the provided context.
+- Added `autorest.DoRetryForStatusCodesWithCap` and `autorest.DelayForBackoffWithCap` to enforce an upper bound on the duration between retries.
+
+## v12.2.0
+
+### New Features
+
+- Added `autorest.WithXML`, `autorest.AsMerge`, `autorest.WithBytes` preparer decorators.
+- Added `autorest.ByUnmarshallingBytes` response decorator.
+- Added `Response.IsHTTPStatus` and `Response.HasHTTPStatus` helper methods for inspecting HTTP status code in `autorest.Response` types.
+
+### Bug Fixes
+
+- `autorest.DelayWithRetryAfter` now supports HTTP-Dates in the `Retry-After` header and is not limited to just 429 status codes.
+
+## v12.1.0
+
+### New Features
+
+- Added `to.ByteSlicePtr()`.
+- Added blob/queue storage resource ID to `azure.ResourceIdentifier`.
+
+## v12.0.0
+
+### Breaking Changes
+
+In preparation for modules the following deprecated content has been removed.
+
+ - async.NewFuture()
+ - async.Future.Done()
+ - async.Future.WaitForCompletion()
+ - async.DoPollForAsynchronous()
+ - The `utils` package
+ - validation.NewErrorWithValidationError()
+ - The `version` package
+
+## v11.9.0
+
+### New Features
+
+- Add `ResourceIdentifiers` field to `azure.Environment` containing resource IDs for public and sovereign clouds.
+
+## v11.8.0
+
+### New Features
+
+- Added `autorest.NewClientWithOptions()` to support endpoints that require free renegotiation.
+
+## v11.7.1
+
+### Bug Fixes
+
+- Fix missing support for http(s) proxy when using the default sender.
+
+## v11.7.0
+
+### New Features
+
+- Added methods to obtain a ServicePrincipalToken on the various credential configuration types in the `auth` package.
+
+## v11.6.1
+
+### Bug Fixes
+
+- Fix ACR DNS endpoint for government clouds.
+- Add Cosmos DB DNS endpoints.
+- Update dependencies to resolve build breaks in OpenCensus.
+
+## v11.6.0
+
+### New Features
+
+- Added type `autorest.BasicAuthorizer` to support Basic authentication.
+
+## v11.5.2
+
+### Bug Fixes
+
+- Fixed `GetTokenFromCLI` did not work with zsh.
+
+## v11.5.1
+
+### Bug Fixes
+
+- In `Client.sender()` set the minimum TLS version on HTTP clients to 1.2.
+
+## v11.5.0
+
+### New Features
+
+- The `auth` package has been refactored so that the environment and file settings are now available.
+- The methods used in `auth.NewAuthorizerFromEnvironment()` are now exported so that custom authorization chains can be created.
+- Added support for certificate authorization for file-based config.
+
+## v11.4.0
+
+### New Features
+
+- Added `adal.AddToUserAgent()` so callers can append custom data to the user-agent header used for ADAL requests.
+- Exported `adal.UserAgent()` for parity with `autorest.Client`.
+
+## v11.3.2
+
+### Bug Fixes
+
+- In `Future.WaitForCompletionRef()` if the provided context has a deadline don't add the default deadline.
+
+## v11.3.1
+
+### Bug Fixes
+
+- For an LRO PUT operation the final GET URL was incorrectly set to the Location polling header in some cases.
+
+## v11.3.0
+
+### New Features
+
+- Added method `ServicePrincipalToken()` to `DeviceFlowConfig` type.
+
+## v11.2.8
+
+### Bug Fixes
+
+- Deprecate content in the `version` package. The functionality has been superseded by content in the `autorest` package.
+
+## v11.2.7
+
+### Bug Fixes
+
+- Fix environment variable name for enabling tracing from `AZURE_SDK_TRACING_ENABELD` to `AZURE_SDK_TRACING_ENABLED`.
+ Note that for backward compatibility reasons, both will work until the next major version release of the package.
+
+## v11.2.6
+
+### Bug Fixes
+
+- If zero bytes are read from a polling response body don't attempt to unmarshal them.
+
+## v11.2.5
+
+### Bug Fixes
+
+- Removed race condition in `autorest.DoRetryForStatusCodes`.
+
+## v11.2.4
+
+### Bug Fixes
+
+- Function `cli.ProfilePath` now respects environment `AZURE_CONFIG_DIR` if available.
+
+## v11.2.1
+
+NOTE: Versions of Go prior to 1.10 have been removed from CI as they no
+longer work with golint.
+
+### Bug Fixes
+
+- Method `MSIConfig.Authorizer` now supports user-assigned identities.
+- The adal package now reports its own user-agent string.
+
+## v11.2.0
+
+### New Features
+
+- Added `tracing` package that enables instrumentation of HTTP and API calls.
+ Setting the env variable `AZURE_SDK_TRACING_ENABLED` or calling `tracing.Enable`
+ will start instrumenting the code for metrics and traces.
+ Additionally, setting the env variable `OCAGENT_TRACE_EXPORTER_ENDPOINT` or
+ calling `tracing.EnableWithAIForwarding` will start the instrumentation and connect to an
+ App Insights Local Forwarder that is needs to be running. Note that if the
+ AI Local Forwarder is not running tracking will still be enabled.
+ By default, instrumentation is disabled. Once enabled, instrumentation can also
+ be programatically disabled by calling `Disable`.
+- Added `DoneWithContext` call for checking LRO status. `Done` has been deprecated.
+
+### Bug Fixes
+
+- Don't use the initial request's context for LRO polling.
+- Don't override the `refreshLock` and the `http.Client` when unmarshalling `ServicePrincipalToken` if
+ it is already set.
+
+## v11.1.1
+
+### Bug Fixes
+
+- When creating a future always include the polling tracker even if there's a failure; this allows the underlying response to be obtained by the caller.
+
+## v11.1.0
+
+### New Features
+
+- Added `auth.NewAuthorizerFromCLI` to create an authorizer configured from the Azure 2.0 CLI.
+- Added `adal.NewOAuthConfigWithAPIVersion` to create an OAuthConfig with the specified API version.
+
+## v11.0.1
+
+### New Features
+
+- Added `x5c` header to client assertion for certificate Issuer+Subject Name authentication.
+
+## v11.0.0
+
+### Breaking Changes
+
+- To handle differences between ADFS and AAD the following fields have had their types changed from `string` to `json.Number`
+ - ExpiresIn
+ - ExpiresOn
+ - NotBefore
+
+### New Features
+
+- Added `auth.NewAuthorizerFromFileWithResource` to create an authorizer from the config file with the specified resource.
+- Setting a client's `PollingDuration` to zero will use the provided context to control a LRO's polling duration.
+
+## v10.15.5
+
+### Bug Fixes
+
+- In `DoRetryForStatusCodes`, if a request's context is cancelled return the last response.
+
+## v10.15.4
+
+### Bug Fixes
+
+- If a polling operation returns a failure status code return the associated error.
+
+## v10.15.3
+
+### Bug Fixes
+
+- Initialize the polling URL and method for an LRO tracker on each iteration, favoring the Azure-AsyncOperation header.
+
+## v10.15.2
+
+### Bug Fixes
+
+- Use fmt.Fprint when printing request/response so that any escape sequences aren't treated as format specifiers.
+
+## v10.15.1
+
+### Bug Fixes
+
+- If an LRO API returns a `Failed` provisioning state in the initial response return an error at that point so the caller doesn't have to poll.
+- For failed LROs without an OData v4 error include the response body in the error's `AdditionalInfo` field to aid in diagnosing the failure.
+
+## v10.15.0
+
+### New Features
+
+- Add initial support for request/response logging via setting environment variables.
+ Setting `AZURE_GO_SDK_LOG_LEVEL` to `LogInfo` will log request/response
+ without their bodies. To include the bodies set the log level to `LogDebug`.
+ By default the logger writes to strerr, however it can also write to stdout or a file
+ if specified in `AZURE_GO_SDK_LOG_FILE`. Note that if the specified file
+ already exists it will be truncated.
+ IMPORTANT: by default the logger will redact the Authorization and Ocp-Apim-Subscription-Key
+ headers. Any other secrets will _not_ be redacted.
+
+## v10.14.0
+
+### New Features
+
+- Added package version that contains version constants and user-agent data.
+
+### Bug Fixes
+
+- Add the user-agent to token requests.
+
+## v10.13.0
+
+- Added support for additionalInfo in ServiceError type.
+
+## v10.12.0
+
+### New Features
+
+- Added field ServicePrincipalToken.MaxMSIRefreshAttempts to configure the maximun number of attempts to refresh an MSI token.
+
+## v10.11.4
+
+### Bug Fixes
+
+- If an LRO returns http.StatusOK on the initial response with no async headers return the response body from Future.GetResult().
+- If there is no "final GET URL" return an error from Future.GetResult().
+
+## v10.11.3
+
+### Bug Fixes
+
+- In IMDS retry logic, if we don't receive a response don't retry.
+ - Renamed the retry function so it's clear it's meant for IMDS only.
+- For error response bodies that aren't OData-v4 compliant stick the raw JSON in the ServiceError.Details field so the information isn't lost.
+ - Also add the raw HTTP response to the DetailedResponse.
+- Removed superfluous wrapping of response error in azure.DoRetryWithRegistration().
+
+## v10.11.2
+
+### Bug Fixes
+
+- Validation for integers handles int and int64 types.
+
+## v10.11.1
+
+### Bug Fixes
+
+- Adding User information to authorization config as parsed from CLI cache.
+
+## v10.11.0
+
+### New Features
+
+- Added NewServicePrincipalTokenFromManualTokenSecret for creating a new SPT using a manual token and secret
+- Added method ServicePrincipalToken.MarshalTokenJSON() to marshall the inner Token
+
+## v10.10.0
+
+### New Features
+
+- Most ServicePrincipalTokens can now be marshalled/unmarshall to/from JSON (ServicePrincipalCertificateSecret and ServicePrincipalMSISecret are not supported).
+- Added method ServicePrincipalToken.SetRefreshCallbacks().
+
+## v10.9.2
+
+### Bug Fixes
+
+- Refreshing a refresh token obtained from a web app authorization code now works.
+
+## v10.9.1
+
+### Bug Fixes
+
+- The retry logic for MSI token requests now uses exponential backoff per the guidelines.
+- IsTemporaryNetworkError() will return true for errors that don't implement the net.Error interface.
+
+## v10.9.0
+
+### Deprecated Methods
+
+| Old Method | New Method |
+| -------------------------: | :---------------------------: |
+| azure.NewFuture() | azure.NewFutureFromResponse() |
+| Future.WaitForCompletion() | Future.WaitForCompletionRef() |
+
+### New Features
+
+- Added azure.NewFutureFromResponse() for creating a Future from the initial response from an async operation.
+- Added Future.GetResult() for making the final GET call to retrieve the result from an async operation.
+
+### Bug Fixes
+
+- Some futures failed to return their results, this should now be fixed.
+
+## v10.8.2
+
+### Bug Fixes
+
+- Add nil-gaurd to token retry logic.
+
+## v10.8.1
+
+### Bug Fixes
+
+- Return a TokenRefreshError if the sender fails on the initial request.
+- Don't retry on non-temporary network errors.
+
+## v10.8.0
+
+- Added NewAuthorizerFromEnvironmentWithResource() helper function.
+
+## v10.7.0
+
+### New Features
+
+- Added \*WithContext() methods to ADAL token refresh operations.
+
+## v10.6.2
+
+- Fixed a bug on device authentication.
+
+## v10.6.1
+
+- Added retries to MSI token get request.
+
+## v10.6.0
+
+- Changed MSI token implementation. Now, the token endpoint is the IMDS endpoint.
+
+## v10.5.1
+
+### Bug Fixes
+
+- `DeviceFlowConfig.Authorizer()` now prints the device code message when running `go test`. `-v` flag is required.
+
+## v10.5.0
+
+### New Features
+
+- Added NewPollingRequestWithContext() for use with polling asynchronous operations.
+
+### Bug Fixes
+
+- Make retry logic use the request's context instead of the deprecated Cancel object.
+
+## v10.4.0
+
+### New Features
+
+- Added helper for parsing Azure Resource ID's.
+- Added deprecation message to utils.GetEnvVarOrExit()
+
+## v10.3.0
+
+### New Features
+
+- Added EnvironmentFromURL method to load an Environment from a given URL. This function is particularly useful in the private and hybrid Cloud model, where one may define their own endpoints
+- Added TokenAudience endpoint to Environment structure. This is useful in private and hybrid cloud models where TokenAudience endpoint can be different from ResourceManagerEndpoint
+
+## v10.2.0
+
+### New Features
+
+- Added endpoints for batch management.
+
+## v10.1.3
+
+### Bug Fixes
+
+- In Client.Do() invoke WithInspection() last so that it will inspect WithAuthorization().
+- Fixed authorization methods to invoke p.Prepare() first, aligning them with the other preparers.
+
+## v10.1.2
+
+- Corrected comment for auth.NewAuthorizerFromFile() function.
+
+## v10.1.1
+
+- Updated version number to match current release.
+
+## v10.1.0
+
+### New Features
+
+- Expose the polling URL for futures.
+
+### Bug Fixes
+
+- Add validation.NewErrorWithValidationError back to prevent breaking changes (it is deprecated).
+
+## v10.0.0
+
+### New Features
+
+- Added target and innererror fields to ServiceError to comply with OData v4 spec.
+- The Done() method on futures will now return a ServiceError object when available (it used to return a partial value of such errors).
+- Added helper methods for obtaining authorizers.
+- Expose the polling URL for futures.
+
+### Bug Fixes
+
+- Switched from glide to dep for dependency management.
+- Fixed unmarshaling of ServiceError for JSON bodies that don't conform to the OData spec.
+- Fixed a race condition in token refresh.
+
+### Breaking Changes
+
+- The ServiceError.Details field type has been changed to match the OData v4 spec.
+- Go v1.7 has been dropped from CI.
+- API parameter validation failures will now return a unique error type validation.Error.
+- The adal.Token type has been decomposed from adal.ServicePrincipalToken (this was necessary in order to fix the token refresh race).
+
+## v9.10.0
+
+- Fix the Service Bus suffix in Azure public env
+- Add Service Bus Endpoint (AAD ResourceURI) for use in [Azure Service Bus RBAC Preview](https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-role-based-access-control)
+
+## v9.9.0
+
+### New Features
+
+- Added EventGridKeyAuthorizer for key authorization with event grid topics.
+
+### Bug Fixes
+
+- Fixed race condition when auto-refreshing service principal tokens.
+
+## v9.8.1
+
+### Bug Fixes
+
+- Added http.StatusNoContent (204) to the list of expected status codes for long-running operations.
+- Updated runtime version info so it's current.
+
+## v9.8.0
+
+### New Features
+
+- Added type azure.AsyncOpIncompleteError to be returned from a future's Result() method when the operation has not completed.
+
+## v9.7.1
+
+### Bug Fixes
+
+- Use correct AAD and Graph endpoints for US Gov environment.
+
+## v9.7.0
+
+### New Features
+
+- Added support for application/octet-stream MIME types.
+
+## v9.6.1
+
+### Bug Fixes
+
+- Ensure Authorization header is added to request when polling for registration status.
+
+## v9.6.0
+
+### New Features
+
+- Added support for acquiring tokens via MSI with a user assigned identity.
+
+## v9.5.3
+
+### Bug Fixes
+
+- Don't remove encoding of existing URL Query parameters when calling autorest.WithQueryParameters.
+- Set correct Content Type when using autorest.WithFormData.
+
+## v9.5.2
+
+### Bug Fixes
+
+- Check for nil \*http.Response before dereferencing it.
+
+## v9.5.1
+
+### Bug Fixes
+
+- Don't count http.StatusTooManyRequests (429) against the retry cap.
+- Use retry logic when SkipResourceProviderRegistration is set to true.
+
+## v9.5.0
+
+### New Features
+
+- Added support for username + password, API key, authoriazation code and cognitive services authentication.
+- Added field SkipResourceProviderRegistration to clients to provide a way to skip auto-registration of RPs.
+- Added utility function AsStringSlice() to convert its parameters to a string slice.
+
+### Bug Fixes
+
+- When checking for authentication failures look at the error type not the status code as it could vary.
+
+## v9.4.2
+
+### Bug Fixes
+
+- Validate parameters when creating credentials.
+- Don't retry requests if the returned status is a 401 (http.StatusUnauthorized) as it will never succeed.
+
+## v9.4.1
+
+### Bug Fixes
+
+- Update the AccessTokensPath() to read access tokens path through AZURE_ACCESS_TOKEN_FILE. If this
+ environment variable is not set, it will fall back to use default path set by Azure CLI.
+- Use case-insensitive string comparison for polling states.
+
+## v9.4.0
+
+### New Features
+
+- Added WaitForCompletion() to Future as a default polling implementation.
+
+### Bug Fixes
+
+- Method Future.Done() shouldn't update polling status for unexpected HTTP status codes.
+
+## v9.3.1
+
+### Bug Fixes
+
+- DoRetryForStatusCodes will retry if sender.Do returns a non-nil error.
+
+## v9.3.0
+
+### New Features
+
+- Added PollingMethod() to Future so callers know what kind of polling mechanism is used.
+- Added azure.ChangeToGet() which transforms an http.Request into a GET (to be used with LROs).
+
+## v9.2.0
+
+### New Features
+
+- Added support for custom Azure Stack endpoints.
+- Added type azure.Future used to track the status of long-running operations.
+
+### Bug Fixes
+
+- Preserve the original error in DoRetryWithRegistration when registration fails.
+
+## v9.1.1
+
+- Fixes a bug regarding the cookie jar on `autorest.Client.Sender`.
+
+## v9.1.0
+
+### New Features
+
+- In cases where there is a non-empty error from the service, attempt to unmarshal it instead of uniformly calling it an "Unknown" error.
+- Support for loading Azure CLI Authentication files.
+- Automatically register your subscription with the Azure Resource Provider if it hadn't been previously.
+
+### Bug Fixes
+
+- RetriableRequest can now tolerate a ReadSeekable body being read but not reset.
+- Adding missing Apache Headers
+
+## v9.0.0
+
+> **IMPORTANT:** This release was intially labeled incorrectly as `v8.4.0`. From the time it was released, it should have been marked `v9.0.0` because it contains breaking changes to the MSI packages. We appologize for any inconvenience this causes.
+
+Adding MSI Endpoint Support and CLI token rehydration.
+
+## v8.3.1
+
+Pick up bug fix in adal for MSI support.
+
+## v8.3.0
+
+Updates to Error string formats for clarity. Also, adding a copy of the http.Response to errors for an improved debugging experience.
+
+## v8.2.0
+
+### New Features
+
+- Add support for bearer authentication callbacks
+- Support 429 response codes that include "Retry-After" header
+- Support validation constraint "Pattern" for map keys
+
+### Bug Fixes
+
+- Make RetriableRequest work with multiple versions of Go
+
+## v8.1.1
+
+Updates the RetriableRequest to take advantage of GetBody() added in Go 1.8.
+
+## v8.1.0
+
+Adds RetriableRequest type for more efficient handling of retrying HTTP requests.
+
+## v8.0.0
+
+ADAL refactored into its own package.
+Support for UNIX time.
+
+## v7.3.1
+
+- Version Testing now removed from production bits that are shipped with the library.
+
+## v7.3.0
+
+- Exposing new `RespondDecorator`, `ByDiscardingBody`. This allows operations
+ to acknowledge that they do not need either the entire or a trailing portion
+ of accepts response body. In doing so, Go's http library can reuse HTTP
+ connections more readily.
+- Adding `PrepareDecorator` to target custom BaseURLs.
+- Adding ACR suffix to public cloud environment.
+- Updating Glide dependencies.
+
+## v7.2.5
+
+- Fixed the Active Directory endpoint for the China cloud.
+- Removes UTF-8 BOM if present in response payload.
+- Added telemetry.
+
+## v7.2.3
+
+- Fixing bug in calls to `DelayForBackoff` that caused doubling of delay
+ duration.
+
+## v7.2.2
+
+- autorest/azure: added ASM and ARM VM DNS suffixes.
+
+## v7.2.1
+
+- fixed parsing of UTC times that are not RFC3339 conformant.
+
+## v7.2.0
+
+- autorest/validation: Reformat validation error for better error message.
+
+## v7.1.0
+
+- preparer: Added support for multipart formdata - WithMultiPartFormdata()
+- preparer: Added support for sending file in request body - WithFile
+- client: Added RetryDuration parameter.
+- autorest/validation: new package for validation code for Azure Go SDK.
+
+## v7.0.7
+
+- Add trailing / to endpoint
+- azure: add EnvironmentFromName
+
+## v7.0.6
+
+- Add retry logic for 408, 500, 502, 503 and 504 status codes.
+- Change url path and query encoding logic.
+- Fix DelayForBackoff for proper exponential delay.
+- Add CookieJar in Client.
+
+## v7.0.5
+
+- Add check to start polling only when status is in [200,201,202].
+- Refactoring for unchecked errors.
+- azure/persist changes.
+- Fix 'file in use' issue in renewing token in deviceflow.
+- Store header RetryAfter for subsequent requests in polling.
+- Add attribute details in service error.
+
+## v7.0.4
+
+- Better error messages for long running operation failures
+
+## v7.0.3
+
+- Corrected DoPollForAsynchronous to properly handle the initial response
+
+## v7.0.2
+
+- Corrected DoPollForAsynchronous to continue using the polling method first discovered
+
+## v7.0.1
+
+- Fixed empty JSON input error in ByUnmarshallingJSON
+- Fixed polling support for GET calls
+- Changed format name from TimeRfc1123 to TimeRFC1123
+
+## v7.0.0
+
+- Added ByCopying responder with supporting TeeReadCloser
+- Rewrote Azure asynchronous handling
+- Reverted to only unmarshalling JSON
+- Corrected handling of RFC3339 time strings and added support for Rfc1123 time format
+
+The `json.Decoder` does not catch bad data as thoroughly as `json.Unmarshal`. Since
+`encoding/json` successfully deserializes all core types, and extended types normally provide
+their custom JSON serialization handlers, the code has been reverted back to using
+`json.Unmarshal`. The original change to use `json.Decode` was made to reduce duplicate
+code; there is no loss of function, and there is a gain in accuracy, by reverting.
+
+Additionally, Azure services indicate requests to be polled by multiple means. The existing code
+only checked for one of those (that is, the presence of the `Azure-AsyncOperation` header).
+The new code correctly covers all cases and aligns with the other Azure SDKs.
+
+## v6.1.0
+
+- Introduced `date.ByUnmarshallingJSONDate` and `date.ByUnmarshallingJSONTime` to enable JSON encoded values.
+
+## v6.0.0
+
+- Completely reworked the handling of polled and asynchronous requests
+- Removed unnecessary routines
+- Reworked `mocks.Sender` to replay a series of `http.Response` objects
+- Added `PrepareDecorators` for primitive types (e.g., bool, int32)
+
+Handling polled and asynchronous requests is no longer part of `Client#Send`. Instead new
+`SendDecorators` implement different styles of polled behavior. See`autorest.DoPollForStatusCodes`
+and `azure.DoPollForAsynchronous` for examples.
+
+## v5.0.0
+
+- Added new RespondDecorators unmarshalling primitive types
+- Corrected application of inspection and authorization PrependDecorators
+
+## v4.0.0
+
+- Added support for Azure long-running operations.
+- Added cancelation support to all decorators and functions that may delay.
+- Breaking: `DelayForBackoff` now accepts a channel, which may be nil.
+
+## v3.1.0
+
+- Add support for OAuth Device Flow authorization.
+- Add support for ServicePrincipalTokens that are backed by an existing token, rather than other secret material.
+- Add helpers for persisting and restoring Tokens.
+- Increased code coverage in the github.com/Azure/autorest/azure package
+
+## v3.0.0
+
+- Breaking: `NewErrorWithError` no longer takes `statusCode int`.
+- Breaking: `NewErrorWithStatusCode` is replaced with `NewErrorWithResponse`.
+- Breaking: `Client#Send()` no longer takes `codes ...int` argument.
+- Add: XML unmarshaling support with `ByUnmarshallingXML()`
+- Stopped vending dependencies locally and switched to [Glide](https://github.com/Masterminds/glide).
+ Applications using this library should either use Glide or vendor dependencies locally some other way.
+- Add: `azure.WithErrorUnlessStatusCode()` decorator to handle Azure errors.
+- Fix: use `net/http.DefaultClient` as base client.
+- Fix: Missing inspection for polling responses added.
+- Add: CopyAndDecode helpers.
+- Improved `./autorest/to` with `[]string` helpers.
+- Removed golint suppressions in .travis.yml.
+
+## v2.1.0
+
+- Added `StatusCode` to `Error` for more easily obtaining the HTTP Reponse StatusCode (if any)
+
+## v2.0.0
+
+- Changed `to.StringMapPtr` method signature to return a pointer
+- Changed `ServicePrincipalCertificateSecret` and `NewServicePrincipalTokenFromCertificate` to support generic certificate and private keys
+
+## v1.0.0
+
+- Added Logging inspectors to trace http.Request / Response
+- Added support for User-Agent header
+- Changed WithHeader PrepareDecorator to use set vs. add
+- Added JSON to error when unmarshalling fails
+- Added Client#Send method
+- Corrected case of "Azure" in package paths
+- Added "to" helpers, Azure helpers, and improved ease-of-use
+- Corrected golint issues
+
+## v1.0.1
+
+- Added CHANGELOG.md
+
+## v1.1.0
+
+- Added mechanism to retrieve a ServicePrincipalToken using a certificate-signed JWT
+- Added an example of creating a certificate-based ServicePrincipal and retrieving an OAuth token using the certificate
+
+## v1.1.1
+
+- Introduce godeps and vendor dependencies introduced in v1.1.1
diff --git a/vendor/github.com/Azure/go-autorest/GNUmakefile b/vendor/github.com/Azure/go-autorest/GNUmakefile
new file mode 100644
index 000000000..a434e73ac
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/GNUmakefile
@@ -0,0 +1,23 @@
+DIR?=./autorest/
+
+default: build
+
+build: fmt
+ go install $(DIR)
+
+test:
+ go test $(DIR) || exit 1
+
+vet:
+ @echo "go vet ."
+ @go vet $(DIR)... ; if [ $$? -eq 1 ]; then \
+ echo ""; \
+ echo "Vet found suspicious constructs. Please check the reported constructs"; \
+ echo "and fix them if necessary before submitting the code for review."; \
+ exit 1; \
+ fi
+
+fmt:
+ gofmt -w $(DIR)
+
+.PHONY: build test vet fmt
diff --git a/vendor/github.com/Azure/go-autorest/Gopkg.lock b/vendor/github.com/Azure/go-autorest/Gopkg.lock
new file mode 100644
index 000000000..dc6e3e633
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/Gopkg.lock
@@ -0,0 +1,324 @@
+# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
+
+
+[[projects]]
+ digest = "1:892e39e5c083d0943f1e80ab8351690f183c6a5ab24e1d280adcad424c26255e"
+ name = "contrib.go.opencensus.io/exporter/ocagent"
+ packages = ["."]
+ pruneopts = "UT"
+ revision = "a8a6f458bbc1d5042322ad1f9b65eeb0b69be9ea"
+ version = "v0.6.0"
+
+[[projects]]
+ digest = "1:8f5acd4d4462b5136af644d25101f0968a7a94ee90fcb2059cec5b7cc42e0b20"
+ name = "github.com/census-instrumentation/opencensus-proto"
+ packages = [
+ "gen-go/agent/common/v1",
+ "gen-go/agent/metrics/v1",
+ "gen-go/agent/trace/v1",
+ "gen-go/metrics/v1",
+ "gen-go/resource/v1",
+ "gen-go/trace/v1",
+ ]
+ pruneopts = "UT"
+ revision = "d89fa54de508111353cb0b06403c00569be780d8"
+ version = "v0.2.1"
+
+[[projects]]
+ digest = "1:ffe9824d294da03b391f44e1ae8281281b4afc1bdaa9588c9097785e3af10cec"
+ name = "github.com/davecgh/go-spew"
+ packages = ["spew"]
+ pruneopts = "UT"
+ revision = "8991bc29aa16c548c550c7ff78260e27b9ab7c73"
+ version = "v1.1.1"
+
+[[projects]]
+ digest = "1:76dc72490af7174349349838f2fe118996381b31ea83243812a97e5a0fd5ed55"
+ name = "github.com/dgrijalva/jwt-go"
+ packages = ["."]
+ pruneopts = "UT"
+ revision = "06ea1031745cb8b3dab3f6a236daf2b0aa468b7e"
+ version = "v3.2.0"
+
+[[projects]]
+ digest = "1:cf0d2e435fd4ce45b789e93ef24b5f08e86be0e9807a16beb3694e2d8c9af965"
+ name = "github.com/dimchansky/utfbom"
+ packages = ["."]
+ pruneopts = "UT"
+ revision = "d2133a1ce379ef6fa992b0514a77146c60db9d1c"
+ version = "v1.1.0"
+
+[[projects]]
+ branch = "master"
+ digest = "1:b7cb6054d3dff43b38ad2e92492f220f57ae6087ee797dca298139776749ace8"
+ name = "github.com/golang/groupcache"
+ packages = ["lru"]
+ pruneopts = "UT"
+ revision = "611e8accdfc92c4187d399e95ce826046d4c8d73"
+
+[[projects]]
+ digest = "1:e3839df32927e8d3403cd5aa7253d966e8ff80fc8f10e2e35d146461cd83fcfa"
+ name = "github.com/golang/protobuf"
+ packages = [
+ "descriptor",
+ "jsonpb",
+ "proto",
+ "protoc-gen-go/descriptor",
+ "ptypes",
+ "ptypes/any",
+ "ptypes/duration",
+ "ptypes/struct",
+ "ptypes/timestamp",
+ "ptypes/wrappers",
+ ]
+ pruneopts = "UT"
+ revision = "6c65a5562fc06764971b7c5d05c76c75e84bdbf7"
+ version = "v1.3.2"
+
+[[projects]]
+ digest = "1:c560cd79300fac84f124b96225181a637a70b60155919a3c36db50b7cca6b806"
+ name = "github.com/grpc-ecosystem/grpc-gateway"
+ packages = [
+ "internal",
+ "runtime",
+ "utilities",
+ ]
+ pruneopts = "UT"
+ revision = "f7120437bb4f6c71f7f5076ad65a45310de2c009"
+ version = "v1.12.1"
+
+[[projects]]
+ digest = "1:5d231480e1c64a726869bc4142d270184c419749d34f167646baa21008eb0a79"
+ name = "github.com/mitchellh/go-homedir"
+ packages = ["."]
+ pruneopts = "UT"
+ revision = "af06845cf3004701891bf4fdb884bfe4920b3727"
+ version = "v1.1.0"
+
+[[projects]]
+ digest = "1:0028cb19b2e4c3112225cd871870f2d9cf49b9b4276531f03438a88e94be86fe"
+ name = "github.com/pmezard/go-difflib"
+ packages = ["difflib"]
+ pruneopts = "UT"
+ revision = "792786c7400a136282c1664665ae0a8db921c6c2"
+ version = "v1.0.0"
+
+[[projects]]
+ digest = "1:99d32780e5238c2621fff621123997c3e3cca96db8be13179013aea77dfab551"
+ name = "github.com/stretchr/testify"
+ packages = [
+ "assert",
+ "require",
+ ]
+ pruneopts = "UT"
+ revision = "221dbe5ed46703ee255b1da0dec05086f5035f62"
+ version = "v1.4.0"
+
+[[projects]]
+ digest = "1:7c5e00383399fe13de0b4b65c9fdde16275407ce8ac02d867eafeaa916edcc71"
+ name = "go.opencensus.io"
+ packages = [
+ ".",
+ "internal",
+ "internal/tagencoding",
+ "metric/metricdata",
+ "metric/metricproducer",
+ "plugin/ocgrpc",
+ "plugin/ochttp",
+ "plugin/ochttp/propagation/b3",
+ "plugin/ochttp/propagation/tracecontext",
+ "resource",
+ "stats",
+ "stats/internal",
+ "stats/view",
+ "tag",
+ "trace",
+ "trace/internal",
+ "trace/propagation",
+ "trace/tracestate",
+ ]
+ pruneopts = "UT"
+ revision = "aad2c527c5defcf89b5afab7f37274304195a6b2"
+ version = "v0.22.2"
+
+[[projects]]
+ branch = "master"
+ digest = "1:f604f5e2ee721b6757d962dfe7bab4f28aae50c456e39cfb2f3819762a44a6ae"
+ name = "golang.org/x/crypto"
+ packages = [
+ "pkcs12",
+ "pkcs12/internal/rc2",
+ ]
+ pruneopts = "UT"
+ revision = "e9b2fee46413994441b28dfca259d911d963dfed"
+
+[[projects]]
+ branch = "master"
+ digest = "1:334b27eac455cb6567ea28cd424230b07b1a64334a2f861a8075ac26ce10af43"
+ name = "golang.org/x/lint"
+ packages = [
+ ".",
+ "golint",
+ ]
+ pruneopts = "UT"
+ revision = "fdd1cda4f05fd1fd86124f0ef9ce31a0b72c8448"
+
+[[projects]]
+ branch = "master"
+ digest = "1:257a75d024975428ab9192bfc334c3490882f8cb21322ea5784ca8eca000a910"
+ name = "golang.org/x/net"
+ packages = [
+ "http/httpguts",
+ "http2",
+ "http2/hpack",
+ "idna",
+ "internal/timeseries",
+ "trace",
+ ]
+ pruneopts = "UT"
+ revision = "1ddd1de85cb0337b623b740a609d35817d516a8d"
+
+[[projects]]
+ branch = "master"
+ digest = "1:382bb5a7fb4034db3b6a2d19e5a4a6bcf52f4750530603c01ca18a172fa3089b"
+ name = "golang.org/x/sync"
+ packages = ["semaphore"]
+ pruneopts = "UT"
+ revision = "cd5d95a43a6e21273425c7ae415d3df9ea832eeb"
+
+[[projects]]
+ branch = "master"
+ digest = "1:4da420ceda5f68e8d748aa2169d0ed44ffadb1bbd6537cf778a49563104189b8"
+ name = "golang.org/x/sys"
+ packages = ["unix"]
+ pruneopts = "UT"
+ revision = "ce4227a45e2eb77e5c847278dcc6a626742e2945"
+
+[[projects]]
+ digest = "1:8d8faad6b12a3a4c819a3f9618cb6ee1fa1cfc33253abeeea8b55336721e3405"
+ name = "golang.org/x/text"
+ packages = [
+ "collate",
+ "collate/build",
+ "internal/colltab",
+ "internal/gen",
+ "internal/language",
+ "internal/language/compact",
+ "internal/tag",
+ "internal/triegen",
+ "internal/ucd",
+ "language",
+ "secure/bidirule",
+ "transform",
+ "unicode/bidi",
+ "unicode/cldr",
+ "unicode/norm",
+ "unicode/rangetable",
+ ]
+ pruneopts = "UT"
+ revision = "342b2e1fbaa52c93f31447ad2c6abc048c63e475"
+ version = "v0.3.2"
+
+[[projects]]
+ branch = "master"
+ digest = "1:4eb5ea8395fb60212dd58b92c9db80bab59d5e99c7435f9a6a0a528c373b60e7"
+ name = "golang.org/x/tools"
+ packages = [
+ "go/ast/astutil",
+ "go/gcexportdata",
+ "go/internal/gcimporter",
+ "go/types/typeutil",
+ ]
+ pruneopts = "UT"
+ revision = "259af5ff87bdcd4abf2ecda8edc3f13f04f26a42"
+
+[[projects]]
+ digest = "1:964bb30febc27fabfbec4759fa530c6ec35e77a7c85fed90b9317ea39a054877"
+ name = "google.golang.org/api"
+ packages = ["support/bundler"]
+ pruneopts = "UT"
+ revision = "8a410c21381766a810817fd6200fce8838ecb277"
+ version = "v0.14.0"
+
+[[projects]]
+ branch = "master"
+ digest = "1:a8d5c2c6e746b3485e36908ab2a9e3d77b86b81f8156d88403c7d2b462431dfd"
+ name = "google.golang.org/genproto"
+ packages = [
+ "googleapis/api/httpbody",
+ "googleapis/rpc/status",
+ "protobuf/field_mask",
+ ]
+ pruneopts = "UT"
+ revision = "51378566eb590fa106d1025ea12835a4416dda84"
+
+[[projects]]
+ digest = "1:b59ce3ddb11daeeccccc9cb3183b58ebf8e9a779f1c853308cd91612e817a301"
+ name = "google.golang.org/grpc"
+ packages = [
+ ".",
+ "backoff",
+ "balancer",
+ "balancer/base",
+ "balancer/roundrobin",
+ "binarylog/grpc_binarylog_v1",
+ "codes",
+ "connectivity",
+ "credentials",
+ "credentials/internal",
+ "encoding",
+ "encoding/proto",
+ "grpclog",
+ "internal",
+ "internal/backoff",
+ "internal/balancerload",
+ "internal/binarylog",
+ "internal/buffer",
+ "internal/channelz",
+ "internal/envconfig",
+ "internal/grpcrand",
+ "internal/grpcsync",
+ "internal/resolver/dns",
+ "internal/resolver/passthrough",
+ "internal/syscall",
+ "internal/transport",
+ "keepalive",
+ "metadata",
+ "naming",
+ "peer",
+ "resolver",
+ "serviceconfig",
+ "stats",
+ "status",
+ "tap",
+ ]
+ pruneopts = "UT"
+ revision = "1a3960e4bd028ac0cec0a2afd27d7d8e67c11514"
+ version = "v1.25.1"
+
+[[projects]]
+ digest = "1:b75b3deb2bce8bc079e16bb2aecfe01eb80098f5650f9e93e5643ca8b7b73737"
+ name = "gopkg.in/yaml.v2"
+ packages = ["."]
+ pruneopts = "UT"
+ revision = "1f64d6156d11335c3f22d9330b0ad14fc1e789ce"
+ version = "v2.2.7"
+
+[solve-meta]
+ analyzer-name = "dep"
+ analyzer-version = 1
+ input-imports = [
+ "contrib.go.opencensus.io/exporter/ocagent",
+ "github.com/dgrijalva/jwt-go",
+ "github.com/dimchansky/utfbom",
+ "github.com/mitchellh/go-homedir",
+ "github.com/stretchr/testify/require",
+ "go.opencensus.io/plugin/ochttp",
+ "go.opencensus.io/plugin/ochttp/propagation/tracecontext",
+ "go.opencensus.io/stats/view",
+ "go.opencensus.io/trace",
+ "golang.org/x/crypto/pkcs12",
+ "golang.org/x/lint/golint",
+ ]
+ solver-name = "gps-cdcl"
+ solver-version = 1
diff --git a/vendor/github.com/Azure/go-autorest/Gopkg.toml b/vendor/github.com/Azure/go-autorest/Gopkg.toml
new file mode 100644
index 000000000..1fc286596
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/Gopkg.toml
@@ -0,0 +1,59 @@
+# Gopkg.toml example
+#
+# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html
+# for detailed Gopkg.toml documentation.
+#
+# required = ["github.com/user/thing/cmd/thing"]
+# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
+#
+# [[constraint]]
+# name = "github.com/user/project"
+# version = "1.0.0"
+#
+# [[constraint]]
+# name = "github.com/user/project2"
+# branch = "dev"
+# source = "github.com/myfork/project2"
+#
+# [[override]]
+# name = "github.com/x/y"
+# version = "2.4.0"
+#
+# [prune]
+# non-go = false
+# go-tests = true
+# unused-packages = true
+
+required = ["golang.org/x/lint/golint"]
+
+[prune]
+ go-tests = true
+ unused-packages = true
+
+[[constraint]]
+ name = "contrib.go.opencensus.io/exporter/ocagent"
+ version = "0.6.0"
+
+[[constraint]]
+ name = "github.com/dgrijalva/jwt-go"
+ version = "3.2.0"
+
+[[constraint]]
+ name = "github.com/dimchansky/utfbom"
+ version = "1.1.0"
+
+[[constraint]]
+ name = "github.com/mitchellh/go-homedir"
+ version = "1.1.0"
+
+[[constraint]]
+ name = "github.com/stretchr/testify"
+ version = "1.3.0"
+
+[[constraint]]
+ name = "go.opencensus.io"
+ version = "0.22.0"
+
+[[constraint]]
+ branch = "master"
+ name = "golang.org/x/crypto"
diff --git a/vendor/github.com/Azure/go-autorest/LICENSE b/vendor/github.com/Azure/go-autorest/LICENSE
new file mode 100644
index 000000000..b9d6a27ea
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/LICENSE
@@ -0,0 +1,191 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ Copyright 2015 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.
diff --git a/vendor/github.com/Azure/go-autorest/README.md b/vendor/github.com/Azure/go-autorest/README.md
new file mode 100644
index 000000000..de1e19a44
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/README.md
@@ -0,0 +1,165 @@
+# go-autorest
+
+[![GoDoc](https://godoc.org/github.com/Azure/go-autorest/autorest?status.png)](https://godoc.org/github.com/Azure/go-autorest/autorest)
+[![Build Status](https://dev.azure.com/azure-sdk/public/_apis/build/status/go/Azure.go-autorest?branchName=master)](https://dev.azure.com/azure-sdk/public/_build/latest?definitionId=625&branchName=master)
+[![Go Report Card](https://goreportcard.com/badge/Azure/go-autorest)](https://goreportcard.com/report/Azure/go-autorest)
+
+Package go-autorest provides an HTTP request client for use with [Autorest](https://github.com/Azure/autorest.go)-generated API client packages.
+
+An authentication client tested with Azure Active Directory (AAD) is also
+provided in this repo in the package
+`github.com/Azure/go-autorest/autorest/adal`. Despite its name, this package
+is maintained only as part of the Azure Go SDK and is not related to other
+"ADAL" libraries in [github.com/AzureAD](https://github.com/AzureAD).
+
+## Overview
+
+Package go-autorest implements an HTTP request pipeline suitable for use across
+multiple goroutines and provides the shared routines used by packages generated
+by [Autorest](https://github.com/Azure/autorest.go).
+
+The package breaks sending and responding to HTTP requests into three phases: Preparing, Sending,
+and Responding. A typical pattern is:
+
+```go
+ req, err := Prepare(&http.Request{},
+ token.WithAuthorization())
+
+ resp, err := Send(req,
+ WithLogging(logger),
+ DoErrorIfStatusCode(http.StatusInternalServerError),
+ DoCloseIfError(),
+ DoRetryForAttempts(5, time.Second))
+
+ err = Respond(resp,
+ ByDiscardingBody(),
+ ByClosing())
+```
+
+Each phase relies on decorators to modify and / or manage processing. Decorators may first modify
+and then pass the data along, pass the data first and then modify the result, or wrap themselves
+around passing the data (such as a logger might do). Decorators run in the order provided. For
+example, the following:
+
+```go
+ req, err := Prepare(&http.Request{},
+ WithBaseURL("https://microsoft.com/"),
+ WithPath("a"),
+ WithPath("b"),
+ WithPath("c"))
+```
+
+will set the URL to:
+
+```
+ https://microsoft.com/a/b/c
+```
+
+Preparers and Responders may be shared and re-used (assuming the underlying decorators support
+sharing and re-use). Performant use is obtained by creating one or more Preparers and Responders
+shared among multiple go-routines, and a single Sender shared among multiple sending go-routines,
+all bound together by means of input / output channels.
+
+Decorators hold their passed state within a closure (such as the path components in the example
+above). Be careful to share Preparers and Responders only in a context where such held state
+applies. For example, it may not make sense to share a Preparer that applies a query string from a
+fixed set of values. Similarly, sharing a Responder that reads the response body into a passed
+struct (e.g., `ByUnmarshallingJson`) is likely incorrect.
+
+Errors raised by autorest objects and methods will conform to the `autorest.Error` interface.
+
+See the included examples for more detail. For details on the suggested use of this package by
+generated clients, see the Client described below.
+
+## Helpers
+
+### Handling Swagger Dates
+
+The Swagger specification (https://swagger.io) that drives AutoRest
+(https://github.com/Azure/autorest/) precisely defines two date forms: date and date-time. The
+github.com/Azure/go-autorest/autorest/date package provides time.Time derivations to ensure correct
+parsing and formatting.
+
+### Handling Empty Values
+
+In JSON, missing values have different semantics than empty values. This is especially true for
+services using the HTTP PATCH verb. The JSON submitted with a PATCH request generally contains
+only those values to modify. Missing values are to be left unchanged. Developers, then, require a
+means to both specify an empty value and to leave the value out of the submitted JSON.
+
+The Go JSON package (`encoding/json`) supports the `omitempty` tag. When specified, it omits
+empty values from the rendered JSON. Since Go defines default values for all base types (such as ""
+for string and 0 for int) and provides no means to mark a value as actually empty, the JSON package
+treats default values as meaning empty, omitting them from the rendered JSON. This means that, using
+the Go base types encoded through the default JSON package, it is not possible to create JSON to
+clear a value at the server.
+
+The workaround within the Go community is to use pointers to base types in lieu of base types within
+structures that map to JSON. For example, instead of a value of type `string`, the workaround uses
+`*string`. While this enables distinguishing empty values from those to be unchanged, creating
+pointers to a base type (notably constant, in-line values) requires additional variables. This, for
+example,
+
+```go
+ s := struct {
+ S *string
+ }{ S: &"foo" }
+```
+fails, while, this
+
+```go
+ v := "foo"
+ s := struct {
+ S *string
+ }{ S: &v }
+```
+succeeds.
+
+To ease using pointers, the subpackage `to` contains helpers that convert to and from pointers for
+Go base types which have Swagger analogs. It also provides a helper that converts between
+`map[string]string` and `map[string]*string`, enabling the JSON to specify that the value
+associated with a key should be cleared. With the helpers, the previous example becomes
+
+```go
+ s := struct {
+ S *string
+ }{ S: to.StringPtr("foo") }
+```
+
+## Install
+
+```bash
+go get github.com/Azure/go-autorest/autorest
+go get github.com/Azure/go-autorest/autorest/azure
+go get github.com/Azure/go-autorest/autorest/date
+go get github.com/Azure/go-autorest/autorest/to
+```
+
+### Using with Go Modules
+In [v12.0.1](https://github.com/Azure/go-autorest/pull/386), this repository introduced the following modules.
+
+- autorest/adal
+- autorest/azure/auth
+- autorest/azure/cli
+- autorest/date
+- autorest/mocks
+- autorest/to
+- autorest/validation
+- autorest
+- logger
+- tracing
+
+Tagging cumulative SDK releases as a whole (e.g. `v12.3.0`) is still enabled to support consumers of this repo that have not yet migrated to modules.
+
+## License
+
+See LICENSE file.
+
+-----
+
+This project has adopted the [Microsoft Open Source Code of
+Conduct](https://opensource.microsoft.com/codeofconduct/). For more information
+see the [Code of Conduct
+FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact
+[opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional
+questions or comments.
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 b38f4c245..9daa4b58b 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/adal/devicetoken.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/adal/devicetoken.go
@@ -24,6 +24,7 @@ package adal
*/
import (
+ "context"
"encoding/json"
"fmt"
"io/ioutil"
@@ -101,7 +102,14 @@ type deviceToken struct {
// InitiateDeviceAuth initiates a device auth flow. It returns a DeviceCode
// that can be used with CheckForUserCompletion or WaitForUserCompletion.
+// Deprecated: use InitiateDeviceAuthWithContext() instead.
func InitiateDeviceAuth(sender Sender, oauthConfig OAuthConfig, clientID, resource string) (*DeviceCode, error) {
+ return InitiateDeviceAuthWithContext(context.Background(), sender, oauthConfig, clientID, resource)
+}
+
+// InitiateDeviceAuthWithContext initiates a device auth flow. It returns a DeviceCode
+// that can be used with CheckForUserCompletion or WaitForUserCompletion.
+func InitiateDeviceAuthWithContext(ctx context.Context, sender Sender, oauthConfig OAuthConfig, clientID, resource string) (*DeviceCode, error) {
v := url.Values{
"client_id": []string{clientID},
"resource": []string{resource},
@@ -117,7 +125,7 @@ func InitiateDeviceAuth(sender Sender, oauthConfig OAuthConfig, clientID, resour
req.ContentLength = int64(len(s))
req.Header.Set(contentType, mimeTypeFormPost)
- resp, err := sender.Do(req)
+ resp, err := sender.Do(req.WithContext(ctx))
if err != nil {
return nil, fmt.Errorf("%s %s: %s", logPrefix, errCodeSendingFails, err.Error())
}
@@ -151,7 +159,14 @@ func InitiateDeviceAuth(sender Sender, oauthConfig OAuthConfig, clientID, resour
// CheckForUserCompletion takes a DeviceCode and checks with the Azure AD OAuth endpoint
// to see if the device flow has: been completed, timed out, or otherwise failed
+// Deprecated: use CheckForUserCompletionWithContext() instead.
func CheckForUserCompletion(sender Sender, code *DeviceCode) (*Token, error) {
+ return CheckForUserCompletionWithContext(context.Background(), sender, code)
+}
+
+// CheckForUserCompletionWithContext takes a DeviceCode and checks with the Azure AD OAuth endpoint
+// to see if the device flow has: been completed, timed out, or otherwise failed
+func CheckForUserCompletionWithContext(ctx context.Context, sender Sender, code *DeviceCode) (*Token, error) {
v := url.Values{
"client_id": []string{code.ClientID},
"code": []string{*code.DeviceCode},
@@ -169,7 +184,7 @@ func CheckForUserCompletion(sender Sender, code *DeviceCode) (*Token, error) {
req.ContentLength = int64(len(s))
req.Header.Set(contentType, mimeTypeFormPost)
- resp, err := sender.Do(req)
+ resp, err := sender.Do(req.WithContext(ctx))
if err != nil {
return nil, fmt.Errorf("%s %s: %s", logPrefix, errTokenSendingFails, err.Error())
}
@@ -207,18 +222,29 @@ func CheckForUserCompletion(sender Sender, code *DeviceCode) (*Token, error) {
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
}
}
// WaitForUserCompletion calls CheckForUserCompletion repeatedly until a token is granted or an error state occurs.
// This prevents the user from looping and checking against 'ErrDeviceAuthorizationPending'.
+// Deprecated: use WaitForUserCompletionWithContext() instead.
func WaitForUserCompletion(sender Sender, code *DeviceCode) (*Token, error) {
+ return WaitForUserCompletionWithContext(context.Background(), sender, code)
+}
+
+// WaitForUserCompletionWithContext calls CheckForUserCompletion repeatedly until a token is granted or an error
+// state occurs. This prevents the user from looping and checking against 'ErrDeviceAuthorizationPending'.
+func WaitForUserCompletionWithContext(ctx context.Context, sender Sender, code *DeviceCode) (*Token, error) {
intervalDuration := time.Duration(*code.Interval) * time.Second
waitDuration := intervalDuration
for {
- token, err := CheckForUserCompletion(sender, code)
+ token, err := CheckForUserCompletionWithContext(ctx, sender, code)
if err == nil {
return token, nil
@@ -237,6 +263,11 @@ func WaitForUserCompletion(sender Sender, code *DeviceCode) (*Token, error) {
return nil, fmt.Errorf("%s Error waiting for user to complete device flow. Server told us to slow_down too much", logPrefix)
}
- time.Sleep(waitDuration)
+ select {
+ case <-time.After(waitDuration):
+ // noop
+ case <-ctx.Done():
+ return nil, ctx.Err()
+ }
}
}
diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/go.mod b/vendor/github.com/Azure/go-autorest/autorest/adal/go.mod
deleted file mode 100644
index 66db8b9e2..000000000
--- a/vendor/github.com/Azure/go-autorest/autorest/adal/go.mod
+++ /dev/null
@@ -1,11 +0,0 @@
-module github.com/Azure/go-autorest/autorest/adal
-
-go 1.12
-
-require (
- github.com/Azure/go-autorest/autorest/date v0.1.0
- github.com/Azure/go-autorest/autorest/mocks v0.1.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-20190308221718-c2843e01d9a2
-)
diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/go.sum b/vendor/github.com/Azure/go-autorest/autorest/adal/go.sum
deleted file mode 100644
index 9525ff736..000000000
--- a/vendor/github.com/Azure/go-autorest/autorest/adal/go.sum
+++ /dev/null
@@ -1,12 +0,0 @@
-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 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/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 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M=
-golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-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
new file mode 100644
index 000000000..7551b7923
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/autorest/adal/go_mod_tidy_hack.go
@@ -0,0 +1,24 @@
+// +build modhack
+
+package adal
+
+// 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.
+
+// 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"
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 9e15f2751..2a974a39b 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/token.go b/vendor/github.com/Azure/go-autorest/autorest/adal/token.go
index b72753498..b83f16a49 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/adal/token.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/adal/token.go
@@ -24,17 +24,18 @@ import (
"encoding/json"
"errors"
"fmt"
+ "io"
"io/ioutil"
"math"
- "net"
"net/http"
"net/url"
+ "os"
"strings"
"sync"
"time"
"github.com/Azure/go-autorest/autorest/date"
- "github.com/dgrijalva/jwt-go"
+ "github.com/form3tech-oss/jwt-go"
)
const (
@@ -61,8 +62,20 @@ 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"
+
+ // asMSISecretEnv is the environment variable used to store the request secret on App Service and Functions
+ asMSISecretEnv = "MSI_SECRET"
+
+ // the API version to use for the App Service MSI endpoint
+ appServiceAPIVersion = "2017-09-01"
)
// OAuthTokenProvider is an interface which should be implemented by an access token retriever
@@ -100,6 +113,9 @@ type RefresherWithContext interface {
// a successful token refresh
type TokenRefreshCallback func(Token) error
+// TokenRefresh is a type representing a custom callback to refresh a token
+type TokenRefresh func(ctx context.Context, resource string) (*Token, error)
+
// Token encapsulates the access token used to authorize Azure requests.
// https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-oauth2-client-creds-grant-flow#service-to-service-access-token-response
type Token struct {
@@ -239,7 +255,7 @@ func (secret *ServicePrincipalCertificateSecret) SignJwt(spt *ServicePrincipalTo
"sub": spt.inner.ClientID,
"jti": base64.URLEncoding.EncodeToString(jti),
"nbf": time.Now().Unix(),
- "exp": time.Now().Add(time.Hour * 24).Unix(),
+ "exp": time.Now().Add(24 * time.Hour).Unix(),
}
signedString, err := token.SignedString(secret.PrivateKey)
@@ -338,11 +354,13 @@ func (secret ServicePrincipalAuthorizationCodeSecret) MarshalJSON() ([]byte, err
// ServicePrincipalToken encapsulates a Token created for a Service Principal.
type ServicePrincipalToken struct {
- inner servicePrincipalToken
- refreshLock *sync.RWMutex
- sender Sender
- refreshCallbacks []TokenRefreshCallback
+ inner servicePrincipalToken
+ refreshLock *sync.RWMutex
+ sender Sender
+ 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
}
@@ -356,6 +374,11 @@ func (spt *ServicePrincipalToken) SetRefreshCallbacks(callbacks []TokenRefreshCa
spt.refreshCallbacks = callbacks
}
+// SetCustomRefreshFunc sets a custom refresh function used to refresh the token.
+func (spt *ServicePrincipalToken) SetCustomRefreshFunc(customRefreshFunc TokenRefresh) {
+ spt.customRefreshFunc = customRefreshFunc
+}
+
// MarshalJSON implements the json.Marshaler interface.
func (spt ServicePrincipalToken) MarshalJSON() ([]byte, error) {
return json.Marshal(spt.inner)
@@ -634,19 +657,52 @@ func GetMSIVMEndpoint() (string, error) {
return msiEndpoint, nil
}
+// NOTE: this only indicates if the ASE environment credentials have been set
+// which does not necessarily mean that the caller is authenticating via ASE!
+func isAppService() bool {
+ _, asMSIEndpointEnvExists := os.LookupEnv(asMSIEndpointEnv)
+ _, asMSISecretEnvExists := os.LookupEnv(asMSISecretEnv)
+
+ return asMSIEndpointEnvExists && asMSISecretEnvExists
+}
+
+// GetMSIAppServiceEndpoint get the MSI endpoint for App Service and Functions
+func GetMSIAppServiceEndpoint() (string, error) {
+ asMSIEndpoint, asMSIEndpointEnvExists := os.LookupEnv(asMSIEndpointEnv)
+
+ if asMSIEndpointEnvExists {
+ return asMSIEndpoint, nil
+ }
+ return "", errors.New("MSI endpoint not found")
+}
+
+// GetMSIEndpoint get the appropriate MSI endpoint depending on the runtime environment
+func GetMSIEndpoint() (string, error) {
+ if isAppService() {
+ return GetMSIAppServiceEndpoint()
+ }
+ return GetMSIVMEndpoint()
+}
+
// NewServicePrincipalTokenFromMSI creates a ServicePrincipalToken via the MSI VM Extension.
// It will use the system assigned identity when creating the token.
func NewServicePrincipalTokenFromMSI(msiEndpoint, resource string, callbacks ...TokenRefreshCallback) (*ServicePrincipalToken, error) {
- return newServicePrincipalTokenFromMSI(msiEndpoint, resource, nil, callbacks...)
+ return newServicePrincipalTokenFromMSI(msiEndpoint, resource, nil, nil, 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.
func NewServicePrincipalTokenFromMSIWithUserAssignedID(msiEndpoint, resource string, userAssignedID string, callbacks ...TokenRefreshCallback) (*ServicePrincipalToken, error) {
- return newServicePrincipalTokenFromMSI(msiEndpoint, resource, &userAssignedID, callbacks...)
+ return newServicePrincipalTokenFromMSI(msiEndpoint, resource, &userAssignedID, nil, callbacks...)
}
-func newServicePrincipalTokenFromMSI(msiEndpoint, resource string, userAssignedID *string, callbacks ...TokenRefreshCallback) (*ServicePrincipalToken, error) {
+// NewServicePrincipalTokenFromMSIWithIdentityResourceID creates a ServicePrincipalToken via the MSI VM Extension.
+// It will use the azure resource id of user assigned identity when creating the token.
+func NewServicePrincipalTokenFromMSIWithIdentityResourceID(msiEndpoint, resource string, identityResourceID string, callbacks ...TokenRefreshCallback) (*ServicePrincipalToken, error) {
+ return newServicePrincipalTokenFromMSI(msiEndpoint, resource, nil, &identityResourceID, callbacks...)
+}
+
+func newServicePrincipalTokenFromMSI(msiEndpoint, resource string, userAssignedID *string, identityResourceID *string, callbacks ...TokenRefreshCallback) (*ServicePrincipalToken, error) {
if err := validateStringParam(msiEndpoint, "msiEndpoint"); err != nil {
return nil, err
}
@@ -658,6 +714,11 @@ func newServicePrincipalTokenFromMSI(msiEndpoint, resource string, userAssignedI
return nil, err
}
}
+ if identityResourceID != nil {
+ if err := validateStringParam(*identityResourceID, "identityResourceID"); err != nil {
+ return nil, err
+ }
+ }
// We set the oauth config token endpoint to be MSI's endpoint
msiEndpointURL, err := url.Parse(msiEndpoint)
if err != nil {
@@ -666,10 +727,18 @@ func newServicePrincipalTokenFromMSI(msiEndpoint, resource string, userAssignedI
v := url.Values{}
v.Set("resource", resource)
- v.Set("api-version", "2018-02-01")
+ // App Service MSI currently only supports token API version 2017-09-01
+ if isAppService() {
+ v.Set("api-version", appServiceAPIVersion)
+ } else {
+ v.Set("api-version", msiAPIVersion)
+ }
if userAssignedID != nil {
v.Set("client_id", *userAssignedID)
}
+ if identityResourceID != nil {
+ v.Set("mi_res_id", *identityResourceID)
+ }
msiEndpointURL.RawQuery = v.Encode()
spt := &ServicePrincipalToken{
@@ -725,8 +794,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) {
@@ -750,13 +820,13 @@ func (spt *ServicePrincipalToken) InvokeRefreshCallbacks(token Token) error {
}
// Refresh obtains a fresh token for the Service Principal.
-// This method is not safe for concurrent use and should be syncrhonized.
+// This method is safe for concurrent use.
func (spt *ServicePrincipalToken) Refresh() error {
return spt.RefreshWithContext(context.Background())
}
// RefreshWithContext obtains a fresh token for the Service Principal.
-// This method is not safe for concurrent use and should be syncrhonized.
+// This method is safe for concurrent use.
func (spt *ServicePrincipalToken) RefreshWithContext(ctx context.Context) error {
spt.refreshLock.Lock()
defer spt.refreshLock.Unlock()
@@ -764,13 +834,13 @@ func (spt *ServicePrincipalToken) RefreshWithContext(ctx context.Context) error
}
// RefreshExchange refreshes the token, but for a different resource.
-// This method is not safe for concurrent use and should be syncrhonized.
+// This method is safe for concurrent use.
func (spt *ServicePrincipalToken) RefreshExchange(resource string) error {
return spt.RefreshExchangeWithContext(context.Background(), resource)
}
// RefreshExchangeWithContext refreshes the token, but for a different resource.
-// This method is not safe for concurrent use and should be syncrhonized.
+// This method is safe for concurrent use.
func (spt *ServicePrincipalToken) RefreshExchangeWithContext(ctx context.Context, resource string) error {
spt.refreshLock.Lock()
defer spt.refreshLock.Unlock()
@@ -789,19 +859,50 @@ func (spt *ServicePrincipalToken) getGrantType() string {
}
func isIMDS(u url.URL) bool {
- imds, err := url.Parse(msiEndpoint)
+ return isMSIEndpoint(u) == true || isASEEndpoint(u) == true
+}
+
+func isMSIEndpoint(endpoint url.URL) bool {
+ msi, err := url.Parse(msiEndpoint)
if err != nil {
return false
}
- return u.Host == imds.Host && u.Path == imds.Path
+ return endpoint.Host == msi.Host && endpoint.Path == msi.Path
+}
+
+func isASEEndpoint(endpoint url.URL) bool {
+ aseEndpoint, err := GetMSIAppServiceEndpoint()
+ if err != nil {
+ // app service environment isn't enabled
+ return false
+ }
+ ase, err := url.Parse(aseEndpoint)
+ if err != nil {
+ return false
+ }
+ return endpoint.Host == ase.Host && endpoint.Path == ase.Path
}
func (spt *ServicePrincipalToken) refreshInternal(ctx context.Context, resource string) error {
+ if spt.customRefreshFunc != nil {
+ token, err := spt.customRefreshFunc(ctx, resource)
+ if err != nil {
+ return err
+ }
+ 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 isASEEndpoint(spt.inner.OauthConfig.TokenEndpoint) {
+ asMSISecret, _ := os.LookupEnv(asMSISecretEnv)
+ req.Header.Add("Secret", asMSISecret)
+ }
req = req.WithContext(ctx)
if !isIMDS(spt.inner.OauthConfig.TokenEndpoint) {
v := url.Values{}
@@ -840,13 +941,22 @@ func (spt *ServicePrincipalToken) refreshInternal(ctx context.Context, resource
}
var resp *http.Response
+ if isMSIEndpoint(spt.inner.OauthConfig.TokenEndpoint) {
+ resp, err = getMSIEndpoint(ctx, spt.sender)
+ if err != nil {
+ // return a TokenRefreshError here so that we don't keep retrying
+ return newTokenRefreshError(fmt.Sprintf("the MSI endpoint is not available. Failed HTTP request to MSI endpoint: %v", err), nil)
+ }
+ resp.Body.Close()
+ }
if isIMDS(spt.inner.OauthConfig.TokenEndpoint) {
resp, err = retryForIMDS(spt.sender, req, spt.MaxMSIRefreshAttempts)
} else {
resp, err = spt.sender.Do(req)
}
if err != nil {
- return newTokenRefreshError(fmt.Sprintf("adal: Failed to execute the refresh request. Error = '%v'", 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)
}
defer resp.Body.Close()
@@ -911,12 +1021,19 @@ 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)
+ resp.Body.Close()
+ }
resp, err = sender.Do(req)
- // retry on temporary network errors, e.g. transient network failures.
- // if we don't receive a response then assume we can't connect to the
- // endpoint so we're likely not running on an Azure VM so don't retry.
- if (err != nil && !isTemporaryNetworkError(err)) || resp == nil || resp.StatusCode == http.StatusOK || !containsInt(retries, resp.StatusCode) {
+ // we want to retry if err is not nil or the status code is in the list of retry codes
+ if err == nil && !responseHasStatusCode(resp, retries...) {
return
}
@@ -940,20 +1057,12 @@ func retryForIMDS(sender Sender, req *http.Request, maxAttempts int) (resp *http
return
}
-// 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 {
- if netErr, ok := err.(net.Error); !ok || (ok && netErr.Temporary()) {
- return true
- }
- return false
-}
-
-// returns true if slice ints contains the value n
-func containsInt(ints []int, n int) bool {
- for _, i := range ints {
- if i == n {
- return true
+func responseHasStatusCode(resp *http.Response, codes ...int) bool {
+ if resp != nil {
+ for _, i := range codes {
+ if i == resp.StatusCode {
+ return true
+ }
}
}
return false
@@ -1078,3 +1187,12 @@ 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
+}
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 000000000..45e01a7ee
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/autorest/adal/token_1.13.go
@@ -0,0 +1,36 @@
+// +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) {
+ // this cannot fail, the return sig is due to legacy reasons
+ msiEndpoint, _ := GetMSIVMEndpoint()
+ 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)
+}
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 000000000..6f7ad8078
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/autorest/adal/token_legacy.go
@@ -0,0 +1,36 @@
+// +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) {
+ // this cannot fail, the return sig is due to legacy reasons
+ msiEndpoint, _ := GetMSIVMEndpoint()
+ 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)
+}
diff --git a/vendor/github.com/Azure/go-autorest/autorest/authorization.go b/vendor/github.com/Azure/go-autorest/autorest/authorization.go
index 54e87b5b6..1226c4111 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/authorization.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/authorization.go
@@ -138,6 +138,11 @@ func (ba *BearerAuthorizer) WithAuthorization() PrepareDecorator {
}
}
+// TokenProvider returns OAuthTokenProvider so that it can be used for authorization outside the REST.
+func (ba *BearerAuthorizer) TokenProvider() adal.OAuthTokenProvider {
+ return ba.tokenProvider
+}
+
// BearerAuthorizerCallbackFunc is the authentication callback signature.
type BearerAuthorizerCallbackFunc func(tenantID, resource string) (*BearerAuthorizer, error)
@@ -171,20 +176,21 @@ func (bacb *BearerAuthorizerCallback) WithAuthorization() PrepareDecorator {
removeRequestBody(&rCopy)
resp, err := bacb.sender.Do(&rCopy)
- if err == nil && resp.StatusCode == 401 {
- defer resp.Body.Close()
- if hasBearerChallenge(resp) {
- bc, err := newBearerChallenge(resp)
+ if err != nil {
+ return r, err
+ }
+ DrainResponseBody(resp)
+ if resp.StatusCode == 401 && hasBearerChallenge(resp.Header) {
+ bc, err := newBearerChallenge(resp.Header)
+ if err != nil {
+ return r, err
+ }
+ if bacb.callback != nil {
+ ba, err := bacb.callback(bc.values[tenantID], bc.values["resource"])
if err != nil {
return r, err
}
- if bacb.callback != nil {
- ba, err := bacb.callback(bc.values[tenantID], bc.values["resource"])
- if err != nil {
- return r, err
- }
- return Prepare(r, ba.WithAuthorization())
- }
+ return Prepare(r, ba.WithAuthorization())
}
}
}
@@ -194,8 +200,8 @@ func (bacb *BearerAuthorizerCallback) WithAuthorization() PrepareDecorator {
}
// returns true if the HTTP response contains a bearer challenge
-func hasBearerChallenge(resp *http.Response) bool {
- authHeader := resp.Header.Get(bearerChallengeHeader)
+func hasBearerChallenge(header http.Header) bool {
+ authHeader := header.Get(bearerChallengeHeader)
if len(authHeader) == 0 || strings.Index(authHeader, bearer) < 0 {
return false
}
@@ -206,8 +212,8 @@ type bearerChallenge struct {
values map[string]string
}
-func newBearerChallenge(resp *http.Response) (bc bearerChallenge, err error) {
- challenge := strings.TrimSpace(resp.Header.Get(bearerChallengeHeader))
+func newBearerChallenge(header http.Header) (bc bearerChallenge, err error) {
+ challenge := strings.TrimSpace(header.Get(bearerChallengeHeader))
trimmedChallenge := challenge[len(bearer)+1:]
// challenge is a set of key=value pairs that are comma delimited
@@ -293,18 +299,24 @@ type MultiTenantServicePrincipalTokenAuthorizer interface {
// NewMultiTenantServicePrincipalTokenAuthorizer crates a BearerAuthorizer using the given token provider
func NewMultiTenantServicePrincipalTokenAuthorizer(tp adal.MultitenantOAuthTokenProvider) MultiTenantServicePrincipalTokenAuthorizer {
- return &multiTenantSPTAuthorizer{tp: tp}
+ return NewMultiTenantBearerAuthorizer(tp)
}
-type multiTenantSPTAuthorizer struct {
+// MultiTenantBearerAuthorizer implements bearer authorization across multiple tenants.
+type MultiTenantBearerAuthorizer struct {
tp adal.MultitenantOAuthTokenProvider
}
+// NewMultiTenantBearerAuthorizer creates a MultiTenantBearerAuthorizer using the given token provider.
+func NewMultiTenantBearerAuthorizer(tp adal.MultitenantOAuthTokenProvider) *MultiTenantBearerAuthorizer {
+ return &MultiTenantBearerAuthorizer{tp: tp}
+}
+
// WithAuthorization returns a PrepareDecorator that adds an HTTP Authorization header using the
// primary token along with the auxiliary authorization header using the auxiliary tokens.
//
// By default, the token will be automatically refreshed through the Refresher interface.
-func (mt multiTenantSPTAuthorizer) WithAuthorization() PrepareDecorator {
+func (mt *MultiTenantBearerAuthorizer) WithAuthorization() PrepareDecorator {
return func(p Preparer) Preparer {
return PreparerFunc(func(r *http.Request) (*http.Request, error) {
r, err := p.Prepare(r)
@@ -330,7 +342,12 @@ func (mt multiTenantSPTAuthorizer) WithAuthorization() PrepareDecorator {
for i := range auxTokens {
auxTokens[i] = fmt.Sprintf("Bearer %s", auxTokens[i])
}
- return Prepare(r, WithHeader(headerAuxAuthorization, strings.Join(auxTokens, "; ")))
+ return Prepare(r, WithHeader(headerAuxAuthorization, strings.Join(auxTokens, ", ")))
})
}
}
+
+// TokenProvider returns the underlying MultitenantOAuthTokenProvider for this authorizer.
+func (mt *MultiTenantBearerAuthorizer) TokenProvider() adal.MultitenantOAuthTokenProvider {
+ return mt.tp
+}
diff --git a/vendor/github.com/Azure/go-autorest/autorest/authorization_sas.go b/vendor/github.com/Azure/go-autorest/autorest/authorization_sas.go
new file mode 100644
index 000000000..66501493b
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/autorest/authorization_sas.go
@@ -0,0 +1,66 @@
+package autorest
+
+// 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.
+
+import (
+ "fmt"
+ "net/http"
+ "strings"
+)
+
+// SASTokenAuthorizer implements an authorization for SAS Token Authentication
+// this can be used for interaction with Blob Storage Endpoints
+type SASTokenAuthorizer struct {
+ sasToken string
+}
+
+// NewSASTokenAuthorizer creates a SASTokenAuthorizer using the given credentials
+func NewSASTokenAuthorizer(sasToken string) (*SASTokenAuthorizer, error) {
+ if strings.TrimSpace(sasToken) == "" {
+ return nil, fmt.Errorf("sasToken cannot be empty")
+ }
+
+ token := sasToken
+ if strings.HasPrefix(sasToken, "?") {
+ token = strings.TrimPrefix(sasToken, "?")
+ }
+
+ return &SASTokenAuthorizer{
+ sasToken: token,
+ }, nil
+}
+
+// WithAuthorization returns a PrepareDecorator that adds a shared access signature token to the
+// URI's query parameters. This can be used for the Blob, Queue, and File Services.
+//
+// See https://docs.microsoft.com/en-us/rest/api/storageservices/delegate-access-with-shared-access-signature
+func (sas *SASTokenAuthorizer) WithAuthorization() PrepareDecorator {
+ return func(p Preparer) Preparer {
+ return PreparerFunc(func(r *http.Request) (*http.Request, error) {
+ r, err := p.Prepare(r)
+ if err != nil {
+ return r, err
+ }
+
+ if r.URL.RawQuery == "" {
+ r.URL.RawQuery = sas.sasToken
+ } else if !strings.Contains(r.URL.RawQuery, sas.sasToken) {
+ r.URL.RawQuery = fmt.Sprintf("%s&%s", r.URL.RawQuery, sas.sasToken)
+ }
+
+ return Prepare(r)
+ })
+ }
+}
diff --git a/vendor/github.com/Azure/go-autorest/autorest/authorization_storage.go b/vendor/github.com/Azure/go-autorest/autorest/authorization_storage.go
new file mode 100644
index 000000000..2af5030a1
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/autorest/authorization_storage.go
@@ -0,0 +1,307 @@
+package autorest
+
+// 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.
+
+import (
+ "bytes"
+ "crypto/hmac"
+ "crypto/sha256"
+ "encoding/base64"
+ "fmt"
+ "net/http"
+ "net/url"
+ "sort"
+ "strings"
+ "time"
+)
+
+// SharedKeyType defines the enumeration for the various shared key types.
+// See https://docs.microsoft.com/en-us/rest/api/storageservices/authorize-with-shared-key for details on the shared key types.
+type SharedKeyType string
+
+const (
+ // SharedKey is used to authorize against blobs, files and queues services.
+ SharedKey SharedKeyType = "sharedKey"
+
+ // SharedKeyForTable is used to authorize against the table service.
+ SharedKeyForTable SharedKeyType = "sharedKeyTable"
+
+ // SharedKeyLite is used to authorize against blobs, files and queues services. It's provided for
+ // backwards compatibility with API versions before 2009-09-19. Prefer SharedKey instead.
+ SharedKeyLite SharedKeyType = "sharedKeyLite"
+
+ // SharedKeyLiteForTable is used to authorize against the table service. It's provided for
+ // backwards compatibility with older table API versions. Prefer SharedKeyForTable instead.
+ SharedKeyLiteForTable SharedKeyType = "sharedKeyLiteTable"
+)
+
+const (
+ headerAccept = "Accept"
+ headerAcceptCharset = "Accept-Charset"
+ headerContentEncoding = "Content-Encoding"
+ headerContentLength = "Content-Length"
+ headerContentMD5 = "Content-MD5"
+ headerContentLanguage = "Content-Language"
+ headerIfModifiedSince = "If-Modified-Since"
+ headerIfMatch = "If-Match"
+ headerIfNoneMatch = "If-None-Match"
+ headerIfUnmodifiedSince = "If-Unmodified-Since"
+ headerDate = "Date"
+ headerXMSDate = "X-Ms-Date"
+ headerXMSVersion = "x-ms-version"
+ headerRange = "Range"
+)
+
+const storageEmulatorAccountName = "devstoreaccount1"
+
+// SharedKeyAuthorizer implements an authorization for Shared Key
+// this can be used for interaction with Blob, File and Queue Storage Endpoints
+type SharedKeyAuthorizer struct {
+ accountName string
+ accountKey []byte
+ keyType SharedKeyType
+}
+
+// NewSharedKeyAuthorizer creates a SharedKeyAuthorizer using the provided credentials and shared key type.
+func NewSharedKeyAuthorizer(accountName, accountKey string, keyType SharedKeyType) (*SharedKeyAuthorizer, error) {
+ key, err := base64.StdEncoding.DecodeString(accountKey)
+ if err != nil {
+ return nil, fmt.Errorf("malformed storage account key: %v", err)
+ }
+ return &SharedKeyAuthorizer{
+ accountName: accountName,
+ accountKey: key,
+ keyType: keyType,
+ }, nil
+}
+
+// WithAuthorization returns a PrepareDecorator that adds an HTTP Authorization header whose
+// value is " " followed by the computed key.
+// This can be used for the Blob, Queue, and File Services
+//
+// from: https://docs.microsoft.com/en-us/rest/api/storageservices/authorize-with-shared-key
+// You may use Shared Key authorization to authorize a request made against the
+// 2009-09-19 version and later of the Blob and Queue services,
+// and version 2014-02-14 and later of the File services.
+func (sk *SharedKeyAuthorizer) WithAuthorization() PrepareDecorator {
+ return func(p Preparer) Preparer {
+ return PreparerFunc(func(r *http.Request) (*http.Request, error) {
+ r, err := p.Prepare(r)
+ if err != nil {
+ return r, err
+ }
+
+ sk, err := buildSharedKey(sk.accountName, sk.accountKey, r, sk.keyType)
+ if err != nil {
+ return r, err
+ }
+ return Prepare(r, WithHeader(headerAuthorization, sk))
+ })
+ }
+}
+
+func buildSharedKey(accName string, accKey []byte, req *http.Request, keyType SharedKeyType) (string, error) {
+ canRes, err := buildCanonicalizedResource(accName, req.URL.String(), keyType)
+ if err != nil {
+ return "", err
+ }
+
+ if req.Header == nil {
+ req.Header = http.Header{}
+ }
+
+ // ensure date is set
+ if req.Header.Get(headerDate) == "" && req.Header.Get(headerXMSDate) == "" {
+ date := time.Now().UTC().Format(http.TimeFormat)
+ req.Header.Set(headerXMSDate, date)
+ }
+ canString, err := buildCanonicalizedString(req.Method, req.Header, canRes, keyType)
+ if err != nil {
+ return "", err
+ }
+ return createAuthorizationHeader(accName, accKey, canString, keyType), nil
+}
+
+func buildCanonicalizedResource(accountName, uri string, keyType SharedKeyType) (string, error) {
+ errMsg := "buildCanonicalizedResource error: %s"
+ u, err := url.Parse(uri)
+ if err != nil {
+ return "", fmt.Errorf(errMsg, err.Error())
+ }
+
+ cr := bytes.NewBufferString("")
+ if accountName != storageEmulatorAccountName {
+ cr.WriteString("/")
+ cr.WriteString(getCanonicalizedAccountName(accountName))
+ }
+
+ if len(u.Path) > 0 {
+ // Any portion of the CanonicalizedResource string that is derived from
+ // the resource's URI should be encoded exactly as it is in the URI.
+ // -- https://msdn.microsoft.com/en-gb/library/azure/dd179428.aspx
+ cr.WriteString(u.EscapedPath())
+ } else {
+ // a slash is required to indicate the root path
+ cr.WriteString("/")
+ }
+
+ params, err := url.ParseQuery(u.RawQuery)
+ if err != nil {
+ return "", fmt.Errorf(errMsg, err.Error())
+ }
+
+ // See https://github.com/Azure/azure-storage-net/blob/master/Lib/Common/Core/Util/AuthenticationUtility.cs#L277
+ if keyType == SharedKey {
+ if len(params) > 0 {
+ cr.WriteString("\n")
+
+ keys := []string{}
+ for key := range params {
+ keys = append(keys, key)
+ }
+ sort.Strings(keys)
+
+ completeParams := []string{}
+ for _, key := range keys {
+ if len(params[key]) > 1 {
+ sort.Strings(params[key])
+ }
+
+ completeParams = append(completeParams, fmt.Sprintf("%s:%s", key, strings.Join(params[key], ",")))
+ }
+ cr.WriteString(strings.Join(completeParams, "\n"))
+ }
+ } else {
+ // search for "comp" parameter, if exists then add it to canonicalizedresource
+ if v, ok := params["comp"]; ok {
+ cr.WriteString("?comp=" + v[0])
+ }
+ }
+
+ return string(cr.Bytes()), nil
+}
+
+func getCanonicalizedAccountName(accountName string) string {
+ // since we may be trying to access a secondary storage account, we need to
+ // remove the -secondary part of the storage name
+ return strings.TrimSuffix(accountName, "-secondary")
+}
+
+func buildCanonicalizedString(verb string, headers http.Header, canonicalizedResource string, keyType SharedKeyType) (string, error) {
+ contentLength := headers.Get(headerContentLength)
+ if contentLength == "0" {
+ contentLength = ""
+ }
+ date := headers.Get(headerDate)
+ if v := headers.Get(headerXMSDate); v != "" {
+ if keyType == SharedKey || keyType == SharedKeyLite {
+ date = ""
+ } else {
+ date = v
+ }
+ }
+ var canString string
+ switch keyType {
+ case SharedKey:
+ canString = strings.Join([]string{
+ verb,
+ headers.Get(headerContentEncoding),
+ headers.Get(headerContentLanguage),
+ contentLength,
+ headers.Get(headerContentMD5),
+ headers.Get(headerContentType),
+ date,
+ headers.Get(headerIfModifiedSince),
+ headers.Get(headerIfMatch),
+ headers.Get(headerIfNoneMatch),
+ headers.Get(headerIfUnmodifiedSince),
+ headers.Get(headerRange),
+ buildCanonicalizedHeader(headers),
+ canonicalizedResource,
+ }, "\n")
+ case SharedKeyForTable:
+ canString = strings.Join([]string{
+ verb,
+ headers.Get(headerContentMD5),
+ headers.Get(headerContentType),
+ date,
+ canonicalizedResource,
+ }, "\n")
+ case SharedKeyLite:
+ canString = strings.Join([]string{
+ verb,
+ headers.Get(headerContentMD5),
+ headers.Get(headerContentType),
+ date,
+ buildCanonicalizedHeader(headers),
+ canonicalizedResource,
+ }, "\n")
+ case SharedKeyLiteForTable:
+ canString = strings.Join([]string{
+ date,
+ canonicalizedResource,
+ }, "\n")
+ default:
+ return "", fmt.Errorf("key type '%s' is not supported", keyType)
+ }
+ return canString, nil
+}
+
+func buildCanonicalizedHeader(headers http.Header) string {
+ cm := make(map[string]string)
+
+ for k := range headers {
+ headerName := strings.TrimSpace(strings.ToLower(k))
+ if strings.HasPrefix(headerName, "x-ms-") {
+ cm[headerName] = headers.Get(k)
+ }
+ }
+
+ if len(cm) == 0 {
+ return ""
+ }
+
+ keys := []string{}
+ for key := range cm {
+ keys = append(keys, key)
+ }
+
+ sort.Strings(keys)
+
+ ch := bytes.NewBufferString("")
+
+ for _, key := range keys {
+ ch.WriteString(key)
+ ch.WriteRune(':')
+ ch.WriteString(cm[key])
+ ch.WriteRune('\n')
+ }
+
+ return strings.TrimSuffix(string(ch.Bytes()), "\n")
+}
+
+func createAuthorizationHeader(accountName string, accountKey []byte, canonicalizedString string, keyType SharedKeyType) string {
+ h := hmac.New(sha256.New, accountKey)
+ h.Write([]byte(canonicalizedString))
+ signature := base64.StdEncoding.EncodeToString(h.Sum(nil))
+ var key string
+ switch keyType {
+ case SharedKey, SharedKeyForTable:
+ key = "SharedKey"
+ case SharedKeyLite, SharedKeyLiteForTable:
+ key = "SharedKeyLite"
+ }
+ return fmt.Sprintf("%s %s:%s", key, getCanonicalizedAccountName(accountName), signature)
+}
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 1cb41cbeb..17fb4d8c5 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/azure/async.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/azure/async.go
@@ -167,7 +167,13 @@ func (f *Future) WaitForCompletionRef(ctx context.Context, client autorest.Clien
cancelCtx, cancel = context.WithTimeout(ctx, d)
defer cancel()
}
-
+ // if the initial response has a Retry-After, sleep for the specified amount of time before starting to poll
+ if delay, ok := f.GetPollingDelay(); ok {
+ if delayElapsed := autorest.DelayForBackoff(delay, 0, cancelCtx.Done()); !delayElapsed {
+ err = cancelCtx.Err()
+ return
+ }
+ }
done, err := f.DoneWithContext(ctx, client)
for attempts := 0; !done; done, err = f.DoneWithContext(ctx, client) {
if attempts >= client.RetryAttempts {
@@ -258,7 +264,17 @@ func (f Future) GetResult(sender autorest.Sender) (*http.Response, error) {
if err != nil {
return nil, err
}
- return sender.Do(req)
+ resp, err := sender.Do(req)
+ if err == nil && resp.Body != nil {
+ // copy the body and close it so callers don't have to
+ defer resp.Body.Close()
+ b, err := ioutil.ReadAll(resp.Body)
+ if err != nil {
+ return resp, err
+ }
+ resp.Body = ioutil.NopCloser(bytes.NewReader(b))
+ }
+ return resp, err
}
type pollingTracker interface {
@@ -397,12 +413,12 @@ func (pt *pollingTrackerBase) updateRawBody() error {
if err != nil {
return autorest.NewErrorWithError(err, "pollingTrackerBase", "updateRawBody", nil, "failed to read response body")
}
+ // put the body back so it's available to other callers
+ pt.resp.Body = ioutil.NopCloser(bytes.NewReader(b))
// observed in 204 responses over HTTP/2.0; the content length is -1 but body is empty
if len(b) == 0 {
return nil
}
- // put the body back so it's available to other callers
- pt.resp.Body = ioutil.NopCloser(bytes.NewReader(b))
if err = json.Unmarshal(b, &pt.rawBody); err != nil {
return autorest.NewErrorWithError(err, "pollingTrackerBase", "updateRawBody", nil, "failed to unmarshal response body")
}
@@ -450,7 +466,12 @@ func (pt *pollingTrackerBase) updateErrorFromResponse() {
re := respErr{}
defer pt.resp.Body.Close()
var b []byte
- if b, err = ioutil.ReadAll(pt.resp.Body); err != nil || len(b) == 0 {
+ if b, err = ioutil.ReadAll(pt.resp.Body); err != nil {
+ goto Default
+ }
+ // put the body back so it's available to other callers
+ pt.resp.Body = ioutil.NopCloser(bytes.NewReader(b))
+ if len(b) == 0 {
goto Default
}
if err = json.Unmarshal(b, &re); err != nil {
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 3a0a439ff..a0b969dff 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/azure/azure.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/azure/azure.go
@@ -17,6 +17,7 @@ package azure
// limitations under the License.
import (
+ "bytes"
"encoding/json"
"fmt"
"io/ioutil"
@@ -143,7 +144,7 @@ type RequestError struct {
autorest.DetailedError
// The error returned by the Azure service.
- ServiceError *ServiceError `json:"error"`
+ ServiceError *ServiceError `json:"error" xml:"Error"`
// The request id (from the x-ms-request-id-header) of the request.
RequestID string
@@ -170,6 +171,11 @@ type Resource struct {
ResourceName string
}
+// String function returns a string in form of azureResourceID
+func (r Resource) String() string {
+ return fmt.Sprintf("/subscriptions/%s/resourceGroups/%s/providers/%s/%s/%s", r.SubscriptionID, r.ResourceGroup, r.Provider, r.ResourceType, r.ResourceName)
+}
+
// ParseResourceID parses a resource ID into a ResourceDetails struct.
// See https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-template-functions-resource#return-value-4.
func ParseResourceID(resourceID string) (Resource, error) {
@@ -285,26 +291,34 @@ func WithErrorUnlessStatusCode(codes ...int) autorest.RespondDecorator {
var e RequestError
defer resp.Body.Close()
+ encodedAs := autorest.EncodedAsJSON
+ if strings.Contains(resp.Header.Get("Content-Type"), "xml") {
+ encodedAs = autorest.EncodedAsXML
+ }
+
// Copy and replace the Body in case it does not contain an error object.
// This will leave the Body available to the caller.
- b, decodeErr := autorest.CopyAndDecode(autorest.EncodedAsJSON, resp.Body, &e)
+ b, decodeErr := autorest.CopyAndDecode(encodedAs, resp.Body, &e)
resp.Body = ioutil.NopCloser(&b)
if decodeErr != nil {
return fmt.Errorf("autorest/azure: error response cannot be parsed: %q error: %v", b.String(), decodeErr)
}
if e.ServiceError == nil {
// Check if error is unwrapped ServiceError
- if err := json.Unmarshal(b.Bytes(), &e.ServiceError); err != nil {
+ decoder := autorest.NewDecoder(encodedAs, bytes.NewReader(b.Bytes()))
+ if err := decoder.Decode(&e.ServiceError); err != nil {
return err
}
}
if e.ServiceError.Message == "" {
// if we're here it means the returned error wasn't OData v4 compliant.
- // try to unmarshal the body as raw JSON in hopes of getting something.
+ // try to unmarshal the body in hopes of getting something.
rawBody := map[string]interface{}{}
- if err := json.Unmarshal(b.Bytes(), &rawBody); err != nil {
+ decoder := autorest.NewDecoder(encodedAs, bytes.NewReader(b.Bytes()))
+ if err := decoder.Decode(&rawBody); err != nil {
return err
}
+
e.ServiceError = &ServiceError{
Code: "Unknown",
Message: "Unknown service error",
diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/environments.go b/vendor/github.com/Azure/go-autorest/autorest/azure/environments.go
index 6c20b8179..9bbc0899e 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/azure/environments.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/azure/environments.go
@@ -46,6 +46,8 @@ type ResourceIdentifier struct {
Batch string `json:"batch"`
OperationalInsights string `json:"operationalInsights"`
Storage string `json:"storage"`
+ Synapse string `json:"synapse"`
+ ServiceBus string `json:"serviceBus"`
}
// Environment represents a set of endpoints for each of Azure's Clouds.
@@ -71,6 +73,8 @@ type Environment struct {
ContainerRegistryDNSSuffix string `json:"containerRegistryDNSSuffix"`
CosmosDBDNSSuffix string `json:"cosmosDBDNSSuffix"`
TokenAudience string `json:"tokenAudience"`
+ APIManagementHostNameSuffix string `json:"apiManagementHostNameSuffix"`
+ SynapseEndpointSuffix string `json:"synapseEndpointSuffix"`
ResourceIdentifiers ResourceIdentifier `json:"resourceIdentifiers"`
}
@@ -98,6 +102,8 @@ var (
ContainerRegistryDNSSuffix: "azurecr.io",
CosmosDBDNSSuffix: "documents.azure.com",
TokenAudience: "https://management.azure.com/",
+ APIManagementHostNameSuffix: "azure-api.net",
+ SynapseEndpointSuffix: "dev.azuresynapse.net",
ResourceIdentifiers: ResourceIdentifier{
Graph: "https://graph.windows.net/",
KeyVault: "https://vault.azure.net",
@@ -105,6 +111,8 @@ var (
Batch: "https://batch.core.windows.net/",
OperationalInsights: "https://api.loganalytics.io",
Storage: "https://storage.azure.com/",
+ Synapse: "https://dev.azuresynapse.net",
+ ServiceBus: "https://servicebus.azure.net/",
},
}
@@ -127,10 +135,12 @@ var (
KeyVaultDNSSuffix: "vault.usgovcloudapi.net",
ServiceBusEndpointSuffix: "servicebus.usgovcloudapi.net",
ServiceManagementVMDNSSuffix: "usgovcloudapp.net",
- ResourceManagerVMDNSSuffix: "cloudapp.windowsazure.us",
+ ResourceManagerVMDNSSuffix: "cloudapp.usgovcloudapi.net",
ContainerRegistryDNSSuffix: "azurecr.us",
CosmosDBDNSSuffix: "documents.azure.us",
TokenAudience: "https://management.usgovcloudapi.net/",
+ APIManagementHostNameSuffix: "azure-api.us",
+ SynapseEndpointSuffix: NotAvailable,
ResourceIdentifiers: ResourceIdentifier{
Graph: "https://graph.windows.net/",
KeyVault: "https://vault.usgovcloudapi.net",
@@ -138,6 +148,8 @@ var (
Batch: "https://batch.core.usgovcloudapi.net/",
OperationalInsights: "https://api.loganalytics.us",
Storage: "https://storage.azure.com/",
+ Synapse: NotAvailable,
+ ServiceBus: "https://servicebus.azure.net/",
},
}
@@ -160,10 +172,12 @@ var (
KeyVaultDNSSuffix: "vault.azure.cn",
ServiceBusEndpointSuffix: "servicebus.chinacloudapi.cn",
ServiceManagementVMDNSSuffix: "chinacloudapp.cn",
- ResourceManagerVMDNSSuffix: "cloudapp.azure.cn",
+ ResourceManagerVMDNSSuffix: "cloudapp.chinacloudapi.cn",
ContainerRegistryDNSSuffix: "azurecr.cn",
CosmosDBDNSSuffix: "documents.azure.cn",
TokenAudience: "https://management.chinacloudapi.cn/",
+ APIManagementHostNameSuffix: "azure-api.cn",
+ SynapseEndpointSuffix: "dev.azuresynapse.azure.cn",
ResourceIdentifiers: ResourceIdentifier{
Graph: "https://graph.chinacloudapi.cn/",
KeyVault: "https://vault.azure.cn",
@@ -171,6 +185,8 @@ var (
Batch: "https://batch.chinacloudapi.cn/",
OperationalInsights: NotAvailable,
Storage: "https://storage.azure.com/",
+ Synapse: "https://dev.azuresynapse.net",
+ ServiceBus: "https://servicebus.azure.net/",
},
}
@@ -197,6 +213,8 @@ var (
ContainerRegistryDNSSuffix: NotAvailable,
CosmosDBDNSSuffix: "documents.microsoftazure.de",
TokenAudience: "https://management.microsoftazure.de/",
+ APIManagementHostNameSuffix: NotAvailable,
+ SynapseEndpointSuffix: NotAvailable,
ResourceIdentifiers: ResourceIdentifier{
Graph: "https://graph.cloudapi.de/",
KeyVault: "https://vault.microsoftazure.de",
@@ -204,6 +222,8 @@ var (
Batch: "https://batch.cloudapi.de/",
OperationalInsights: NotAvailable,
Storage: "https://storage.azure.com/",
+ Synapse: NotAvailable,
+ ServiceBus: "https://servicebus.azure.net/",
},
}
)
@@ -242,3 +262,8 @@ func EnvironmentFromFile(location string) (unmarshaled Environment, err error) {
return
}
+
+// SetEnvironment updates the environment map with the specified values.
+func SetEnvironment(name string, env Environment) {
+ environments[strings.ToUpper(name)] = env
+}
diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/rp.go b/vendor/github.com/Azure/go-autorest/autorest/azure/rp.go
index 86ce9f2b5..c6d39f686 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/azure/rp.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/azure/rp.go
@@ -47,11 +47,15 @@ func DoRetryWithRegistration(client autorest.Client) autorest.SendDecorator {
if resp.StatusCode != http.StatusConflict || client.SkipResourceProviderRegistration {
return resp, err
}
+
var re RequestError
- err = autorest.Respond(
- resp,
- autorest.ByUnmarshallingJSON(&re),
- )
+ if strings.Contains(r.Header.Get("Content-Type"), "xml") {
+ // XML errors (e.g. Storage Data Plane) only return the inner object
+ err = autorest.Respond(resp, autorest.ByUnmarshallingXML(&re.ServiceError))
+ } else {
+ err = autorest.Respond(resp, autorest.ByUnmarshallingJSON(&re))
+ }
+
if err != nil {
return resp, err
}
diff --git a/vendor/github.com/Azure/go-autorest/autorest/client.go b/vendor/github.com/Azure/go-autorest/autorest/client.go
index 1c6a0617a..e04f9fd4e 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/client.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/client.go
@@ -179,6 +179,11 @@ type Client struct {
// Set to true to skip attempted registration of resource providers (false by default).
SkipResourceProviderRegistration bool
+
+ // SendDecorators can be used to override the default chain of SendDecorators.
+ // This can be used to specify things like a custom retry SendDecorator.
+ // Set this to an empty slice to use no SendDecorators.
+ SendDecorators []SendDecorator
}
// NewClientWithUserAgent returns an instance of a Client with the UserAgent set to the passed
@@ -298,3 +303,21 @@ func (c Client) ByInspecting() RespondDecorator {
}
return c.ResponseInspector
}
+
+// Send sends the provided http.Request using the client's Sender or the default sender.
+// It returns the http.Response and possible error. It also accepts a, possibly empty,
+// default set of SendDecorators used when sending the request.
+// SendDecorators have the following precedence:
+// 1. In a request's context via WithSendDecorators()
+// 2. Specified on the client in SendDecorators
+// 3. The default values specified in this method
+func (c Client) Send(req *http.Request, decorators ...SendDecorator) (*http.Response, error) {
+ if c.SendDecorators != nil {
+ decorators = c.SendDecorators
+ }
+ inCtx := req.Context().Value(ctxSendDecorators{})
+ if sd, ok := inCtx.([]SendDecorator); ok {
+ decorators = sd
+ }
+ return SendWithSender(c, req, decorators...)
+}
diff --git a/vendor/github.com/Azure/go-autorest/autorest/date/go.mod b/vendor/github.com/Azure/go-autorest/autorest/date/go.mod
deleted file mode 100644
index 13a1e9803..000000000
--- a/vendor/github.com/Azure/go-autorest/autorest/date/go.mod
+++ /dev/null
@@ -1,3 +0,0 @@
-module github.com/Azure/go-autorest/autorest/date
-
-go 1.12
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
new file mode 100644
index 000000000..4e0543207
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/autorest/date/go_mod_tidy_hack.go
@@ -0,0 +1,24 @@
+// +build modhack
+
+package date
+
+// 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.
+
+// 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"
diff --git a/vendor/github.com/Azure/go-autorest/autorest/go.mod b/vendor/github.com/Azure/go-autorest/autorest/go.mod
deleted file mode 100644
index ab2ae66ac..000000000
--- a/vendor/github.com/Azure/go-autorest/autorest/go.mod
+++ /dev/null
@@ -1,11 +0,0 @@
-module github.com/Azure/go-autorest/autorest
-
-go 1.12
-
-require (
- github.com/Azure/go-autorest/autorest/adal v0.5.0
- github.com/Azure/go-autorest/autorest/mocks v0.2.0
- github.com/Azure/go-autorest/logger v0.1.0
- github.com/Azure/go-autorest/tracing v0.5.0
- golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
-)
diff --git a/vendor/github.com/Azure/go-autorest/autorest/go.sum b/vendor/github.com/Azure/go-autorest/autorest/go.sum
deleted file mode 100644
index 729b99cd0..000000000
--- a/vendor/github.com/Azure/go-autorest/autorest/go.sum
+++ /dev/null
@@ -1,18 +0,0 @@
-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 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/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 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M=
-golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-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/go_mod_tidy_hack.go b/vendor/github.com/Azure/go-autorest/autorest/go_mod_tidy_hack.go
new file mode 100644
index 000000000..da65e1041
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/autorest/go_mod_tidy_hack.go
@@ -0,0 +1,24 @@
+// +build modhack
+
+package autorest
+
+// 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.
+
+// 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"
diff --git a/vendor/github.com/Azure/go-autorest/autorest/mocks/go.mod b/vendor/github.com/Azure/go-autorest/autorest/mocks/go.mod
deleted file mode 100644
index 4d726a44e..000000000
--- a/vendor/github.com/Azure/go-autorest/autorest/mocks/go.mod
+++ /dev/null
@@ -1,3 +0,0 @@
-module github.com/Azure/go-autorest/autorest/mocks
-
-go 1.12
diff --git a/vendor/github.com/Azure/go-autorest/autorest/mocks/go_mod_tidy_hack.go b/vendor/github.com/Azure/go-autorest/autorest/mocks/go_mod_tidy_hack.go
new file mode 100644
index 000000000..85a4baf10
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/autorest/mocks/go_mod_tidy_hack.go
@@ -0,0 +1,24 @@
+// +build modhack
+
+package mocks
+
+// 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.
+
+// 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"
diff --git a/vendor/github.com/Azure/go-autorest/autorest/mocks/mocks.go b/vendor/github.com/Azure/go-autorest/autorest/mocks/mocks.go
index a00a27dd8..18847ba0f 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/mocks/mocks.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/mocks/mocks.go
@@ -131,7 +131,13 @@ func (c *Sender) Do(r *http.Request) (resp *http.Response, err error) {
} else {
err = c.responses[0].e
}
- time.Sleep(c.responses[0].d)
+ select {
+ case <-time.After(c.responses[0].d):
+ // do nothing
+ case <-r.Context().Done():
+ err = r.Context().Err()
+ return
+ }
c.repeatResponse[0]--
if c.repeatResponse[0] == 0 {
c.responses = c.responses[1:]
diff --git a/vendor/github.com/Azure/go-autorest/autorest/preparer.go b/vendor/github.com/Azure/go-autorest/autorest/preparer.go
index 9f864ab1a..98574a415 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/preparer.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/preparer.go
@@ -127,10 +127,7 @@ func WithHeader(header string, value string) PrepareDecorator {
return PreparerFunc(func(r *http.Request) (*http.Request, error) {
r, err := p.Prepare(r)
if err == nil {
- if r.Header == nil {
- r.Header = make(http.Header)
- }
- r.Header.Set(http.CanonicalHeaderKey(header), value)
+ setHeader(r, http.CanonicalHeaderKey(header), value)
}
return r, err
})
@@ -230,7 +227,7 @@ func AsPost() PrepareDecorator { return WithMethod("POST") }
func AsPut() PrepareDecorator { return WithMethod("PUT") }
// WithBaseURL returns a PrepareDecorator that populates the http.Request with a url.URL constructed
-// from the supplied baseUrl.
+// from the supplied baseUrl. Query parameters will be encoded as required.
func WithBaseURL(baseURL string) PrepareDecorator {
return func(p Preparer) Preparer {
return PreparerFunc(func(r *http.Request) (*http.Request, error) {
@@ -241,11 +238,16 @@ func WithBaseURL(baseURL string) PrepareDecorator {
return r, err
}
if u.Scheme == "" {
- err = fmt.Errorf("autorest: No scheme detected in URL %s", baseURL)
+ return r, fmt.Errorf("autorest: No scheme detected in URL %s", baseURL)
}
- if err == nil {
- r.URL = u
+ if u.RawQuery != "" {
+ q, err := url.ParseQuery(u.RawQuery)
+ if err != nil {
+ return r, err
+ }
+ u.RawQuery = q.Encode()
}
+ r.URL = u
}
return r, err
})
@@ -290,10 +292,7 @@ func WithFormData(v url.Values) PrepareDecorator {
if err == nil {
s := v.Encode()
- if r.Header == nil {
- r.Header = make(http.Header)
- }
- r.Header.Set(http.CanonicalHeaderKey(headerContentType), mimeTypeFormPost)
+ setHeader(r, http.CanonicalHeaderKey(headerContentType), mimeTypeFormPost)
r.ContentLength = int64(len(s))
r.Body = ioutil.NopCloser(strings.NewReader(s))
}
@@ -329,10 +328,7 @@ func WithMultiPartFormData(formDataParameters map[string]interface{}) PrepareDec
if err = writer.Close(); err != nil {
return r, err
}
- if r.Header == nil {
- r.Header = make(http.Header)
- }
- r.Header.Set(http.CanonicalHeaderKey(headerContentType), writer.FormDataContentType())
+ setHeader(r, http.CanonicalHeaderKey(headerContentType), writer.FormDataContentType())
r.Body = ioutil.NopCloser(bytes.NewReader(body.Bytes()))
r.ContentLength = int64(body.Len())
return r, err
@@ -437,6 +433,7 @@ func WithXML(v interface{}) PrepareDecorator {
bytesWithHeader := []byte(withHeader)
r.ContentLength = int64(len(bytesWithHeader))
+ setHeader(r, headerContentLength, fmt.Sprintf("%d", len(bytesWithHeader)))
r.Body = ioutil.NopCloser(bytes.NewReader(bytesWithHeader))
}
}
@@ -523,7 +520,7 @@ func parseURL(u *url.URL, path string) (*url.URL, error) {
// WithQueryParameters returns a PrepareDecorators that encodes and applies the query parameters
// given in the supplied map (i.e., key=value).
func WithQueryParameters(queryParameters map[string]interface{}) PrepareDecorator {
- parameters := ensureValueStrings(queryParameters)
+ parameters := MapToValues(queryParameters)
return func(p Preparer) Preparer {
return PreparerFunc(func(r *http.Request) (*http.Request, error) {
r, err := p.Prepare(r)
@@ -531,14 +528,16 @@ func WithQueryParameters(queryParameters map[string]interface{}) PrepareDecorato
if r.URL == nil {
return r, NewError("autorest", "WithQueryParameters", "Invoked with a nil URL")
}
-
v := r.URL.Query()
for key, value := range parameters {
- d, err := url.QueryUnescape(value)
- if err != nil {
- return r, err
+ for i := range value {
+ d, err := url.QueryUnescape(value[i])
+ if err != nil {
+ return r, err
+ }
+ value[i] = d
}
- v.Add(key, d)
+ v[key] = value
}
r.URL.RawQuery = v.Encode()
}
diff --git a/vendor/github.com/Azure/go-autorest/autorest/sender.go b/vendor/github.com/Azure/go-autorest/autorest/sender.go
index e582489b3..78610ef20 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/sender.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/sender.go
@@ -23,11 +23,29 @@ import (
"net/http"
"net/http/cookiejar"
"strconv"
+ "sync"
"time"
"github.com/Azure/go-autorest/tracing"
)
+// there is one sender per TLS renegotiation type, i.e. count of tls.RenegotiationSupport enums
+const defaultSendersCount = 3
+
+type defaultSender struct {
+ sender Sender
+ init *sync.Once
+}
+
+// each type of sender will be created on demand in sender()
+var defaultSenders [defaultSendersCount]defaultSender
+
+func init() {
+ for i := 0; i < defaultSendersCount; i++ {
+ defaultSenders[i].init = &sync.Once{}
+ }
+}
+
// used as a key type in context.WithValue()
type ctxSendDecorators struct{}
@@ -107,26 +125,31 @@ func SendWithSender(s Sender, r *http.Request, decorators ...SendDecorator) (*ht
}
func sender(renengotiation tls.RenegotiationSupport) Sender {
- // Use behaviour compatible with DefaultTransport, but require TLS minimum version.
- defaultTransport := http.DefaultTransport.(*http.Transport)
- transport := &http.Transport{
- Proxy: defaultTransport.Proxy,
- DialContext: defaultTransport.DialContext,
- MaxIdleConns: defaultTransport.MaxIdleConns,
- IdleConnTimeout: defaultTransport.IdleConnTimeout,
- TLSHandshakeTimeout: defaultTransport.TLSHandshakeTimeout,
- ExpectContinueTimeout: defaultTransport.ExpectContinueTimeout,
- TLSClientConfig: &tls.Config{
- MinVersion: tls.VersionTLS12,
- Renegotiation: renengotiation,
- },
- }
- var roundTripper http.RoundTripper = transport
- if tracing.IsEnabled() {
- roundTripper = tracing.NewTransport(transport)
- }
- j, _ := cookiejar.New(nil)
- return &http.Client{Jar: j, Transport: roundTripper}
+ // note that we can't init defaultSenders in init() since it will
+ // execute before calling code has had a chance to enable tracing
+ defaultSenders[renengotiation].init.Do(func() {
+ // Use behaviour compatible with DefaultTransport, but require TLS minimum version.
+ defaultTransport := http.DefaultTransport.(*http.Transport)
+ transport := &http.Transport{
+ Proxy: defaultTransport.Proxy,
+ DialContext: defaultTransport.DialContext,
+ MaxIdleConns: defaultTransport.MaxIdleConns,
+ IdleConnTimeout: defaultTransport.IdleConnTimeout,
+ TLSHandshakeTimeout: defaultTransport.TLSHandshakeTimeout,
+ ExpectContinueTimeout: defaultTransport.ExpectContinueTimeout,
+ TLSClientConfig: &tls.Config{
+ MinVersion: tls.VersionTLS12,
+ Renegotiation: renengotiation,
+ },
+ }
+ var roundTripper http.RoundTripper = transport
+ if tracing.IsEnabled() {
+ roundTripper = tracing.NewTransport(transport)
+ }
+ j, _ := cookiejar.New(nil)
+ defaultSenders[renengotiation].sender = &http.Client{Jar: j, Transport: roundTripper}
+ })
+ return defaultSenders[renengotiation].sender
}
// AfterDelay returns a SendDecorator that delays for the passed time.Duration before
@@ -243,6 +266,7 @@ func DoRetryForAttempts(attempts int, backoff time.Duration) SendDecorator {
if err != nil {
return resp, err
}
+ DrainResponseBody(resp)
resp, err = s.Do(rr.Request())
if err == nil {
return resp, err
@@ -256,6 +280,12 @@ func DoRetryForAttempts(attempts int, backoff time.Duration) SendDecorator {
}
}
+// Count429AsRetry indicates that a 429 response should be included as a retry attempt.
+var Count429AsRetry = true
+
+// Max429Delay is the maximum duration to wait between retries on a 429 if no Retry-After header was received.
+var Max429Delay time.Duration
+
// DoRetryForStatusCodes returns a SendDecorator that retries for specified statusCodes for up to the specified
// number of attempts, exponentially backing off between requests using the supplied backoff
// time.Duration (which may be zero). Retrying may be canceled by cancelling the context on the http.Request.
@@ -263,7 +293,7 @@ func DoRetryForAttempts(attempts int, backoff time.Duration) SendDecorator {
func DoRetryForStatusCodes(attempts int, backoff time.Duration, codes ...int) SendDecorator {
return func(s Sender) Sender {
return SenderFunc(func(r *http.Request) (*http.Response, error) {
- return doRetryForStatusCodesImpl(s, r, false, attempts, backoff, 0, codes...)
+ return doRetryForStatusCodesImpl(s, r, Count429AsRetry, attempts, backoff, 0, codes...)
})
}
}
@@ -275,7 +305,7 @@ func DoRetryForStatusCodes(attempts int, backoff time.Duration, codes ...int) Se
func DoRetryForStatusCodesWithCap(attempts int, backoff, cap time.Duration, codes ...int) SendDecorator {
return func(s Sender) Sender {
return SenderFunc(func(r *http.Request) (*http.Response, error) {
- return doRetryForStatusCodesImpl(s, r, true, attempts, backoff, cap, codes...)
+ return doRetryForStatusCodesImpl(s, r, Count429AsRetry, attempts, backoff, cap, codes...)
})
}
}
@@ -283,23 +313,25 @@ func DoRetryForStatusCodesWithCap(attempts int, backoff, cap time.Duration, code
func doRetryForStatusCodesImpl(s Sender, r *http.Request, count429 bool, attempts int, backoff, cap time.Duration, codes ...int) (resp *http.Response, err error) {
rr := NewRetriableRequest(r)
// Increment to add the first call (attempts denotes number of retries)
- for attempt := 0; attempt < attempts+1; {
+ for attempt, delayCount := 0, 0; attempt < attempts+1; {
err = rr.Prepare()
if err != nil {
return
}
+ DrainResponseBody(resp)
resp, err = s.Do(rr.Request())
- // if the error isn't temporary don't bother retrying
- if err != nil && !IsTemporaryNetworkError(err) {
- return
- }
// we want to retry if err is not nil (e.g. transient network failure). note that for failed authentication
// resp and err will both have a value, so in this case we don't want to retry as it will never succeed.
if err == nil && !ResponseHasStatusCode(resp, codes...) || IsTokenRefreshError(err) {
return resp, err
}
delayed := DelayWithRetryAfter(resp, r.Context().Done())
- if !delayed && !DelayForBackoffWithCap(backoff, cap, attempt, r.Context().Done()) {
+ // if this was a 429 set the delay cap as specified.
+ // applicable only in the absence of a retry-after header.
+ if resp != nil && resp.StatusCode == http.StatusTooManyRequests {
+ cap = Max429Delay
+ }
+ if !delayed && !DelayForBackoffWithCap(backoff, cap, delayCount, r.Context().Done()) {
return resp, r.Context().Err()
}
// when count429 == false don't count a 429 against the number
@@ -307,6 +339,9 @@ func doRetryForStatusCodesImpl(s Sender, r *http.Request, count429 bool, attempt
if count429 || (resp == nil || resp.StatusCode != http.StatusTooManyRequests) {
attempt++
}
+ // delay count is tracked separately from attempts to
+ // ensure that 429 participates in exponential back-off
+ delayCount++
}
return resp, err
}
@@ -351,6 +386,7 @@ func DoRetryForDuration(d time.Duration, backoff time.Duration) SendDecorator {
if err != nil {
return resp, err
}
+ DrainResponseBody(resp)
resp, err = s.Do(rr.Request())
if err == nil {
return resp, err
diff --git a/vendor/github.com/Azure/go-autorest/autorest/to/go.mod b/vendor/github.com/Azure/go-autorest/autorest/to/go.mod
deleted file mode 100644
index a2054be36..000000000
--- a/vendor/github.com/Azure/go-autorest/autorest/to/go.mod
+++ /dev/null
@@ -1,3 +0,0 @@
-module github.com/Azure/go-autorest/autorest/to
-
-go 1.12
diff --git a/vendor/github.com/Azure/go-autorest/autorest/utility.go b/vendor/github.com/Azure/go-autorest/autorest/utility.go
index 08cf11c11..416041c3f 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/utility.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/utility.go
@@ -20,6 +20,7 @@ import (
"encoding/xml"
"fmt"
"io"
+ "io/ioutil"
"net"
"net/http"
"net/url"
@@ -140,18 +141,18 @@ func MapToValues(m map[string]interface{}) url.Values {
return v
}
-// AsStringSlice method converts interface{} to []string. This expects a
-//that the parameter passed to be a slice or array of a type that has the underlying
-//type a string.
+// AsStringSlice method converts interface{} to []string.
+// s must be of type slice or array or an error is returned.
+// Each element of s will be converted to its string representation.
func AsStringSlice(s interface{}) ([]string, error) {
v := reflect.ValueOf(s)
if v.Kind() != reflect.Slice && v.Kind() != reflect.Array {
- return nil, NewError("autorest", "AsStringSlice", "the value's type is not an array.")
+ return nil, NewError("autorest", "AsStringSlice", "the value's type is not a slice or array.")
}
stringSlice := make([]string, 0, v.Len())
for i := 0; i < v.Len(); i++ {
- stringSlice = append(stringSlice, v.Index(i).String())
+ stringSlice = append(stringSlice, fmt.Sprintf("%v", v.Index(i)))
}
return stringSlice, nil
}
@@ -226,3 +227,20 @@ func IsTemporaryNetworkError(err error) bool {
}
return false
}
+
+// DrainResponseBody reads the response body then closes it.
+func DrainResponseBody(resp *http.Response) error {
+ if resp != nil && resp.Body != nil {
+ _, err := io.Copy(ioutil.Discard, resp.Body)
+ resp.Body.Close()
+ return err
+ }
+ return nil
+}
+
+func setHeader(r *http.Request, key, value string) {
+ if r.Header == nil {
+ r.Header = make(http.Header)
+ }
+ r.Header.Set(key, value)
+}
diff --git a/vendor/github.com/Azure/go-autorest/autorest/validation/go.mod b/vendor/github.com/Azure/go-autorest/autorest/validation/go.mod
deleted file mode 100644
index c44c51ff6..000000000
--- a/vendor/github.com/Azure/go-autorest/autorest/validation/go.mod
+++ /dev/null
@@ -1,5 +0,0 @@
-module github.com/Azure/go-autorest/autorest/validation
-
-go 1.12
-
-require 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
deleted file mode 100644
index 4347755af..000000000
--- a/vendor/github.com/Azure/go-autorest/autorest/validation/go.sum
+++ /dev/null
@@ -1,7 +0,0 @@
-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/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=
diff --git a/vendor/github.com/Azure/go-autorest/autorest/version.go b/vendor/github.com/Azure/go-autorest/autorest/version.go
index cb851937a..713e23581 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/version.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/version.go
@@ -19,7 +19,7 @@ import (
"runtime"
)
-const number = "v13.0.0"
+const number = "v14.2.1"
var (
userAgent = fmt.Sprintf("Go/%s (%s-%s) go-autorest/%s",
diff --git a/vendor/github.com/Azure/go-autorest/azure-pipelines.yml b/vendor/github.com/Azure/go-autorest/azure-pipelines.yml
new file mode 100644
index 000000000..6fb8404fd
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/azure-pipelines.yml
@@ -0,0 +1,105 @@
+variables:
+ GOPATH: '$(system.defaultWorkingDirectory)/work'
+ sdkPath: '$(GOPATH)/src/github.com/$(build.repository.name)'
+
+jobs:
+ - job: 'goautorest'
+ displayName: 'Run go-autorest CI Checks'
+
+ strategy:
+ matrix:
+ Linux_Go113:
+ vm.image: 'ubuntu-18.04'
+ go.version: '1.13'
+ Linux_Go114:
+ vm.image: 'ubuntu-18.04'
+ go.version: '1.14'
+
+ pool:
+ vmImage: '$(vm.image)'
+
+ steps:
+ - task: GoTool@0
+ inputs:
+ version: '$(go.version)'
+ displayName: "Select Go Version"
+
+ - script: |
+ set -e
+ mkdir -p '$(GOPATH)/bin'
+ mkdir -p '$(sdkPath)'
+ shopt -s extglob
+ mv !(work) '$(sdkPath)'
+ echo '##vso[task.prependpath]$(GOPATH)/bin'
+ displayName: 'Create Go Workspace'
+
+ - script: |
+ set -e
+ curl -sSL https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
+ dep ensure -v
+ go install ./vendor/golang.org/x/lint/golint
+ go get github.com/jstemmer/go-junit-report
+ go get github.com/axw/gocov/gocov
+ go get github.com/AlekSi/gocov-xml
+ go get -u github.com/matm/gocov-html
+ workingDirectory: '$(sdkPath)'
+ displayName: 'Install Dependencies'
+
+ - script: |
+ go vet ./autorest/...
+ go vet ./logger/...
+ go vet ./tracing/...
+ workingDirectory: '$(sdkPath)'
+ displayName: 'Vet'
+
+ - script: |
+ go build -v ./autorest/...
+ go build -v ./logger/...
+ go build -v ./tracing/...
+ workingDirectory: '$(sdkPath)'
+ displayName: 'Build'
+
+ - script: |
+ set -e
+ go test -race -v -coverprofile=coverage.txt -covermode atomic ./autorest/... ./logger/... ./tracing/... 2>&1 | go-junit-report > report.xml
+ gocov convert coverage.txt > coverage.json
+ gocov-xml < coverage.json > coverage.xml
+ gocov-html < coverage.json > coverage.html
+ workingDirectory: '$(sdkPath)'
+ displayName: 'Run Tests'
+
+ - script: grep -L -r --include *.go --exclude-dir vendor -P "Copyright (\d{4}|\(c\)) Microsoft" ./ | tee >&2
+ workingDirectory: '$(sdkPath)'
+ displayName: 'Copyright Header Check'
+ failOnStderr: true
+ condition: succeededOrFailed()
+
+ - script: |
+ gofmt -s -l -w ./autorest/. >&2
+ gofmt -s -l -w ./logger/. >&2
+ gofmt -s -l -w ./tracing/. >&2
+ workingDirectory: '$(sdkPath)'
+ displayName: 'Format Check'
+ failOnStderr: true
+ condition: succeededOrFailed()
+
+ - script: |
+ golint ./autorest/... >&2
+ golint ./logger/... >&2
+ golint ./tracing/... >&2
+ workingDirectory: '$(sdkPath)'
+ displayName: 'Linter Check'
+ failOnStderr: true
+ condition: succeededOrFailed()
+
+ - task: PublishTestResults@2
+ inputs:
+ testRunner: JUnit
+ testResultsFiles: $(sdkPath)/report.xml
+ failTaskOnFailedTests: true
+
+ - task: PublishCodeCoverageResults@1
+ inputs:
+ codeCoverageTool: Cobertura
+ summaryFileLocation: $(sdkPath)/coverage.xml
+ additionalCodeCoverageFiles: $(sdkPath)/coverage.html
diff --git a/vendor/github.com/Azure/go-autorest/doc.go b/vendor/github.com/Azure/go-autorest/doc.go
new file mode 100644
index 000000000..99ae6ca98
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/doc.go
@@ -0,0 +1,18 @@
+/*
+Package go-autorest provides an HTTP request client for use with Autorest-generated API client packages.
+*/
+package go_autorest
+
+// 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.
diff --git a/vendor/github.com/Azure/go-autorest/logger/go.mod b/vendor/github.com/Azure/go-autorest/logger/go.mod
deleted file mode 100644
index f22ed56bc..000000000
--- a/vendor/github.com/Azure/go-autorest/logger/go.mod
+++ /dev/null
@@ -1,3 +0,0 @@
-module github.com/Azure/go-autorest/logger
-
-go 1.12
diff --git a/vendor/github.com/Azure/go-autorest/logger/go_mod_tidy_hack.go b/vendor/github.com/Azure/go-autorest/logger/go_mod_tidy_hack.go
new file mode 100644
index 000000000..0aa27680d
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/logger/go_mod_tidy_hack.go
@@ -0,0 +1,24 @@
+// +build modhack
+
+package logger
+
+// 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.
+
+// 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"
diff --git a/vendor/github.com/Azure/go-autorest/tracing/go.mod b/vendor/github.com/Azure/go-autorest/tracing/go.mod
deleted file mode 100644
index 25c34c108..000000000
--- a/vendor/github.com/Azure/go-autorest/tracing/go.mod
+++ /dev/null
@@ -1,3 +0,0 @@
-module github.com/Azure/go-autorest/tracing
-
-go 1.12
diff --git a/vendor/github.com/Azure/go-autorest/tracing/go_mod_tidy_hack.go b/vendor/github.com/Azure/go-autorest/tracing/go_mod_tidy_hack.go
new file mode 100644
index 000000000..e163975cd
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/tracing/go_mod_tidy_hack.go
@@ -0,0 +1,24 @@
+// +build modhack
+
+package tracing
+
+// 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.
+
+// 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"
diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/filter/filter.go b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/filter/filter.go
index e005c8fc3..fbf0f508d 100644
--- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/filter/filter.go
+++ b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/filter/filter.go
@@ -34,7 +34,7 @@ import (
"regexp"
"strings"
- "k8s.io/klog"
+ "k8s.io/klog/v2"
)
var (
diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/gen.go b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/gen.go
index da514d2d6..44bdba5a8 100644
--- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/gen.go
+++ b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/gen.go
@@ -1,5 +1,5 @@
/*
-Copyright 2019 Google LLC
+Copyright 2020 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -26,7 +26,7 @@ import (
"sync"
"google.golang.org/api/googleapi"
- "k8s.io/klog"
+ "k8s.io/klog/v2"
"github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/filter"
"github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta"
@@ -51,6 +51,8 @@ type Cloud interface {
BetaRegionBackendServices() BetaRegionBackendServices
Disks() Disks
RegionDisks() RegionDisks
+ AlphaFirewalls() AlphaFirewalls
+ BetaFirewalls() BetaFirewalls
Firewalls() Firewalls
ForwardingRules() ForwardingRules
AlphaForwardingRules() AlphaForwardingRules
@@ -63,6 +65,7 @@ type Cloud interface {
BetaHealthChecks() BetaHealthChecks
AlphaRegionHealthChecks() AlphaRegionHealthChecks
BetaRegionHealthChecks() BetaRegionHealthChecks
+ RegionHealthChecks() RegionHealthChecks
HttpHealthChecks() HttpHealthChecks
HttpsHealthChecks() HttpsHealthChecks
InstanceGroups() InstanceGroups
@@ -84,6 +87,8 @@ type Cloud interface {
AlphaSslCertificates() AlphaSslCertificates
AlphaRegionSslCertificates() AlphaRegionSslCertificates
BetaRegionSslCertificates() BetaRegionSslCertificates
+ RegionSslCertificates() RegionSslCertificates
+ SslPolicies() SslPolicies
AlphaSubnetworks() AlphaSubnetworks
BetaSubnetworks() BetaSubnetworks
Subnetworks() Subnetworks
@@ -92,17 +97,20 @@ type Cloud interface {
TargetHttpProxies() TargetHttpProxies
AlphaRegionTargetHttpProxies() AlphaRegionTargetHttpProxies
BetaRegionTargetHttpProxies() BetaRegionTargetHttpProxies
+ RegionTargetHttpProxies() RegionTargetHttpProxies
TargetHttpsProxies() TargetHttpsProxies
AlphaTargetHttpsProxies() AlphaTargetHttpsProxies
BetaTargetHttpsProxies() BetaTargetHttpsProxies
AlphaRegionTargetHttpsProxies() AlphaRegionTargetHttpsProxies
BetaRegionTargetHttpsProxies() BetaRegionTargetHttpsProxies
+ RegionTargetHttpsProxies() RegionTargetHttpsProxies
TargetPools() TargetPools
AlphaUrlMaps() AlphaUrlMaps
BetaUrlMaps() BetaUrlMaps
UrlMaps() UrlMaps
AlphaRegionUrlMaps() AlphaRegionUrlMaps
BetaRegionUrlMaps() BetaRegionUrlMaps
+ RegionUrlMaps() RegionUrlMaps
Zones() Zones
}
@@ -122,6 +130,8 @@ func NewGCE(s *Service) *GCE {
gceBetaRegionBackendServices: &GCEBetaRegionBackendServices{s},
gceDisks: &GCEDisks{s},
gceRegionDisks: &GCERegionDisks{s},
+ gceAlphaFirewalls: &GCEAlphaFirewalls{s},
+ gceBetaFirewalls: &GCEBetaFirewalls{s},
gceFirewalls: &GCEFirewalls{s},
gceForwardingRules: &GCEForwardingRules{s},
gceAlphaForwardingRules: &GCEAlphaForwardingRules{s},
@@ -134,6 +144,7 @@ func NewGCE(s *Service) *GCE {
gceBetaHealthChecks: &GCEBetaHealthChecks{s},
gceAlphaRegionHealthChecks: &GCEAlphaRegionHealthChecks{s},
gceBetaRegionHealthChecks: &GCEBetaRegionHealthChecks{s},
+ gceRegionHealthChecks: &GCERegionHealthChecks{s},
gceHttpHealthChecks: &GCEHttpHealthChecks{s},
gceHttpsHealthChecks: &GCEHttpsHealthChecks{s},
gceInstanceGroups: &GCEInstanceGroups{s},
@@ -155,6 +166,8 @@ func NewGCE(s *Service) *GCE {
gceAlphaSslCertificates: &GCEAlphaSslCertificates{s},
gceAlphaRegionSslCertificates: &GCEAlphaRegionSslCertificates{s},
gceBetaRegionSslCertificates: &GCEBetaRegionSslCertificates{s},
+ gceRegionSslCertificates: &GCERegionSslCertificates{s},
+ gceSslPolicies: &GCESslPolicies{s},
gceAlphaSubnetworks: &GCEAlphaSubnetworks{s},
gceBetaSubnetworks: &GCEBetaSubnetworks{s},
gceSubnetworks: &GCESubnetworks{s},
@@ -163,17 +176,20 @@ func NewGCE(s *Service) *GCE {
gceTargetHttpProxies: &GCETargetHttpProxies{s},
gceAlphaRegionTargetHttpProxies: &GCEAlphaRegionTargetHttpProxies{s},
gceBetaRegionTargetHttpProxies: &GCEBetaRegionTargetHttpProxies{s},
+ gceRegionTargetHttpProxies: &GCERegionTargetHttpProxies{s},
gceTargetHttpsProxies: &GCETargetHttpsProxies{s},
gceAlphaTargetHttpsProxies: &GCEAlphaTargetHttpsProxies{s},
gceBetaTargetHttpsProxies: &GCEBetaTargetHttpsProxies{s},
gceAlphaRegionTargetHttpsProxies: &GCEAlphaRegionTargetHttpsProxies{s},
gceBetaRegionTargetHttpsProxies: &GCEBetaRegionTargetHttpsProxies{s},
+ gceRegionTargetHttpsProxies: &GCERegionTargetHttpsProxies{s},
gceTargetPools: &GCETargetPools{s},
gceAlphaUrlMaps: &GCEAlphaUrlMaps{s},
gceBetaUrlMaps: &GCEBetaUrlMaps{s},
gceUrlMaps: &GCEUrlMaps{s},
gceAlphaRegionUrlMaps: &GCEAlphaRegionUrlMaps{s},
gceBetaRegionUrlMaps: &GCEBetaRegionUrlMaps{s},
+ gceRegionUrlMaps: &GCERegionUrlMaps{s},
gceZones: &GCEZones{s},
}
return g
@@ -197,6 +213,8 @@ type GCE struct {
gceBetaRegionBackendServices *GCEBetaRegionBackendServices
gceDisks *GCEDisks
gceRegionDisks *GCERegionDisks
+ gceAlphaFirewalls *GCEAlphaFirewalls
+ gceBetaFirewalls *GCEBetaFirewalls
gceFirewalls *GCEFirewalls
gceForwardingRules *GCEForwardingRules
gceAlphaForwardingRules *GCEAlphaForwardingRules
@@ -209,6 +227,7 @@ type GCE struct {
gceBetaHealthChecks *GCEBetaHealthChecks
gceAlphaRegionHealthChecks *GCEAlphaRegionHealthChecks
gceBetaRegionHealthChecks *GCEBetaRegionHealthChecks
+ gceRegionHealthChecks *GCERegionHealthChecks
gceHttpHealthChecks *GCEHttpHealthChecks
gceHttpsHealthChecks *GCEHttpsHealthChecks
gceInstanceGroups *GCEInstanceGroups
@@ -230,6 +249,8 @@ type GCE struct {
gceAlphaSslCertificates *GCEAlphaSslCertificates
gceAlphaRegionSslCertificates *GCEAlphaRegionSslCertificates
gceBetaRegionSslCertificates *GCEBetaRegionSslCertificates
+ gceRegionSslCertificates *GCERegionSslCertificates
+ gceSslPolicies *GCESslPolicies
gceAlphaSubnetworks *GCEAlphaSubnetworks
gceBetaSubnetworks *GCEBetaSubnetworks
gceSubnetworks *GCESubnetworks
@@ -238,17 +259,20 @@ type GCE struct {
gceTargetHttpProxies *GCETargetHttpProxies
gceAlphaRegionTargetHttpProxies *GCEAlphaRegionTargetHttpProxies
gceBetaRegionTargetHttpProxies *GCEBetaRegionTargetHttpProxies
+ gceRegionTargetHttpProxies *GCERegionTargetHttpProxies
gceTargetHttpsProxies *GCETargetHttpsProxies
gceAlphaTargetHttpsProxies *GCEAlphaTargetHttpsProxies
gceBetaTargetHttpsProxies *GCEBetaTargetHttpsProxies
gceAlphaRegionTargetHttpsProxies *GCEAlphaRegionTargetHttpsProxies
gceBetaRegionTargetHttpsProxies *GCEBetaRegionTargetHttpsProxies
+ gceRegionTargetHttpsProxies *GCERegionTargetHttpsProxies
gceTargetPools *GCETargetPools
gceAlphaUrlMaps *GCEAlphaUrlMaps
gceBetaUrlMaps *GCEBetaUrlMaps
gceUrlMaps *GCEUrlMaps
gceAlphaRegionUrlMaps *GCEAlphaRegionUrlMaps
gceBetaRegionUrlMaps *GCEBetaRegionUrlMaps
+ gceRegionUrlMaps *GCERegionUrlMaps
gceZones *GCEZones
}
@@ -317,6 +341,16 @@ func (gce *GCE) RegionDisks() RegionDisks {
return gce.gceRegionDisks
}
+// AlphaFirewalls returns the interface for the alpha Firewalls.
+func (gce *GCE) AlphaFirewalls() AlphaFirewalls {
+ return gce.gceAlphaFirewalls
+}
+
+// BetaFirewalls returns the interface for the beta Firewalls.
+func (gce *GCE) BetaFirewalls() BetaFirewalls {
+ return gce.gceBetaFirewalls
+}
+
// Firewalls returns the interface for the ga Firewalls.
func (gce *GCE) Firewalls() Firewalls {
return gce.gceFirewalls
@@ -377,6 +411,11 @@ func (gce *GCE) BetaRegionHealthChecks() BetaRegionHealthChecks {
return gce.gceBetaRegionHealthChecks
}
+// RegionHealthChecks returns the interface for the ga RegionHealthChecks.
+func (gce *GCE) RegionHealthChecks() RegionHealthChecks {
+ return gce.gceRegionHealthChecks
+}
+
// HttpHealthChecks returns the interface for the ga HttpHealthChecks.
func (gce *GCE) HttpHealthChecks() HttpHealthChecks {
return gce.gceHttpHealthChecks
@@ -482,6 +521,16 @@ func (gce *GCE) BetaRegionSslCertificates() BetaRegionSslCertificates {
return gce.gceBetaRegionSslCertificates
}
+// RegionSslCertificates returns the interface for the ga RegionSslCertificates.
+func (gce *GCE) RegionSslCertificates() RegionSslCertificates {
+ return gce.gceRegionSslCertificates
+}
+
+// SslPolicies returns the interface for the ga SslPolicies.
+func (gce *GCE) SslPolicies() SslPolicies {
+ return gce.gceSslPolicies
+}
+
// AlphaSubnetworks returns the interface for the alpha Subnetworks.
func (gce *GCE) AlphaSubnetworks() AlphaSubnetworks {
return gce.gceAlphaSubnetworks
@@ -522,6 +571,11 @@ func (gce *GCE) BetaRegionTargetHttpProxies() BetaRegionTargetHttpProxies {
return gce.gceBetaRegionTargetHttpProxies
}
+// RegionTargetHttpProxies returns the interface for the ga RegionTargetHttpProxies.
+func (gce *GCE) RegionTargetHttpProxies() RegionTargetHttpProxies {
+ return gce.gceRegionTargetHttpProxies
+}
+
// TargetHttpsProxies returns the interface for the ga TargetHttpsProxies.
func (gce *GCE) TargetHttpsProxies() TargetHttpsProxies {
return gce.gceTargetHttpsProxies
@@ -547,6 +601,11 @@ func (gce *GCE) BetaRegionTargetHttpsProxies() BetaRegionTargetHttpsProxies {
return gce.gceBetaRegionTargetHttpsProxies
}
+// RegionTargetHttpsProxies returns the interface for the ga RegionTargetHttpsProxies.
+func (gce *GCE) RegionTargetHttpsProxies() RegionTargetHttpsProxies {
+ return gce.gceRegionTargetHttpsProxies
+}
+
// TargetPools returns the interface for the ga TargetPools.
func (gce *GCE) TargetPools() TargetPools {
return gce.gceTargetPools
@@ -577,6 +636,11 @@ func (gce *GCE) BetaRegionUrlMaps() BetaRegionUrlMaps {
return gce.gceBetaRegionUrlMaps
}
+// RegionUrlMaps returns the interface for the ga RegionUrlMaps.
+func (gce *GCE) RegionUrlMaps() RegionUrlMaps {
+ return gce.gceRegionUrlMaps
+}
+
// Zones returns the interface for the ga Zones.
func (gce *GCE) Zones() Zones {
return gce.gceZones
@@ -610,6 +674,7 @@ func NewMockGCE(projectRouter ProjectRouter) *MockGCE {
mockRoutesObjs := map[meta.Key]*MockRoutesObj{}
mockSecurityPoliciesObjs := map[meta.Key]*MockSecurityPoliciesObj{}
mockSslCertificatesObjs := map[meta.Key]*MockSslCertificatesObj{}
+ mockSslPoliciesObjs := map[meta.Key]*MockSslPoliciesObj{}
mockSubnetworksObjs := map[meta.Key]*MockSubnetworksObj{}
mockTargetHttpProxiesObjs := map[meta.Key]*MockTargetHttpProxiesObj{}
mockTargetHttpsProxiesObjs := map[meta.Key]*MockTargetHttpsProxiesObj{}
@@ -631,6 +696,8 @@ func NewMockGCE(projectRouter ProjectRouter) *MockGCE {
MockBetaRegionBackendServices: NewMockBetaRegionBackendServices(projectRouter, mockRegionBackendServicesObjs),
MockDisks: NewMockDisks(projectRouter, mockDisksObjs),
MockRegionDisks: NewMockRegionDisks(projectRouter, mockRegionDisksObjs),
+ MockAlphaFirewalls: NewMockAlphaFirewalls(projectRouter, mockFirewallsObjs),
+ MockBetaFirewalls: NewMockBetaFirewalls(projectRouter, mockFirewallsObjs),
MockFirewalls: NewMockFirewalls(projectRouter, mockFirewallsObjs),
MockForwardingRules: NewMockForwardingRules(projectRouter, mockForwardingRulesObjs),
MockAlphaForwardingRules: NewMockAlphaForwardingRules(projectRouter, mockForwardingRulesObjs),
@@ -643,6 +710,7 @@ func NewMockGCE(projectRouter ProjectRouter) *MockGCE {
MockBetaHealthChecks: NewMockBetaHealthChecks(projectRouter, mockHealthChecksObjs),
MockAlphaRegionHealthChecks: NewMockAlphaRegionHealthChecks(projectRouter, mockRegionHealthChecksObjs),
MockBetaRegionHealthChecks: NewMockBetaRegionHealthChecks(projectRouter, mockRegionHealthChecksObjs),
+ MockRegionHealthChecks: NewMockRegionHealthChecks(projectRouter, mockRegionHealthChecksObjs),
MockHttpHealthChecks: NewMockHttpHealthChecks(projectRouter, mockHttpHealthChecksObjs),
MockHttpsHealthChecks: NewMockHttpsHealthChecks(projectRouter, mockHttpsHealthChecksObjs),
MockInstanceGroups: NewMockInstanceGroups(projectRouter, mockInstanceGroupsObjs),
@@ -664,6 +732,8 @@ func NewMockGCE(projectRouter ProjectRouter) *MockGCE {
MockAlphaSslCertificates: NewMockAlphaSslCertificates(projectRouter, mockSslCertificatesObjs),
MockAlphaRegionSslCertificates: NewMockAlphaRegionSslCertificates(projectRouter, mockRegionSslCertificatesObjs),
MockBetaRegionSslCertificates: NewMockBetaRegionSslCertificates(projectRouter, mockRegionSslCertificatesObjs),
+ MockRegionSslCertificates: NewMockRegionSslCertificates(projectRouter, mockRegionSslCertificatesObjs),
+ MockSslPolicies: NewMockSslPolicies(projectRouter, mockSslPoliciesObjs),
MockAlphaSubnetworks: NewMockAlphaSubnetworks(projectRouter, mockSubnetworksObjs),
MockBetaSubnetworks: NewMockBetaSubnetworks(projectRouter, mockSubnetworksObjs),
MockSubnetworks: NewMockSubnetworks(projectRouter, mockSubnetworksObjs),
@@ -672,17 +742,20 @@ func NewMockGCE(projectRouter ProjectRouter) *MockGCE {
MockTargetHttpProxies: NewMockTargetHttpProxies(projectRouter, mockTargetHttpProxiesObjs),
MockAlphaRegionTargetHttpProxies: NewMockAlphaRegionTargetHttpProxies(projectRouter, mockRegionTargetHttpProxiesObjs),
MockBetaRegionTargetHttpProxies: NewMockBetaRegionTargetHttpProxies(projectRouter, mockRegionTargetHttpProxiesObjs),
+ MockRegionTargetHttpProxies: NewMockRegionTargetHttpProxies(projectRouter, mockRegionTargetHttpProxiesObjs),
MockTargetHttpsProxies: NewMockTargetHttpsProxies(projectRouter, mockTargetHttpsProxiesObjs),
MockAlphaTargetHttpsProxies: NewMockAlphaTargetHttpsProxies(projectRouter, mockTargetHttpsProxiesObjs),
MockBetaTargetHttpsProxies: NewMockBetaTargetHttpsProxies(projectRouter, mockTargetHttpsProxiesObjs),
MockAlphaRegionTargetHttpsProxies: NewMockAlphaRegionTargetHttpsProxies(projectRouter, mockRegionTargetHttpsProxiesObjs),
MockBetaRegionTargetHttpsProxies: NewMockBetaRegionTargetHttpsProxies(projectRouter, mockRegionTargetHttpsProxiesObjs),
+ MockRegionTargetHttpsProxies: NewMockRegionTargetHttpsProxies(projectRouter, mockRegionTargetHttpsProxiesObjs),
MockTargetPools: NewMockTargetPools(projectRouter, mockTargetPoolsObjs),
MockAlphaUrlMaps: NewMockAlphaUrlMaps(projectRouter, mockUrlMapsObjs),
MockBetaUrlMaps: NewMockBetaUrlMaps(projectRouter, mockUrlMapsObjs),
MockUrlMaps: NewMockUrlMaps(projectRouter, mockUrlMapsObjs),
MockAlphaRegionUrlMaps: NewMockAlphaRegionUrlMaps(projectRouter, mockRegionUrlMapsObjs),
MockBetaRegionUrlMaps: NewMockBetaRegionUrlMaps(projectRouter, mockRegionUrlMapsObjs),
+ MockRegionUrlMaps: NewMockRegionUrlMaps(projectRouter, mockRegionUrlMapsObjs),
MockZones: NewMockZones(projectRouter, mockZonesObjs),
}
return mock
@@ -706,6 +779,8 @@ type MockGCE struct {
MockBetaRegionBackendServices *MockBetaRegionBackendServices
MockDisks *MockDisks
MockRegionDisks *MockRegionDisks
+ MockAlphaFirewalls *MockAlphaFirewalls
+ MockBetaFirewalls *MockBetaFirewalls
MockFirewalls *MockFirewalls
MockForwardingRules *MockForwardingRules
MockAlphaForwardingRules *MockAlphaForwardingRules
@@ -718,6 +793,7 @@ type MockGCE struct {
MockBetaHealthChecks *MockBetaHealthChecks
MockAlphaRegionHealthChecks *MockAlphaRegionHealthChecks
MockBetaRegionHealthChecks *MockBetaRegionHealthChecks
+ MockRegionHealthChecks *MockRegionHealthChecks
MockHttpHealthChecks *MockHttpHealthChecks
MockHttpsHealthChecks *MockHttpsHealthChecks
MockInstanceGroups *MockInstanceGroups
@@ -739,6 +815,8 @@ type MockGCE struct {
MockAlphaSslCertificates *MockAlphaSslCertificates
MockAlphaRegionSslCertificates *MockAlphaRegionSslCertificates
MockBetaRegionSslCertificates *MockBetaRegionSslCertificates
+ MockRegionSslCertificates *MockRegionSslCertificates
+ MockSslPolicies *MockSslPolicies
MockAlphaSubnetworks *MockAlphaSubnetworks
MockBetaSubnetworks *MockBetaSubnetworks
MockSubnetworks *MockSubnetworks
@@ -747,17 +825,20 @@ type MockGCE struct {
MockTargetHttpProxies *MockTargetHttpProxies
MockAlphaRegionTargetHttpProxies *MockAlphaRegionTargetHttpProxies
MockBetaRegionTargetHttpProxies *MockBetaRegionTargetHttpProxies
+ MockRegionTargetHttpProxies *MockRegionTargetHttpProxies
MockTargetHttpsProxies *MockTargetHttpsProxies
MockAlphaTargetHttpsProxies *MockAlphaTargetHttpsProxies
MockBetaTargetHttpsProxies *MockBetaTargetHttpsProxies
MockAlphaRegionTargetHttpsProxies *MockAlphaRegionTargetHttpsProxies
MockBetaRegionTargetHttpsProxies *MockBetaRegionTargetHttpsProxies
+ MockRegionTargetHttpsProxies *MockRegionTargetHttpsProxies
MockTargetPools *MockTargetPools
MockAlphaUrlMaps *MockAlphaUrlMaps
MockBetaUrlMaps *MockBetaUrlMaps
MockUrlMaps *MockUrlMaps
MockAlphaRegionUrlMaps *MockAlphaRegionUrlMaps
MockBetaRegionUrlMaps *MockBetaRegionUrlMaps
+ MockRegionUrlMaps *MockRegionUrlMaps
MockZones *MockZones
}
@@ -826,6 +907,16 @@ func (mock *MockGCE) RegionDisks() RegionDisks {
return mock.MockRegionDisks
}
+// AlphaFirewalls returns the interface for the alpha Firewalls.
+func (mock *MockGCE) AlphaFirewalls() AlphaFirewalls {
+ return mock.MockAlphaFirewalls
+}
+
+// BetaFirewalls returns the interface for the beta Firewalls.
+func (mock *MockGCE) BetaFirewalls() BetaFirewalls {
+ return mock.MockBetaFirewalls
+}
+
// Firewalls returns the interface for the ga Firewalls.
func (mock *MockGCE) Firewalls() Firewalls {
return mock.MockFirewalls
@@ -886,6 +977,11 @@ func (mock *MockGCE) BetaRegionHealthChecks() BetaRegionHealthChecks {
return mock.MockBetaRegionHealthChecks
}
+// RegionHealthChecks returns the interface for the ga RegionHealthChecks.
+func (mock *MockGCE) RegionHealthChecks() RegionHealthChecks {
+ return mock.MockRegionHealthChecks
+}
+
// HttpHealthChecks returns the interface for the ga HttpHealthChecks.
func (mock *MockGCE) HttpHealthChecks() HttpHealthChecks {
return mock.MockHttpHealthChecks
@@ -991,6 +1087,16 @@ func (mock *MockGCE) BetaRegionSslCertificates() BetaRegionSslCertificates {
return mock.MockBetaRegionSslCertificates
}
+// RegionSslCertificates returns the interface for the ga RegionSslCertificates.
+func (mock *MockGCE) RegionSslCertificates() RegionSslCertificates {
+ return mock.MockRegionSslCertificates
+}
+
+// SslPolicies returns the interface for the ga SslPolicies.
+func (mock *MockGCE) SslPolicies() SslPolicies {
+ return mock.MockSslPolicies
+}
+
// AlphaSubnetworks returns the interface for the alpha Subnetworks.
func (mock *MockGCE) AlphaSubnetworks() AlphaSubnetworks {
return mock.MockAlphaSubnetworks
@@ -1031,6 +1137,11 @@ func (mock *MockGCE) BetaRegionTargetHttpProxies() BetaRegionTargetHttpProxies {
return mock.MockBetaRegionTargetHttpProxies
}
+// RegionTargetHttpProxies returns the interface for the ga RegionTargetHttpProxies.
+func (mock *MockGCE) RegionTargetHttpProxies() RegionTargetHttpProxies {
+ return mock.MockRegionTargetHttpProxies
+}
+
// TargetHttpsProxies returns the interface for the ga TargetHttpsProxies.
func (mock *MockGCE) TargetHttpsProxies() TargetHttpsProxies {
return mock.MockTargetHttpsProxies
@@ -1056,6 +1167,11 @@ func (mock *MockGCE) BetaRegionTargetHttpsProxies() BetaRegionTargetHttpsProxies
return mock.MockBetaRegionTargetHttpsProxies
}
+// RegionTargetHttpsProxies returns the interface for the ga RegionTargetHttpsProxies.
+func (mock *MockGCE) RegionTargetHttpsProxies() RegionTargetHttpsProxies {
+ return mock.MockRegionTargetHttpsProxies
+}
+
// TargetPools returns the interface for the ga TargetPools.
func (mock *MockGCE) TargetPools() TargetPools {
return mock.MockTargetPools
@@ -1086,6 +1202,11 @@ func (mock *MockGCE) BetaRegionUrlMaps() BetaRegionUrlMaps {
return mock.MockBetaRegionUrlMaps
}
+// RegionUrlMaps returns the interface for the ga RegionUrlMaps.
+func (mock *MockGCE) RegionUrlMaps() RegionUrlMaps {
+ return mock.MockRegionUrlMaps
+}
+
// Zones returns the interface for the ga Zones.
func (mock *MockGCE) Zones() Zones {
return mock.MockZones
@@ -1210,6 +1331,32 @@ type MockFirewallsObj struct {
Obj interface{}
}
+// ToAlpha retrieves the given version of the object.
+func (m *MockFirewallsObj) ToAlpha() *alpha.Firewall {
+ if ret, ok := m.Obj.(*alpha.Firewall); ok {
+ return ret
+ }
+ // Convert the object via JSON copying to the type that was requested.
+ ret := &alpha.Firewall{}
+ if err := copyViaJSON(ret, m.Obj); err != nil {
+ klog.Errorf("Could not convert %T to *alpha.Firewall via JSON: %v", m.Obj, err)
+ }
+ return ret
+}
+
+// ToBeta retrieves the given version of the object.
+func (m *MockFirewallsObj) ToBeta() *beta.Firewall {
+ if ret, ok := m.Obj.(*beta.Firewall); ok {
+ return ret
+ }
+ // Convert the object via JSON copying to the type that was requested.
+ ret := &beta.Firewall{}
+ if err := copyViaJSON(ret, m.Obj); err != nil {
+ klog.Errorf("Could not convert %T to *beta.Firewall via JSON: %v", m.Obj, err)
+ }
+ return ret
+}
+
// ToGA retrieves the given version of the object.
func (m *MockFirewallsObj) ToGA() *ga.Firewall {
if ret, ok := m.Obj.(*ga.Firewall); ok {
@@ -1711,6 +1858,19 @@ func (m *MockRegionHealthChecksObj) ToBeta() *beta.HealthCheck {
return ret
}
+// ToGA retrieves the given version of the object.
+func (m *MockRegionHealthChecksObj) ToGA() *ga.HealthCheck {
+ if ret, ok := m.Obj.(*ga.HealthCheck); ok {
+ return ret
+ }
+ // Convert the object via JSON copying to the type that was requested.
+ ret := &ga.HealthCheck{}
+ if err := copyViaJSON(ret, m.Obj); err != nil {
+ klog.Errorf("Could not convert %T to *ga.HealthCheck via JSON: %v", m.Obj, err)
+ }
+ return ret
+}
+
// MockRegionSslCertificatesObj is used to store the various object versions in the shared
// map of mocked objects. This allows for multiple API versions to co-exist and
// share the same "view" of the objects in the backend.
@@ -1744,6 +1904,19 @@ func (m *MockRegionSslCertificatesObj) ToBeta() *beta.SslCertificate {
return ret
}
+// ToGA retrieves the given version of the object.
+func (m *MockRegionSslCertificatesObj) ToGA() *ga.SslCertificate {
+ if ret, ok := m.Obj.(*ga.SslCertificate); ok {
+ return ret
+ }
+ // Convert the object via JSON copying to the type that was requested.
+ ret := &ga.SslCertificate{}
+ if err := copyViaJSON(ret, m.Obj); err != nil {
+ klog.Errorf("Could not convert %T to *ga.SslCertificate via JSON: %v", m.Obj, err)
+ }
+ return ret
+}
+
// MockRegionTargetHttpProxiesObj is used to store the various object versions in the shared
// map of mocked objects. This allows for multiple API versions to co-exist and
// share the same "view" of the objects in the backend.
@@ -1777,6 +1950,19 @@ func (m *MockRegionTargetHttpProxiesObj) ToBeta() *beta.TargetHttpProxy {
return ret
}
+// ToGA retrieves the given version of the object.
+func (m *MockRegionTargetHttpProxiesObj) ToGA() *ga.TargetHttpProxy {
+ if ret, ok := m.Obj.(*ga.TargetHttpProxy); ok {
+ return ret
+ }
+ // Convert the object via JSON copying to the type that was requested.
+ ret := &ga.TargetHttpProxy{}
+ if err := copyViaJSON(ret, m.Obj); err != nil {
+ klog.Errorf("Could not convert %T to *ga.TargetHttpProxy via JSON: %v", m.Obj, err)
+ }
+ return ret
+}
+
// MockRegionTargetHttpsProxiesObj is used to store the various object versions in the shared
// map of mocked objects. This allows for multiple API versions to co-exist and
// share the same "view" of the objects in the backend.
@@ -1810,6 +1996,19 @@ func (m *MockRegionTargetHttpsProxiesObj) ToBeta() *beta.TargetHttpsProxy {
return ret
}
+// ToGA retrieves the given version of the object.
+func (m *MockRegionTargetHttpsProxiesObj) ToGA() *ga.TargetHttpsProxy {
+ if ret, ok := m.Obj.(*ga.TargetHttpsProxy); ok {
+ return ret
+ }
+ // Convert the object via JSON copying to the type that was requested.
+ ret := &ga.TargetHttpsProxy{}
+ if err := copyViaJSON(ret, m.Obj); err != nil {
+ klog.Errorf("Could not convert %T to *ga.TargetHttpsProxy via JSON: %v", m.Obj, err)
+ }
+ return ret
+}
+
// MockRegionUrlMapsObj is used to store the various object versions in the shared
// map of mocked objects. This allows for multiple API versions to co-exist and
// share the same "view" of the objects in the backend.
@@ -1843,6 +2042,19 @@ func (m *MockRegionUrlMapsObj) ToBeta() *beta.UrlMap {
return ret
}
+// ToGA retrieves the given version of the object.
+func (m *MockRegionUrlMapsObj) ToGA() *ga.UrlMap {
+ if ret, ok := m.Obj.(*ga.UrlMap); ok {
+ return ret
+ }
+ // Convert the object via JSON copying to the type that was requested.
+ ret := &ga.UrlMap{}
+ if err := copyViaJSON(ret, m.Obj); err != nil {
+ klog.Errorf("Could not convert %T to *ga.UrlMap via JSON: %v", m.Obj, err)
+ }
+ return ret
+}
+
// MockRegionsObj is used to store the various object versions in the shared
// map of mocked objects. This allows for multiple API versions to co-exist and
// share the same "view" of the objects in the backend.
@@ -1949,6 +2161,26 @@ func (m *MockSslCertificatesObj) ToGA() *ga.SslCertificate {
return ret
}
+// MockSslPoliciesObj is used to store the various object versions in the shared
+// map of mocked objects. This allows for multiple API versions to co-exist and
+// share the same "view" of the objects in the backend.
+type MockSslPoliciesObj struct {
+ Obj interface{}
+}
+
+// ToGA retrieves the given version of the object.
+func (m *MockSslPoliciesObj) ToGA() *ga.SslPolicy {
+ if ret, ok := m.Obj.(*ga.SslPolicy); ok {
+ return ret
+ }
+ // Convert the object via JSON copying to the type that was requested.
+ ret := &ga.SslPolicy{}
+ if err := copyViaJSON(ret, m.Obj); err != nil {
+ klog.Errorf("Could not convert %T to *ga.SslPolicy via JSON: %v", m.Obj, err)
+ }
+ return ret
+}
+
// MockSubnetworksObj is used to store the various object versions in the shared
// map of mocked objects. This allows for multiple API versions to co-exist and
// share the same "view" of the objects in the backend.
@@ -2385,7 +2617,6 @@ func (m *MockAddresses) AggregatedList(ctx context.Context, fl *filter.F) (map[s
objs := map[string][]*ga.Address{}
for _, obj := range m.Objects {
res, err := ParseResourceURL(obj.ToGA().SelfLink)
- location := res.Key.Region
if err != nil {
klog.V(5).Infof("MockAddresses.AggregatedList(%v, %v) = nil, %v", ctx, fl, err)
return nil, err
@@ -2393,6 +2624,7 @@ func (m *MockAddresses) AggregatedList(ctx context.Context, fl *filter.F) (map[s
if !fl.Match(obj.ToGA()) {
continue
}
+ location := aggregatedListKey(res.Key)
objs[location] = append(objs[location], obj.ToGA())
}
klog.V(5).Infof("MockAddresses.AggregatedList(%v, %v) = [%v items], nil", ctx, fl, len(objs))
@@ -2465,9 +2697,9 @@ func (g *GCEAddresses) List(ctx context.Context, region string, fl *filter.F) ([
return nil, err
}
- if klog.V(4) {
+ if klog.V(4).Enabled() {
klog.V(4).Infof("GCEAddresses.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
@@ -2581,9 +2813,9 @@ func (g *GCEAddresses) AggregatedList(ctx context.Context, fl *filter.F) (map[st
klog.V(4).Infof("GCEAddresses.AggregatedList(%v, %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
+ if klog.V(4).Enabled() {
klog.V(4).Infof("GCEAddresses.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
@@ -2805,7 +3037,6 @@ func (m *MockAlphaAddresses) AggregatedList(ctx context.Context, fl *filter.F) (
objs := map[string][]*alpha.Address{}
for _, obj := range m.Objects {
res, err := ParseResourceURL(obj.ToAlpha().SelfLink)
- location := res.Key.Region
if err != nil {
klog.V(5).Infof("MockAlphaAddresses.AggregatedList(%v, %v) = nil, %v", ctx, fl, err)
return nil, err
@@ -2813,6 +3044,7 @@ func (m *MockAlphaAddresses) AggregatedList(ctx context.Context, fl *filter.F) (
if !fl.Match(obj.ToAlpha()) {
continue
}
+ location := aggregatedListKey(res.Key)
objs[location] = append(objs[location], obj.ToAlpha())
}
klog.V(5).Infof("MockAlphaAddresses.AggregatedList(%v, %v) = [%v items], nil", ctx, fl, len(objs))
@@ -2885,9 +3117,9 @@ func (g *GCEAlphaAddresses) List(ctx context.Context, region string, fl *filter.
return nil, err
}
- if klog.V(4) {
+ if klog.V(4).Enabled() {
klog.V(4).Infof("GCEAlphaAddresses.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
@@ -3001,9 +3233,9 @@ func (g *GCEAlphaAddresses) AggregatedList(ctx context.Context, fl *filter.F) (m
klog.V(4).Infof("GCEAlphaAddresses.AggregatedList(%v, %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
+ if klog.V(4).Enabled() {
klog.V(4).Infof("GCEAlphaAddresses.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
@@ -3225,7 +3457,6 @@ func (m *MockBetaAddresses) AggregatedList(ctx context.Context, fl *filter.F) (m
objs := map[string][]*beta.Address{}
for _, obj := range m.Objects {
res, err := ParseResourceURL(obj.ToBeta().SelfLink)
- location := res.Key.Region
if err != nil {
klog.V(5).Infof("MockBetaAddresses.AggregatedList(%v, %v) = nil, %v", ctx, fl, err)
return nil, err
@@ -3233,6 +3464,7 @@ func (m *MockBetaAddresses) AggregatedList(ctx context.Context, fl *filter.F) (m
if !fl.Match(obj.ToBeta()) {
continue
}
+ location := aggregatedListKey(res.Key)
objs[location] = append(objs[location], obj.ToBeta())
}
klog.V(5).Infof("MockBetaAddresses.AggregatedList(%v, %v) = [%v items], nil", ctx, fl, len(objs))
@@ -3305,9 +3537,9 @@ func (g *GCEBetaAddresses) List(ctx context.Context, region string, fl *filter.F
return nil, err
}
- if klog.V(4) {
+ if klog.V(4).Enabled() {
klog.V(4).Infof("GCEBetaAddresses.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
@@ -3421,9 +3653,9 @@ func (g *GCEBetaAddresses) AggregatedList(ctx context.Context, fl *filter.F) (ma
klog.V(4).Infof("GCEBetaAddresses.AggregatedList(%v, %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
+ if klog.V(4).Enabled() {
klog.V(4).Infof("GCEBetaAddresses.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
@@ -3684,9 +3916,9 @@ func (g *GCEAlphaGlobalAddresses) List(ctx context.Context, fl *filter.F) ([]*al
return nil, err
}
- if klog.V(4) {
+ if klog.V(4).Enabled() {
klog.V(4).Infof("GCEAlphaGlobalAddresses.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
@@ -4016,9 +4248,9 @@ func (g *GCEGlobalAddresses) List(ctx context.Context, fl *filter.F) ([]*ga.Addr
return nil, err
}
- if klog.V(4) {
+ if klog.V(4).Enabled() {
klog.V(4).Infof("GCEGlobalAddresses.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
@@ -4378,9 +4610,9 @@ func (g *GCEBackendServices) List(ctx context.Context, fl *filter.F) ([]*ga.Back
return nil, err
}
- if klog.V(4) {
+ if klog.V(4).Enabled() {
klog.V(4).Infof("GCEBackendServices.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
@@ -4824,9 +5056,9 @@ func (g *GCEBetaBackendServices) List(ctx context.Context, fl *filter.F) ([]*bet
return nil, err
}
- if klog.V(4) {
+ if klog.V(4).Enabled() {
klog.V(4).Infof("GCEBetaBackendServices.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
@@ -5242,9 +5474,9 @@ func (g *GCEAlphaBackendServices) List(ctx context.Context, fl *filter.F) ([]*al
return nil, err
}
- if klog.V(4) {
+ if klog.V(4).Enabled() {
klog.V(4).Infof("GCEAlphaBackendServices.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
@@ -5663,9 +5895,9 @@ func (g *GCERegionBackendServices) List(ctx context.Context, region string, fl *
return nil, err
}
- if klog.V(4) {
+ if klog.V(4).Enabled() {
klog.V(4).Infof("GCERegionBackendServices.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
@@ -6078,9 +6310,9 @@ func (g *GCEAlphaRegionBackendServices) List(ctx context.Context, region string,
return nil, err
}
- if klog.V(4) {
+ if klog.V(4).Enabled() {
klog.V(4).Infof("GCEAlphaRegionBackendServices.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
@@ -6493,9 +6725,9 @@ func (g *GCEBetaRegionBackendServices) List(ctx context.Context, region string,
return nil, err
}
- if klog.V(4) {
+ if klog.V(4).Enabled() {
klog.V(4).Infof("GCEBetaRegionBackendServices.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
@@ -6898,9 +7130,9 @@ func (g *GCEDisks) List(ctx context.Context, zone string, fl *filter.F) ([]*ga.D
return nil, err
}
- if klog.V(4) {
+ if klog.V(4).Enabled() {
klog.V(4).Infof("GCEDisks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
@@ -7275,9 +7507,9 @@ func (g *GCERegionDisks) List(ctx context.Context, region string, fl *filter.F)
return nil, err
}
- if klog.V(4) {
+ if klog.V(4).Enabled() {
klog.V(4).Infof("GCERegionDisks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
@@ -7388,18 +7620,18 @@ func (g *GCERegionDisks) Resize(ctx context.Context, key *meta.Key, arg0 *ga.Reg
return err
}
-// Firewalls is an interface that allows for mocking of Firewalls.
-type Firewalls interface {
- Get(ctx context.Context, key *meta.Key) (*ga.Firewall, error)
- List(ctx context.Context, fl *filter.F) ([]*ga.Firewall, error)
- Insert(ctx context.Context, key *meta.Key, obj *ga.Firewall) error
+// AlphaFirewalls is an interface that allows for mocking of Firewalls.
+type AlphaFirewalls interface {
+ Get(ctx context.Context, key *meta.Key) (*alpha.Firewall, error)
+ List(ctx context.Context, fl *filter.F) ([]*alpha.Firewall, error)
+ Insert(ctx context.Context, key *meta.Key, obj *alpha.Firewall) error
Delete(ctx context.Context, key *meta.Key) error
- Update(context.Context, *meta.Key, *ga.Firewall) error
+ Update(context.Context, *meta.Key, *alpha.Firewall) error
}
-// NewMockFirewalls returns a new mock for Firewalls.
-func NewMockFirewalls(pr ProjectRouter, objs map[meta.Key]*MockFirewallsObj) *MockFirewalls {
- mock := &MockFirewalls{
+// NewMockAlphaFirewalls returns a new mock for Firewalls.
+func NewMockAlphaFirewalls(pr ProjectRouter, objs map[meta.Key]*MockFirewallsObj) *MockAlphaFirewalls {
+ mock := &MockAlphaFirewalls{
ProjectRouter: pr,
Objects: objs,
@@ -7410,8 +7642,8 @@ func NewMockFirewalls(pr ProjectRouter, objs map[meta.Key]*MockFirewallsObj) *Mo
return mock
}
-// MockFirewalls is the mock for Firewalls.
-type MockFirewalls struct {
+// MockAlphaFirewalls is the mock for Firewalls.
+type MockAlphaFirewalls struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
@@ -7430,11 +7662,11 @@ type MockFirewalls struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockFirewalls) (bool, *ga.Firewall, error)
- ListHook func(ctx context.Context, fl *filter.F, m *MockFirewalls) (bool, []*ga.Firewall, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *ga.Firewall, m *MockFirewalls) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockFirewalls) (bool, error)
- UpdateHook func(context.Context, *meta.Key, *ga.Firewall, *MockFirewalls) error
+ GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaFirewalls) (bool, *alpha.Firewall, error)
+ ListHook func(ctx context.Context, fl *filter.F, m *MockAlphaFirewalls) (bool, []*alpha.Firewall, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *alpha.Firewall, m *MockAlphaFirewalls) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaFirewalls) (bool, error)
+ UpdateHook func(context.Context, *meta.Key, *alpha.Firewall, *MockAlphaFirewalls) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -7442,10 +7674,10 @@ type MockFirewalls struct {
}
// Get returns the object from the mock.
-func (m *MockFirewalls) Get(ctx context.Context, key *meta.Key) (*ga.Firewall, error) {
+func (m *MockAlphaFirewalls) Get(ctx context.Context, key *meta.Key) (*alpha.Firewall, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockFirewalls.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaFirewalls.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -7457,28 +7689,28 @@ func (m *MockFirewalls) Get(ctx context.Context, key *meta.Key) (*ga.Firewall, e
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockFirewalls.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaFirewalls.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
- typedObj := obj.ToGA()
- klog.V(5).Infof("MockFirewalls.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ typedObj := obj.ToAlpha()
+ klog.V(5).Infof("MockAlphaFirewalls.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockFirewalls %v not found", key),
+ Message: fmt.Sprintf("MockAlphaFirewalls %v not found", key),
}
- klog.V(5).Infof("MockFirewalls.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaFirewalls.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
// List all of the objects in the mock.
-func (m *MockFirewalls) List(ctx context.Context, fl *filter.F) ([]*ga.Firewall, error) {
+func (m *MockAlphaFirewalls) List(ctx context.Context, fl *filter.F) ([]*alpha.Firewall, error) {
if m.ListHook != nil {
if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
- klog.V(5).Infof("MockFirewalls.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
+ klog.V(5).Infof("MockAlphaFirewalls.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
return objs, err
}
}
@@ -7488,28 +7720,28 @@ func (m *MockFirewalls) List(ctx context.Context, fl *filter.F) ([]*ga.Firewall,
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockFirewalls.List(%v, %v) = nil, %v", ctx, fl, err)
+ klog.V(5).Infof("MockAlphaFirewalls.List(%v, %v) = nil, %v", ctx, fl, err)
return nil, *m.ListError
}
- var objs []*ga.Firewall
+ var objs []*alpha.Firewall
for _, obj := range m.Objects {
- if !fl.Match(obj.ToGA()) {
+ if !fl.Match(obj.ToAlpha()) {
continue
}
- objs = append(objs, obj.ToGA())
+ objs = append(objs, obj.ToAlpha())
}
- klog.V(5).Infof("MockFirewalls.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
+ klog.V(5).Infof("MockAlphaFirewalls.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockFirewalls) Insert(ctx context.Context, key *meta.Key, obj *ga.Firewall) error {
+func (m *MockAlphaFirewalls) Insert(ctx context.Context, key *meta.Key, obj *alpha.Firewall) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockFirewalls.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaFirewalls.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -7521,32 +7753,32 @@ func (m *MockFirewalls) Insert(ctx context.Context, key *meta.Key, obj *ga.Firew
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockFirewalls.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaFirewalls.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockFirewalls %v exists", key),
+ Message: fmt.Sprintf("MockAlphaFirewalls %v exists", key),
}
- klog.V(5).Infof("MockFirewalls.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaFirewalls.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "ga", "firewalls")
- obj.SelfLink = SelfLink(meta.VersionGA, projectID, "firewalls", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "firewalls")
+ obj.SelfLink = SelfLink(meta.VersionAlpha, projectID, "firewalls", key)
m.Objects[*key] = &MockFirewallsObj{obj}
- klog.V(5).Infof("MockFirewalls.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ klog.V(5).Infof("MockAlphaFirewalls.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockFirewalls) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockAlphaFirewalls) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockFirewalls.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaFirewalls.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -7558,223 +7790,223 @@ func (m *MockFirewalls) Delete(ctx context.Context, key *meta.Key) error {
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockFirewalls.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaFirewalls.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockFirewalls %v not found", key),
+ Message: fmt.Sprintf("MockAlphaFirewalls %v not found", key),
}
- klog.V(5).Infof("MockFirewalls.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaFirewalls.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockFirewalls.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockAlphaFirewalls.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockFirewalls) Obj(o *ga.Firewall) *MockFirewallsObj {
+func (m *MockAlphaFirewalls) Obj(o *alpha.Firewall) *MockFirewallsObj {
return &MockFirewallsObj{o}
}
// Update is a mock for the corresponding method.
-func (m *MockFirewalls) Update(ctx context.Context, key *meta.Key, arg0 *ga.Firewall) error {
+func (m *MockAlphaFirewalls) Update(ctx context.Context, key *meta.Key, arg0 *alpha.Firewall) error {
if m.UpdateHook != nil {
return m.UpdateHook(ctx, key, arg0, m)
}
return nil
}
-// GCEFirewalls is a simplifying adapter for the GCE Firewalls.
-type GCEFirewalls struct {
+// GCEAlphaFirewalls is a simplifying adapter for the GCE Firewalls.
+type GCEAlphaFirewalls struct {
s *Service
}
// Get the Firewall named by key.
-func (g *GCEFirewalls) Get(ctx context.Context, key *meta.Key) (*ga.Firewall, error) {
- klog.V(5).Infof("GCEFirewalls.Get(%v, %v): called", ctx, key)
+func (g *GCEAlphaFirewalls) Get(ctx context.Context, key *meta.Key) (*alpha.Firewall, error) {
+ klog.V(5).Infof("GCEAlphaFirewalls.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEFirewalls.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaFirewalls.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Firewalls")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Firewalls")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
- Version: meta.Version("ga"),
+ Version: meta.Version("alpha"),
Service: "Firewalls",
}
- klog.V(5).Infof("GCEFirewalls.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaFirewalls.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEFirewalls.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaFirewalls.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.GA.Firewalls.Get(projectID, key.Name)
+ call := g.s.Alpha.Firewalls.Get(projectID, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEFirewalls.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEAlphaFirewalls.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
// List all Firewall objects.
-func (g *GCEFirewalls) List(ctx context.Context, fl *filter.F) ([]*ga.Firewall, error) {
- klog.V(5).Infof("GCEFirewalls.List(%v, %v) called", ctx, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Firewalls")
+func (g *GCEAlphaFirewalls) List(ctx context.Context, fl *filter.F) ([]*alpha.Firewall, error) {
+ klog.V(5).Infof("GCEAlphaFirewalls.List(%v, %v) called", ctx, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Firewalls")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
- Version: meta.Version("ga"),
+ Version: meta.Version("alpha"),
Service: "Firewalls",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCEFirewalls.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
- call := g.s.GA.Firewalls.List(projectID)
+ klog.V(5).Infof("GCEAlphaFirewalls.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
+ call := g.s.Alpha.Firewalls.List(projectID)
if fl != filter.None {
call.Filter(fl.String())
}
- var all []*ga.Firewall
- f := func(l *ga.FirewallList) error {
- klog.V(5).Infof("GCEFirewalls.List(%v, ..., %v): page %+v", ctx, fl, l)
+ var all []*alpha.Firewall
+ f := func(l *alpha.FirewallList) error {
+ klog.V(5).Infof("GCEAlphaFirewalls.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEFirewalls.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEAlphaFirewalls.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEFirewalls.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEAlphaFirewalls.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEFirewalls.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEAlphaFirewalls.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
// Insert Firewall with key of value obj.
-func (g *GCEFirewalls) Insert(ctx context.Context, key *meta.Key, obj *ga.Firewall) error {
- klog.V(5).Infof("GCEFirewalls.Insert(%v, %v, %+v): called", ctx, key, obj)
+func (g *GCEAlphaFirewalls) Insert(ctx context.Context, key *meta.Key, obj *alpha.Firewall) error {
+ klog.V(5).Infof("GCEAlphaFirewalls.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEFirewalls.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaFirewalls.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Firewalls")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Firewalls")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
- Version: meta.Version("ga"),
+ Version: meta.Version("alpha"),
Service: "Firewalls",
}
- klog.V(5).Infof("GCEFirewalls.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaFirewalls.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEFirewalls.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaFirewalls.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.GA.Firewalls.Insert(projectID, obj)
+ call := g.s.Alpha.Firewalls.Insert(projectID, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEFirewalls.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaFirewalls.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEFirewalls.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCEAlphaFirewalls.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
// Delete the Firewall referenced by key.
-func (g *GCEFirewalls) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEFirewalls.Delete(%v, %v): called", ctx, key)
+func (g *GCEAlphaFirewalls) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEAlphaFirewalls.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEFirewalls.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaFirewalls.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Firewalls")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Firewalls")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
- Version: meta.Version("ga"),
+ Version: meta.Version("alpha"),
Service: "Firewalls",
}
- klog.V(5).Infof("GCEFirewalls.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaFirewalls.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEFirewalls.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaFirewalls.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.GA.Firewalls.Delete(projectID, key.Name)
+ call := g.s.Alpha.Firewalls.Delete(projectID, key.Name)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEFirewalls.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaFirewalls.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEFirewalls.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaFirewalls.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// Update is a method on GCEFirewalls.
-func (g *GCEFirewalls) Update(ctx context.Context, key *meta.Key, arg0 *ga.Firewall) error {
- klog.V(5).Infof("GCEFirewalls.Update(%v, %v, ...): called", ctx, key)
+// Update is a method on GCEAlphaFirewalls.
+func (g *GCEAlphaFirewalls) Update(ctx context.Context, key *meta.Key, arg0 *alpha.Firewall) error {
+ klog.V(5).Infof("GCEAlphaFirewalls.Update(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEFirewalls.Update(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaFirewalls.Update(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Firewalls")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Firewalls")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Update",
- Version: meta.Version("ga"),
+ Version: meta.Version("alpha"),
Service: "Firewalls",
}
- klog.V(5).Infof("GCEFirewalls.Update(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaFirewalls.Update(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEFirewalls.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaFirewalls.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.GA.Firewalls.Update(projectID, key.Name, arg0)
+ call := g.s.Alpha.Firewalls.Update(projectID, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEFirewalls.Update(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaFirewalls.Update(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEFirewalls.Update(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaFirewalls.Update(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// ForwardingRules is an interface that allows for mocking of ForwardingRules.
-type ForwardingRules interface {
- Get(ctx context.Context, key *meta.Key) (*ga.ForwardingRule, error)
- List(ctx context.Context, region string, fl *filter.F) ([]*ga.ForwardingRule, error)
- Insert(ctx context.Context, key *meta.Key, obj *ga.ForwardingRule) error
+// BetaFirewalls is an interface that allows for mocking of Firewalls.
+type BetaFirewalls interface {
+ Get(ctx context.Context, key *meta.Key) (*beta.Firewall, error)
+ List(ctx context.Context, fl *filter.F) ([]*beta.Firewall, error)
+ Insert(ctx context.Context, key *meta.Key, obj *beta.Firewall) error
Delete(ctx context.Context, key *meta.Key) error
- SetTarget(context.Context, *meta.Key, *ga.TargetReference) error
+ Update(context.Context, *meta.Key, *beta.Firewall) error
}
-// NewMockForwardingRules returns a new mock for ForwardingRules.
-func NewMockForwardingRules(pr ProjectRouter, objs map[meta.Key]*MockForwardingRulesObj) *MockForwardingRules {
- mock := &MockForwardingRules{
+// NewMockBetaFirewalls returns a new mock for Firewalls.
+func NewMockBetaFirewalls(pr ProjectRouter, objs map[meta.Key]*MockFirewallsObj) *MockBetaFirewalls {
+ mock := &MockBetaFirewalls{
ProjectRouter: pr,
Objects: objs,
@@ -7785,14 +8017,14 @@ func NewMockForwardingRules(pr ProjectRouter, objs map[meta.Key]*MockForwardingR
return mock
}
-// MockForwardingRules is the mock for ForwardingRules.
-type MockForwardingRules struct {
+// MockBetaFirewalls is the mock for Firewalls.
+type MockBetaFirewalls struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
// Objects maintained by the mock.
- Objects map[meta.Key]*MockForwardingRulesObj
+ Objects map[meta.Key]*MockFirewallsObj
// If an entry exists for the given key and operation, then the error
// will be returned instead of the operation.
@@ -7805,11 +8037,11 @@ type MockForwardingRules struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockForwardingRules) (bool, *ga.ForwardingRule, error)
- ListHook func(ctx context.Context, region string, fl *filter.F, m *MockForwardingRules) (bool, []*ga.ForwardingRule, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *ga.ForwardingRule, m *MockForwardingRules) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockForwardingRules) (bool, error)
- SetTargetHook func(context.Context, *meta.Key, *ga.TargetReference, *MockForwardingRules) error
+ GetHook func(ctx context.Context, key *meta.Key, m *MockBetaFirewalls) (bool, *beta.Firewall, error)
+ ListHook func(ctx context.Context, fl *filter.F, m *MockBetaFirewalls) (bool, []*beta.Firewall, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *beta.Firewall, m *MockBetaFirewalls) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaFirewalls) (bool, error)
+ UpdateHook func(context.Context, *meta.Key, *beta.Firewall, *MockBetaFirewalls) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -7817,10 +8049,10 @@ type MockForwardingRules struct {
}
// Get returns the object from the mock.
-func (m *MockForwardingRules) Get(ctx context.Context, key *meta.Key) (*ga.ForwardingRule, error) {
+func (m *MockBetaFirewalls) Get(ctx context.Context, key *meta.Key) (*beta.Firewall, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockForwardingRules.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaFirewalls.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -7832,28 +8064,28 @@ func (m *MockForwardingRules) Get(ctx context.Context, key *meta.Key) (*ga.Forwa
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockForwardingRules.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaFirewalls.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
- typedObj := obj.ToGA()
- klog.V(5).Infof("MockForwardingRules.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ typedObj := obj.ToBeta()
+ klog.V(5).Infof("MockBetaFirewalls.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockForwardingRules %v not found", key),
+ Message: fmt.Sprintf("MockBetaFirewalls %v not found", key),
}
- klog.V(5).Infof("MockForwardingRules.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaFirewalls.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
-// List all of the objects in the mock in the given region.
-func (m *MockForwardingRules) List(ctx context.Context, region string, fl *filter.F) ([]*ga.ForwardingRule, error) {
+// List all of the objects in the mock.
+func (m *MockBetaFirewalls) List(ctx context.Context, fl *filter.F) ([]*beta.Firewall, error) {
if m.ListHook != nil {
- if intercept, objs, err := m.ListHook(ctx, region, fl, m); intercept {
- klog.V(5).Infof("MockForwardingRules.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err)
+ if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
+ klog.V(5).Infof("MockBetaFirewalls.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
return objs, err
}
}
@@ -7863,31 +8095,28 @@ func (m *MockForwardingRules) List(ctx context.Context, region string, fl *filte
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockForwardingRules.List(%v, %q, %v) = nil, %v", ctx, region, fl, err)
+ klog.V(5).Infof("MockBetaFirewalls.List(%v, %v) = nil, %v", ctx, fl, err)
return nil, *m.ListError
}
- var objs []*ga.ForwardingRule
- for key, obj := range m.Objects {
- if key.Region != region {
- continue
- }
- if !fl.Match(obj.ToGA()) {
+ var objs []*beta.Firewall
+ for _, obj := range m.Objects {
+ if !fl.Match(obj.ToBeta()) {
continue
}
- objs = append(objs, obj.ToGA())
+ objs = append(objs, obj.ToBeta())
}
- klog.V(5).Infof("MockForwardingRules.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs))
+ klog.V(5).Infof("MockBetaFirewalls.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockForwardingRules) Insert(ctx context.Context, key *meta.Key, obj *ga.ForwardingRule) error {
+func (m *MockBetaFirewalls) Insert(ctx context.Context, key *meta.Key, obj *beta.Firewall) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaFirewalls.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -7899,32 +8128,32 @@ func (m *MockForwardingRules) Insert(ctx context.Context, key *meta.Key, obj *ga
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaFirewalls.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockForwardingRules %v exists", key),
+ Message: fmt.Sprintf("MockBetaFirewalls %v exists", key),
}
- klog.V(5).Infof("MockForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaFirewalls.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "ga", "forwardingRules")
- obj.SelfLink = SelfLink(meta.VersionGA, projectID, "forwardingRules", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "beta", "firewalls")
+ obj.SelfLink = SelfLink(meta.VersionBeta, projectID, "firewalls", key)
- m.Objects[*key] = &MockForwardingRulesObj{obj}
- klog.V(5).Infof("MockForwardingRules.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ m.Objects[*key] = &MockFirewallsObj{obj}
+ klog.V(5).Infof("MockBetaFirewalls.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockForwardingRules) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockBetaFirewalls) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaFirewalls.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -7936,222 +8165,223 @@ func (m *MockForwardingRules) Delete(ctx context.Context, key *meta.Key) error {
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaFirewalls.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockForwardingRules %v not found", key),
+ Message: fmt.Sprintf("MockBetaFirewalls %v not found", key),
}
- klog.V(5).Infof("MockForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaFirewalls.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockForwardingRules.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockBetaFirewalls.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockForwardingRules) Obj(o *ga.ForwardingRule) *MockForwardingRulesObj {
- return &MockForwardingRulesObj{o}
+func (m *MockBetaFirewalls) Obj(o *beta.Firewall) *MockFirewallsObj {
+ return &MockFirewallsObj{o}
}
-// SetTarget is a mock for the corresponding method.
-func (m *MockForwardingRules) SetTarget(ctx context.Context, key *meta.Key, arg0 *ga.TargetReference) error {
- if m.SetTargetHook != nil {
- return m.SetTargetHook(ctx, key, arg0, m)
+// Update is a mock for the corresponding method.
+func (m *MockBetaFirewalls) Update(ctx context.Context, key *meta.Key, arg0 *beta.Firewall) error {
+ if m.UpdateHook != nil {
+ return m.UpdateHook(ctx, key, arg0, m)
}
return nil
}
-// GCEForwardingRules is a simplifying adapter for the GCE ForwardingRules.
-type GCEForwardingRules struct {
+// GCEBetaFirewalls is a simplifying adapter for the GCE Firewalls.
+type GCEBetaFirewalls struct {
s *Service
}
-// Get the ForwardingRule named by key.
-func (g *GCEForwardingRules) Get(ctx context.Context, key *meta.Key) (*ga.ForwardingRule, error) {
- klog.V(5).Infof("GCEForwardingRules.Get(%v, %v): called", ctx, key)
+// Get the Firewall named by key.
+func (g *GCEBetaFirewalls) Get(ctx context.Context, key *meta.Key) (*beta.Firewall, error) {
+ klog.V(5).Infof("GCEBetaFirewalls.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEForwardingRules.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaFirewalls.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "ForwardingRules")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Firewalls")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
- Version: meta.Version("ga"),
- Service: "ForwardingRules",
+ Version: meta.Version("beta"),
+ Service: "Firewalls",
}
- klog.V(5).Infof("GCEForwardingRules.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaFirewalls.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEForwardingRules.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaFirewalls.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.GA.ForwardingRules.Get(projectID, key.Region, key.Name)
+ call := g.s.Beta.Firewalls.Get(projectID, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEForwardingRules.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEBetaFirewalls.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
-// List all ForwardingRule objects.
-func (g *GCEForwardingRules) List(ctx context.Context, region string, fl *filter.F) ([]*ga.ForwardingRule, error) {
- klog.V(5).Infof("GCEForwardingRules.List(%v, %v, %v) called", ctx, region, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "ForwardingRules")
+// List all Firewall objects.
+func (g *GCEBetaFirewalls) List(ctx context.Context, fl *filter.F) ([]*beta.Firewall, error) {
+ klog.V(5).Infof("GCEBetaFirewalls.List(%v, %v) called", ctx, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Firewalls")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
- Version: meta.Version("ga"),
- Service: "ForwardingRules",
+ Version: meta.Version("beta"),
+ Service: "Firewalls",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCEForwardingRules.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk)
- call := g.s.GA.ForwardingRules.List(projectID, region)
+ klog.V(5).Infof("GCEBetaFirewalls.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
+ call := g.s.Beta.Firewalls.List(projectID)
if fl != filter.None {
call.Filter(fl.String())
}
- var all []*ga.ForwardingRule
- f := func(l *ga.ForwardingRuleList) error {
- klog.V(5).Infof("GCEForwardingRules.List(%v, ..., %v): page %+v", ctx, fl, l)
+ var all []*beta.Firewall
+ f := func(l *beta.FirewallList) error {
+ klog.V(5).Infof("GCEBetaFirewalls.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEForwardingRules.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEBetaFirewalls.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEForwardingRules.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEBetaFirewalls.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEForwardingRules.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEBetaFirewalls.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
-// Insert ForwardingRule with key of value obj.
-func (g *GCEForwardingRules) Insert(ctx context.Context, key *meta.Key, obj *ga.ForwardingRule) error {
- klog.V(5).Infof("GCEForwardingRules.Insert(%v, %v, %+v): called", ctx, key, obj)
+// Insert Firewall with key of value obj.
+func (g *GCEBetaFirewalls) Insert(ctx context.Context, key *meta.Key, obj *beta.Firewall) error {
+ klog.V(5).Infof("GCEBetaFirewalls.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEForwardingRules.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaFirewalls.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "ForwardingRules")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Firewalls")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
- Version: meta.Version("ga"),
- Service: "ForwardingRules",
+ Version: meta.Version("beta"),
+ Service: "Firewalls",
}
- klog.V(5).Infof("GCEForwardingRules.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaFirewalls.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEForwardingRules.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaFirewalls.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.GA.ForwardingRules.Insert(projectID, key.Region, obj)
+ call := g.s.Beta.Firewalls.Insert(projectID, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEForwardingRules.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaFirewalls.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEForwardingRules.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCEBetaFirewalls.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
-// Delete the ForwardingRule referenced by key.
-func (g *GCEForwardingRules) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEForwardingRules.Delete(%v, %v): called", ctx, key)
+// Delete the Firewall referenced by key.
+func (g *GCEBetaFirewalls) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEBetaFirewalls.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEForwardingRules.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaFirewalls.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "ForwardingRules")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Firewalls")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
- Version: meta.Version("ga"),
- Service: "ForwardingRules",
+ Version: meta.Version("beta"),
+ Service: "Firewalls",
}
- klog.V(5).Infof("GCEForwardingRules.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaFirewalls.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEForwardingRules.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaFirewalls.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.GA.ForwardingRules.Delete(projectID, key.Region, key.Name)
+ call := g.s.Beta.Firewalls.Delete(projectID, key.Name)
+
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaFirewalls.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaFirewalls.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// SetTarget is a method on GCEForwardingRules.
-func (g *GCEForwardingRules) SetTarget(ctx context.Context, key *meta.Key, arg0 *ga.TargetReference) error {
- klog.V(5).Infof("GCEForwardingRules.SetTarget(%v, %v, ...): called", ctx, key)
+// Update is a method on GCEBetaFirewalls.
+func (g *GCEBetaFirewalls) Update(ctx context.Context, key *meta.Key, arg0 *beta.Firewall) error {
+ klog.V(5).Infof("GCEBetaFirewalls.Update(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEForwardingRules.SetTarget(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaFirewalls.Update(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "ForwardingRules")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Firewalls")
rk := &RateLimitKey{
ProjectID: projectID,
- Operation: "SetTarget",
- Version: meta.Version("ga"),
- Service: "ForwardingRules",
+ Operation: "Update",
+ Version: meta.Version("beta"),
+ Service: "Firewalls",
}
- klog.V(5).Infof("GCEForwardingRules.SetTarget(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaFirewalls.Update(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEForwardingRules.SetTarget(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaFirewalls.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.GA.ForwardingRules.SetTarget(projectID, key.Region, key.Name, arg0)
+ call := g.s.Beta.Firewalls.Update(projectID, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEForwardingRules.SetTarget(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaFirewalls.Update(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEForwardingRules.SetTarget(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaFirewalls.Update(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// AlphaForwardingRules is an interface that allows for mocking of ForwardingRules.
-type AlphaForwardingRules interface {
- Get(ctx context.Context, key *meta.Key) (*alpha.ForwardingRule, error)
- List(ctx context.Context, region string, fl *filter.F) ([]*alpha.ForwardingRule, error)
- Insert(ctx context.Context, key *meta.Key, obj *alpha.ForwardingRule) error
+// Firewalls is an interface that allows for mocking of Firewalls.
+type Firewalls interface {
+ Get(ctx context.Context, key *meta.Key) (*ga.Firewall, error)
+ List(ctx context.Context, fl *filter.F) ([]*ga.Firewall, error)
+ Insert(ctx context.Context, key *meta.Key, obj *ga.Firewall) error
Delete(ctx context.Context, key *meta.Key) error
- SetTarget(context.Context, *meta.Key, *alpha.TargetReference) error
+ Update(context.Context, *meta.Key, *ga.Firewall) error
}
-// NewMockAlphaForwardingRules returns a new mock for ForwardingRules.
-func NewMockAlphaForwardingRules(pr ProjectRouter, objs map[meta.Key]*MockForwardingRulesObj) *MockAlphaForwardingRules {
- mock := &MockAlphaForwardingRules{
+// NewMockFirewalls returns a new mock for Firewalls.
+func NewMockFirewalls(pr ProjectRouter, objs map[meta.Key]*MockFirewallsObj) *MockFirewalls {
+ mock := &MockFirewalls{
ProjectRouter: pr,
Objects: objs,
@@ -8162,14 +8392,14 @@ func NewMockAlphaForwardingRules(pr ProjectRouter, objs map[meta.Key]*MockForwar
return mock
}
-// MockAlphaForwardingRules is the mock for ForwardingRules.
-type MockAlphaForwardingRules struct {
+// MockFirewalls is the mock for Firewalls.
+type MockFirewalls struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
// Objects maintained by the mock.
- Objects map[meta.Key]*MockForwardingRulesObj
+ Objects map[meta.Key]*MockFirewallsObj
// If an entry exists for the given key and operation, then the error
// will be returned instead of the operation.
@@ -8182,11 +8412,11 @@ type MockAlphaForwardingRules struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaForwardingRules) (bool, *alpha.ForwardingRule, error)
- ListHook func(ctx context.Context, region string, fl *filter.F, m *MockAlphaForwardingRules) (bool, []*alpha.ForwardingRule, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *alpha.ForwardingRule, m *MockAlphaForwardingRules) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaForwardingRules) (bool, error)
- SetTargetHook func(context.Context, *meta.Key, *alpha.TargetReference, *MockAlphaForwardingRules) error
+ GetHook func(ctx context.Context, key *meta.Key, m *MockFirewalls) (bool, *ga.Firewall, error)
+ ListHook func(ctx context.Context, fl *filter.F, m *MockFirewalls) (bool, []*ga.Firewall, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *ga.Firewall, m *MockFirewalls) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockFirewalls) (bool, error)
+ UpdateHook func(context.Context, *meta.Key, *ga.Firewall, *MockFirewalls) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -8194,10 +8424,10 @@ type MockAlphaForwardingRules struct {
}
// Get returns the object from the mock.
-func (m *MockAlphaForwardingRules) Get(ctx context.Context, key *meta.Key) (*alpha.ForwardingRule, error) {
+func (m *MockFirewalls) Get(ctx context.Context, key *meta.Key) (*ga.Firewall, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockAlphaForwardingRules.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockFirewalls.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -8209,28 +8439,28 @@ func (m *MockAlphaForwardingRules) Get(ctx context.Context, key *meta.Key) (*alp
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockAlphaForwardingRules.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockFirewalls.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
- typedObj := obj.ToAlpha()
- klog.V(5).Infof("MockAlphaForwardingRules.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ typedObj := obj.ToGA()
+ klog.V(5).Infof("MockFirewalls.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockAlphaForwardingRules %v not found", key),
+ Message: fmt.Sprintf("MockFirewalls %v not found", key),
}
- klog.V(5).Infof("MockAlphaForwardingRules.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockFirewalls.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
-// List all of the objects in the mock in the given region.
-func (m *MockAlphaForwardingRules) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.ForwardingRule, error) {
+// List all of the objects in the mock.
+func (m *MockFirewalls) List(ctx context.Context, fl *filter.F) ([]*ga.Firewall, error) {
if m.ListHook != nil {
- if intercept, objs, err := m.ListHook(ctx, region, fl, m); intercept {
- klog.V(5).Infof("MockAlphaForwardingRules.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err)
+ if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
+ klog.V(5).Infof("MockFirewalls.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
return objs, err
}
}
@@ -8240,31 +8470,28 @@ func (m *MockAlphaForwardingRules) List(ctx context.Context, region string, fl *
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockAlphaForwardingRules.List(%v, %q, %v) = nil, %v", ctx, region, fl, err)
+ klog.V(5).Infof("MockFirewalls.List(%v, %v) = nil, %v", ctx, fl, err)
return nil, *m.ListError
}
- var objs []*alpha.ForwardingRule
- for key, obj := range m.Objects {
- if key.Region != region {
- continue
- }
- if !fl.Match(obj.ToAlpha()) {
+ var objs []*ga.Firewall
+ for _, obj := range m.Objects {
+ if !fl.Match(obj.ToGA()) {
continue
}
- objs = append(objs, obj.ToAlpha())
+ objs = append(objs, obj.ToGA())
}
- klog.V(5).Infof("MockAlphaForwardingRules.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs))
+ klog.V(5).Infof("MockFirewalls.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockAlphaForwardingRules) Insert(ctx context.Context, key *meta.Key, obj *alpha.ForwardingRule) error {
+func (m *MockFirewalls) Insert(ctx context.Context, key *meta.Key, obj *ga.Firewall) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockAlphaForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockFirewalls.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -8276,32 +8503,32 @@ func (m *MockAlphaForwardingRules) Insert(ctx context.Context, key *meta.Key, ob
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockAlphaForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockFirewalls.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockAlphaForwardingRules %v exists", key),
+ Message: fmt.Sprintf("MockFirewalls %v exists", key),
}
- klog.V(5).Infof("MockAlphaForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockFirewalls.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "forwardingRules")
- obj.SelfLink = SelfLink(meta.VersionAlpha, projectID, "forwardingRules", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "ga", "firewalls")
+ obj.SelfLink = SelfLink(meta.VersionGA, projectID, "firewalls", key)
- m.Objects[*key] = &MockForwardingRulesObj{obj}
- klog.V(5).Infof("MockAlphaForwardingRules.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ m.Objects[*key] = &MockFirewallsObj{obj}
+ klog.V(5).Infof("MockFirewalls.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockAlphaForwardingRules) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockFirewalls) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockAlphaForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockFirewalls.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -8313,222 +8540,223 @@ func (m *MockAlphaForwardingRules) Delete(ctx context.Context, key *meta.Key) er
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockAlphaForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockFirewalls.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockAlphaForwardingRules %v not found", key),
+ Message: fmt.Sprintf("MockFirewalls %v not found", key),
}
- klog.V(5).Infof("MockAlphaForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockFirewalls.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockAlphaForwardingRules.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockFirewalls.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockAlphaForwardingRules) Obj(o *alpha.ForwardingRule) *MockForwardingRulesObj {
- return &MockForwardingRulesObj{o}
+func (m *MockFirewalls) Obj(o *ga.Firewall) *MockFirewallsObj {
+ return &MockFirewallsObj{o}
}
-// SetTarget is a mock for the corresponding method.
-func (m *MockAlphaForwardingRules) SetTarget(ctx context.Context, key *meta.Key, arg0 *alpha.TargetReference) error {
- if m.SetTargetHook != nil {
- return m.SetTargetHook(ctx, key, arg0, m)
+// Update is a mock for the corresponding method.
+func (m *MockFirewalls) Update(ctx context.Context, key *meta.Key, arg0 *ga.Firewall) error {
+ if m.UpdateHook != nil {
+ return m.UpdateHook(ctx, key, arg0, m)
}
return nil
}
-// GCEAlphaForwardingRules is a simplifying adapter for the GCE ForwardingRules.
-type GCEAlphaForwardingRules struct {
+// GCEFirewalls is a simplifying adapter for the GCE Firewalls.
+type GCEFirewalls struct {
s *Service
}
-// Get the ForwardingRule named by key.
-func (g *GCEAlphaForwardingRules) Get(ctx context.Context, key *meta.Key) (*alpha.ForwardingRule, error) {
- klog.V(5).Infof("GCEAlphaForwardingRules.Get(%v, %v): called", ctx, key)
+// Get the Firewall named by key.
+func (g *GCEFirewalls) Get(ctx context.Context, key *meta.Key) (*ga.Firewall, error) {
+ klog.V(5).Infof("GCEFirewalls.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaForwardingRules.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEFirewalls.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "ForwardingRules")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Firewalls")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
- Version: meta.Version("alpha"),
- Service: "ForwardingRules",
- }
- klog.V(5).Infof("GCEAlphaForwardingRules.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ Version: meta.Version("ga"),
+ Service: "Firewalls",
+ }
+ klog.V(5).Infof("GCEFirewalls.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaForwardingRules.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEFirewalls.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.Alpha.ForwardingRules.Get(projectID, key.Region, key.Name)
+ call := g.s.GA.Firewalls.Get(projectID, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEAlphaForwardingRules.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEFirewalls.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
-// List all ForwardingRule objects.
-func (g *GCEAlphaForwardingRules) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.ForwardingRule, error) {
- klog.V(5).Infof("GCEAlphaForwardingRules.List(%v, %v, %v) called", ctx, region, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "ForwardingRules")
+// List all Firewall objects.
+func (g *GCEFirewalls) List(ctx context.Context, fl *filter.F) ([]*ga.Firewall, error) {
+ klog.V(5).Infof("GCEFirewalls.List(%v, %v) called", ctx, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Firewalls")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
- Version: meta.Version("alpha"),
- Service: "ForwardingRules",
+ Version: meta.Version("ga"),
+ Service: "Firewalls",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCEAlphaForwardingRules.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk)
- call := g.s.Alpha.ForwardingRules.List(projectID, region)
+ klog.V(5).Infof("GCEFirewalls.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
+ call := g.s.GA.Firewalls.List(projectID)
if fl != filter.None {
call.Filter(fl.String())
}
- var all []*alpha.ForwardingRule
- f := func(l *alpha.ForwardingRuleList) error {
- klog.V(5).Infof("GCEAlphaForwardingRules.List(%v, ..., %v): page %+v", ctx, fl, l)
+ var all []*ga.Firewall
+ f := func(l *ga.FirewallList) error {
+ klog.V(5).Infof("GCEFirewalls.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEAlphaForwardingRules.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEFirewalls.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEAlphaForwardingRules.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEFirewalls.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEAlphaForwardingRules.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEFirewalls.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
-// Insert ForwardingRule with key of value obj.
-func (g *GCEAlphaForwardingRules) Insert(ctx context.Context, key *meta.Key, obj *alpha.ForwardingRule) error {
- klog.V(5).Infof("GCEAlphaForwardingRules.Insert(%v, %v, %+v): called", ctx, key, obj)
+// Insert Firewall with key of value obj.
+func (g *GCEFirewalls) Insert(ctx context.Context, key *meta.Key, obj *ga.Firewall) error {
+ klog.V(5).Infof("GCEFirewalls.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaForwardingRules.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEFirewalls.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "ForwardingRules")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Firewalls")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
- Version: meta.Version("alpha"),
- Service: "ForwardingRules",
+ Version: meta.Version("ga"),
+ Service: "Firewalls",
}
- klog.V(5).Infof("GCEAlphaForwardingRules.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEFirewalls.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaForwardingRules.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEFirewalls.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.Alpha.ForwardingRules.Insert(projectID, key.Region, obj)
+ call := g.s.GA.Firewalls.Insert(projectID, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaForwardingRules.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEFirewalls.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaForwardingRules.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCEFirewalls.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
-// Delete the ForwardingRule referenced by key.
-func (g *GCEAlphaForwardingRules) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEAlphaForwardingRules.Delete(%v, %v): called", ctx, key)
+// Delete the Firewall referenced by key.
+func (g *GCEFirewalls) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEFirewalls.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaForwardingRules.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEFirewalls.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "ForwardingRules")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Firewalls")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
- Version: meta.Version("alpha"),
- Service: "ForwardingRules",
+ Version: meta.Version("ga"),
+ Service: "Firewalls",
}
- klog.V(5).Infof("GCEAlphaForwardingRules.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEFirewalls.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaForwardingRules.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEFirewalls.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Alpha.ForwardingRules.Delete(projectID, key.Region, key.Name)
+ call := g.s.GA.Firewalls.Delete(projectID, key.Name)
+
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEFirewalls.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEFirewalls.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// SetTarget is a method on GCEAlphaForwardingRules.
-func (g *GCEAlphaForwardingRules) SetTarget(ctx context.Context, key *meta.Key, arg0 *alpha.TargetReference) error {
- klog.V(5).Infof("GCEAlphaForwardingRules.SetTarget(%v, %v, ...): called", ctx, key)
+// Update is a method on GCEFirewalls.
+func (g *GCEFirewalls) Update(ctx context.Context, key *meta.Key, arg0 *ga.Firewall) error {
+ klog.V(5).Infof("GCEFirewalls.Update(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaForwardingRules.SetTarget(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEFirewalls.Update(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "ForwardingRules")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Firewalls")
rk := &RateLimitKey{
ProjectID: projectID,
- Operation: "SetTarget",
- Version: meta.Version("alpha"),
- Service: "ForwardingRules",
+ Operation: "Update",
+ Version: meta.Version("ga"),
+ Service: "Firewalls",
}
- klog.V(5).Infof("GCEAlphaForwardingRules.SetTarget(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEFirewalls.Update(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaForwardingRules.SetTarget(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEFirewalls.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Alpha.ForwardingRules.SetTarget(projectID, key.Region, key.Name, arg0)
+ call := g.s.GA.Firewalls.Update(projectID, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaForwardingRules.SetTarget(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEFirewalls.Update(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaForwardingRules.SetTarget(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEFirewalls.Update(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// BetaForwardingRules is an interface that allows for mocking of ForwardingRules.
-type BetaForwardingRules interface {
- Get(ctx context.Context, key *meta.Key) (*beta.ForwardingRule, error)
- List(ctx context.Context, region string, fl *filter.F) ([]*beta.ForwardingRule, error)
- Insert(ctx context.Context, key *meta.Key, obj *beta.ForwardingRule) error
+// ForwardingRules is an interface that allows for mocking of ForwardingRules.
+type ForwardingRules interface {
+ Get(ctx context.Context, key *meta.Key) (*ga.ForwardingRule, error)
+ List(ctx context.Context, region string, fl *filter.F) ([]*ga.ForwardingRule, error)
+ Insert(ctx context.Context, key *meta.Key, obj *ga.ForwardingRule) error
Delete(ctx context.Context, key *meta.Key) error
- SetTarget(context.Context, *meta.Key, *beta.TargetReference) error
+ SetTarget(context.Context, *meta.Key, *ga.TargetReference) error
}
-// NewMockBetaForwardingRules returns a new mock for ForwardingRules.
-func NewMockBetaForwardingRules(pr ProjectRouter, objs map[meta.Key]*MockForwardingRulesObj) *MockBetaForwardingRules {
- mock := &MockBetaForwardingRules{
+// NewMockForwardingRules returns a new mock for ForwardingRules.
+func NewMockForwardingRules(pr ProjectRouter, objs map[meta.Key]*MockForwardingRulesObj) *MockForwardingRules {
+ mock := &MockForwardingRules{
ProjectRouter: pr,
Objects: objs,
@@ -8539,8 +8767,8 @@ func NewMockBetaForwardingRules(pr ProjectRouter, objs map[meta.Key]*MockForward
return mock
}
-// MockBetaForwardingRules is the mock for ForwardingRules.
-type MockBetaForwardingRules struct {
+// MockForwardingRules is the mock for ForwardingRules.
+type MockForwardingRules struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
@@ -8559,11 +8787,11 @@ type MockBetaForwardingRules struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockBetaForwardingRules) (bool, *beta.ForwardingRule, error)
- ListHook func(ctx context.Context, region string, fl *filter.F, m *MockBetaForwardingRules) (bool, []*beta.ForwardingRule, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *beta.ForwardingRule, m *MockBetaForwardingRules) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaForwardingRules) (bool, error)
- SetTargetHook func(context.Context, *meta.Key, *beta.TargetReference, *MockBetaForwardingRules) error
+ GetHook func(ctx context.Context, key *meta.Key, m *MockForwardingRules) (bool, *ga.ForwardingRule, error)
+ ListHook func(ctx context.Context, region string, fl *filter.F, m *MockForwardingRules) (bool, []*ga.ForwardingRule, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *ga.ForwardingRule, m *MockForwardingRules) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockForwardingRules) (bool, error)
+ SetTargetHook func(context.Context, *meta.Key, *ga.TargetReference, *MockForwardingRules) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -8571,10 +8799,10 @@ type MockBetaForwardingRules struct {
}
// Get returns the object from the mock.
-func (m *MockBetaForwardingRules) Get(ctx context.Context, key *meta.Key) (*beta.ForwardingRule, error) {
+func (m *MockForwardingRules) Get(ctx context.Context, key *meta.Key) (*ga.ForwardingRule, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockBetaForwardingRules.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockForwardingRules.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -8586,28 +8814,28 @@ func (m *MockBetaForwardingRules) Get(ctx context.Context, key *meta.Key) (*beta
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockBetaForwardingRules.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockForwardingRules.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
- typedObj := obj.ToBeta()
- klog.V(5).Infof("MockBetaForwardingRules.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ typedObj := obj.ToGA()
+ klog.V(5).Infof("MockForwardingRules.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockBetaForwardingRules %v not found", key),
+ Message: fmt.Sprintf("MockForwardingRules %v not found", key),
}
- klog.V(5).Infof("MockBetaForwardingRules.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockForwardingRules.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
// List all of the objects in the mock in the given region.
-func (m *MockBetaForwardingRules) List(ctx context.Context, region string, fl *filter.F) ([]*beta.ForwardingRule, error) {
+func (m *MockForwardingRules) List(ctx context.Context, region string, fl *filter.F) ([]*ga.ForwardingRule, error) {
if m.ListHook != nil {
if intercept, objs, err := m.ListHook(ctx, region, fl, m); intercept {
- klog.V(5).Infof("MockBetaForwardingRules.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err)
+ klog.V(5).Infof("MockForwardingRules.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err)
return objs, err
}
}
@@ -8617,31 +8845,31 @@ func (m *MockBetaForwardingRules) List(ctx context.Context, region string, fl *f
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockBetaForwardingRules.List(%v, %q, %v) = nil, %v", ctx, region, fl, err)
+ klog.V(5).Infof("MockForwardingRules.List(%v, %q, %v) = nil, %v", ctx, region, fl, err)
return nil, *m.ListError
}
- var objs []*beta.ForwardingRule
+ var objs []*ga.ForwardingRule
for key, obj := range m.Objects {
if key.Region != region {
continue
}
- if !fl.Match(obj.ToBeta()) {
+ if !fl.Match(obj.ToGA()) {
continue
}
- objs = append(objs, obj.ToBeta())
+ objs = append(objs, obj.ToGA())
}
- klog.V(5).Infof("MockBetaForwardingRules.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs))
+ klog.V(5).Infof("MockForwardingRules.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockBetaForwardingRules) Insert(ctx context.Context, key *meta.Key, obj *beta.ForwardingRule) error {
+func (m *MockForwardingRules) Insert(ctx context.Context, key *meta.Key, obj *ga.ForwardingRule) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockBetaForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -8653,32 +8881,32 @@ func (m *MockBetaForwardingRules) Insert(ctx context.Context, key *meta.Key, obj
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockBetaForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockBetaForwardingRules %v exists", key),
+ Message: fmt.Sprintf("MockForwardingRules %v exists", key),
}
- klog.V(5).Infof("MockBetaForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "beta", "forwardingRules")
- obj.SelfLink = SelfLink(meta.VersionBeta, projectID, "forwardingRules", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "ga", "forwardingRules")
+ obj.SelfLink = SelfLink(meta.VersionGA, projectID, "forwardingRules", key)
m.Objects[*key] = &MockForwardingRulesObj{obj}
- klog.V(5).Infof("MockBetaForwardingRules.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ klog.V(5).Infof("MockForwardingRules.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockBetaForwardingRules) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockForwardingRules) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockBetaForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -8690,222 +8918,222 @@ func (m *MockBetaForwardingRules) Delete(ctx context.Context, key *meta.Key) err
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockBetaForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockBetaForwardingRules %v not found", key),
+ Message: fmt.Sprintf("MockForwardingRules %v not found", key),
}
- klog.V(5).Infof("MockBetaForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockBetaForwardingRules.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockForwardingRules.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockBetaForwardingRules) Obj(o *beta.ForwardingRule) *MockForwardingRulesObj {
+func (m *MockForwardingRules) Obj(o *ga.ForwardingRule) *MockForwardingRulesObj {
return &MockForwardingRulesObj{o}
}
// SetTarget is a mock for the corresponding method.
-func (m *MockBetaForwardingRules) SetTarget(ctx context.Context, key *meta.Key, arg0 *beta.TargetReference) error {
+func (m *MockForwardingRules) SetTarget(ctx context.Context, key *meta.Key, arg0 *ga.TargetReference) error {
if m.SetTargetHook != nil {
return m.SetTargetHook(ctx, key, arg0, m)
}
return nil
}
-// GCEBetaForwardingRules is a simplifying adapter for the GCE ForwardingRules.
-type GCEBetaForwardingRules struct {
+// GCEForwardingRules is a simplifying adapter for the GCE ForwardingRules.
+type GCEForwardingRules struct {
s *Service
}
// Get the ForwardingRule named by key.
-func (g *GCEBetaForwardingRules) Get(ctx context.Context, key *meta.Key) (*beta.ForwardingRule, error) {
- klog.V(5).Infof("GCEBetaForwardingRules.Get(%v, %v): called", ctx, key)
+func (g *GCEForwardingRules) Get(ctx context.Context, key *meta.Key) (*ga.ForwardingRule, error) {
+ klog.V(5).Infof("GCEForwardingRules.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaForwardingRules.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEForwardingRules.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "ForwardingRules")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "ForwardingRules")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
- Version: meta.Version("beta"),
+ Version: meta.Version("ga"),
Service: "ForwardingRules",
}
- klog.V(5).Infof("GCEBetaForwardingRules.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEForwardingRules.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaForwardingRules.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEForwardingRules.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.Beta.ForwardingRules.Get(projectID, key.Region, key.Name)
+ call := g.s.GA.ForwardingRules.Get(projectID, key.Region, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEBetaForwardingRules.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEForwardingRules.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
// List all ForwardingRule objects.
-func (g *GCEBetaForwardingRules) List(ctx context.Context, region string, fl *filter.F) ([]*beta.ForwardingRule, error) {
- klog.V(5).Infof("GCEBetaForwardingRules.List(%v, %v, %v) called", ctx, region, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "ForwardingRules")
+func (g *GCEForwardingRules) List(ctx context.Context, region string, fl *filter.F) ([]*ga.ForwardingRule, error) {
+ klog.V(5).Infof("GCEForwardingRules.List(%v, %v, %v) called", ctx, region, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "ForwardingRules")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
- Version: meta.Version("beta"),
+ Version: meta.Version("ga"),
Service: "ForwardingRules",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCEBetaForwardingRules.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk)
- call := g.s.Beta.ForwardingRules.List(projectID, region)
+ klog.V(5).Infof("GCEForwardingRules.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk)
+ call := g.s.GA.ForwardingRules.List(projectID, region)
if fl != filter.None {
call.Filter(fl.String())
}
- var all []*beta.ForwardingRule
- f := func(l *beta.ForwardingRuleList) error {
- klog.V(5).Infof("GCEBetaForwardingRules.List(%v, ..., %v): page %+v", ctx, fl, l)
+ var all []*ga.ForwardingRule
+ f := func(l *ga.ForwardingRuleList) error {
+ klog.V(5).Infof("GCEForwardingRules.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEBetaForwardingRules.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEForwardingRules.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEBetaForwardingRules.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEForwardingRules.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEBetaForwardingRules.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEForwardingRules.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
// Insert ForwardingRule with key of value obj.
-func (g *GCEBetaForwardingRules) Insert(ctx context.Context, key *meta.Key, obj *beta.ForwardingRule) error {
- klog.V(5).Infof("GCEBetaForwardingRules.Insert(%v, %v, %+v): called", ctx, key, obj)
+func (g *GCEForwardingRules) Insert(ctx context.Context, key *meta.Key, obj *ga.ForwardingRule) error {
+ klog.V(5).Infof("GCEForwardingRules.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaForwardingRules.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEForwardingRules.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "ForwardingRules")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "ForwardingRules")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
- Version: meta.Version("beta"),
+ Version: meta.Version("ga"),
Service: "ForwardingRules",
}
- klog.V(5).Infof("GCEBetaForwardingRules.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEForwardingRules.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaForwardingRules.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEForwardingRules.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.Beta.ForwardingRules.Insert(projectID, key.Region, obj)
+ call := g.s.GA.ForwardingRules.Insert(projectID, key.Region, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaForwardingRules.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEForwardingRules.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaForwardingRules.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCEForwardingRules.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
// Delete the ForwardingRule referenced by key.
-func (g *GCEBetaForwardingRules) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEBetaForwardingRules.Delete(%v, %v): called", ctx, key)
+func (g *GCEForwardingRules) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEForwardingRules.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaForwardingRules.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEForwardingRules.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "ForwardingRules")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "ForwardingRules")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
- Version: meta.Version("beta"),
+ Version: meta.Version("ga"),
Service: "ForwardingRules",
}
- klog.V(5).Infof("GCEBetaForwardingRules.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEForwardingRules.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaForwardingRules.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEForwardingRules.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Beta.ForwardingRules.Delete(projectID, key.Region, key.Name)
+ call := g.s.GA.ForwardingRules.Delete(projectID, key.Region, key.Name)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// SetTarget is a method on GCEBetaForwardingRules.
-func (g *GCEBetaForwardingRules) SetTarget(ctx context.Context, key *meta.Key, arg0 *beta.TargetReference) error {
- klog.V(5).Infof("GCEBetaForwardingRules.SetTarget(%v, %v, ...): called", ctx, key)
+// SetTarget is a method on GCEForwardingRules.
+func (g *GCEForwardingRules) SetTarget(ctx context.Context, key *meta.Key, arg0 *ga.TargetReference) error {
+ klog.V(5).Infof("GCEForwardingRules.SetTarget(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaForwardingRules.SetTarget(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEForwardingRules.SetTarget(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "ForwardingRules")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "ForwardingRules")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "SetTarget",
- Version: meta.Version("beta"),
+ Version: meta.Version("ga"),
Service: "ForwardingRules",
}
- klog.V(5).Infof("GCEBetaForwardingRules.SetTarget(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEForwardingRules.SetTarget(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaForwardingRules.SetTarget(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEForwardingRules.SetTarget(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Beta.ForwardingRules.SetTarget(projectID, key.Region, key.Name, arg0)
+ call := g.s.GA.ForwardingRules.SetTarget(projectID, key.Region, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaForwardingRules.SetTarget(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEForwardingRules.SetTarget(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaForwardingRules.SetTarget(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEForwardingRules.SetTarget(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// AlphaGlobalForwardingRules is an interface that allows for mocking of GlobalForwardingRules.
-type AlphaGlobalForwardingRules interface {
+// AlphaForwardingRules is an interface that allows for mocking of ForwardingRules.
+type AlphaForwardingRules interface {
Get(ctx context.Context, key *meta.Key) (*alpha.ForwardingRule, error)
- List(ctx context.Context, fl *filter.F) ([]*alpha.ForwardingRule, error)
+ List(ctx context.Context, region string, fl *filter.F) ([]*alpha.ForwardingRule, error)
Insert(ctx context.Context, key *meta.Key, obj *alpha.ForwardingRule) error
Delete(ctx context.Context, key *meta.Key) error
SetTarget(context.Context, *meta.Key, *alpha.TargetReference) error
}
-// NewMockAlphaGlobalForwardingRules returns a new mock for GlobalForwardingRules.
-func NewMockAlphaGlobalForwardingRules(pr ProjectRouter, objs map[meta.Key]*MockGlobalForwardingRulesObj) *MockAlphaGlobalForwardingRules {
- mock := &MockAlphaGlobalForwardingRules{
+// NewMockAlphaForwardingRules returns a new mock for ForwardingRules.
+func NewMockAlphaForwardingRules(pr ProjectRouter, objs map[meta.Key]*MockForwardingRulesObj) *MockAlphaForwardingRules {
+ mock := &MockAlphaForwardingRules{
ProjectRouter: pr,
Objects: objs,
@@ -8916,14 +9144,14 @@ func NewMockAlphaGlobalForwardingRules(pr ProjectRouter, objs map[meta.Key]*Mock
return mock
}
-// MockAlphaGlobalForwardingRules is the mock for GlobalForwardingRules.
-type MockAlphaGlobalForwardingRules struct {
+// MockAlphaForwardingRules is the mock for ForwardingRules.
+type MockAlphaForwardingRules struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
// Objects maintained by the mock.
- Objects map[meta.Key]*MockGlobalForwardingRulesObj
+ Objects map[meta.Key]*MockForwardingRulesObj
// If an entry exists for the given key and operation, then the error
// will be returned instead of the operation.
@@ -8936,11 +9164,11 @@ type MockAlphaGlobalForwardingRules struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaGlobalForwardingRules) (bool, *alpha.ForwardingRule, error)
- ListHook func(ctx context.Context, fl *filter.F, m *MockAlphaGlobalForwardingRules) (bool, []*alpha.ForwardingRule, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *alpha.ForwardingRule, m *MockAlphaGlobalForwardingRules) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaGlobalForwardingRules) (bool, error)
- SetTargetHook func(context.Context, *meta.Key, *alpha.TargetReference, *MockAlphaGlobalForwardingRules) error
+ GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaForwardingRules) (bool, *alpha.ForwardingRule, error)
+ ListHook func(ctx context.Context, region string, fl *filter.F, m *MockAlphaForwardingRules) (bool, []*alpha.ForwardingRule, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *alpha.ForwardingRule, m *MockAlphaForwardingRules) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaForwardingRules) (bool, error)
+ SetTargetHook func(context.Context, *meta.Key, *alpha.TargetReference, *MockAlphaForwardingRules) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -8948,10 +9176,10 @@ type MockAlphaGlobalForwardingRules struct {
}
// Get returns the object from the mock.
-func (m *MockAlphaGlobalForwardingRules) Get(ctx context.Context, key *meta.Key) (*alpha.ForwardingRule, error) {
+func (m *MockAlphaForwardingRules) Get(ctx context.Context, key *meta.Key) (*alpha.ForwardingRule, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockAlphaGlobalForwardingRules.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaForwardingRules.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -8963,28 +9191,28 @@ func (m *MockAlphaGlobalForwardingRules) Get(ctx context.Context, key *meta.Key)
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockAlphaGlobalForwardingRules.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaForwardingRules.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
typedObj := obj.ToAlpha()
- klog.V(5).Infof("MockAlphaGlobalForwardingRules.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ klog.V(5).Infof("MockAlphaForwardingRules.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockAlphaGlobalForwardingRules %v not found", key),
+ Message: fmt.Sprintf("MockAlphaForwardingRules %v not found", key),
}
- klog.V(5).Infof("MockAlphaGlobalForwardingRules.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaForwardingRules.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
-// List all of the objects in the mock.
-func (m *MockAlphaGlobalForwardingRules) List(ctx context.Context, fl *filter.F) ([]*alpha.ForwardingRule, error) {
+// List all of the objects in the mock in the given region.
+func (m *MockAlphaForwardingRules) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.ForwardingRule, error) {
if m.ListHook != nil {
- if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
- klog.V(5).Infof("MockAlphaGlobalForwardingRules.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
+ if intercept, objs, err := m.ListHook(ctx, region, fl, m); intercept {
+ klog.V(5).Infof("MockAlphaForwardingRules.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err)
return objs, err
}
}
@@ -8994,28 +9222,31 @@ func (m *MockAlphaGlobalForwardingRules) List(ctx context.Context, fl *filter.F)
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockAlphaGlobalForwardingRules.List(%v, %v) = nil, %v", ctx, fl, err)
+ klog.V(5).Infof("MockAlphaForwardingRules.List(%v, %q, %v) = nil, %v", ctx, region, fl, err)
return nil, *m.ListError
}
var objs []*alpha.ForwardingRule
- for _, obj := range m.Objects {
+ for key, obj := range m.Objects {
+ if key.Region != region {
+ continue
+ }
if !fl.Match(obj.ToAlpha()) {
continue
}
objs = append(objs, obj.ToAlpha())
}
- klog.V(5).Infof("MockAlphaGlobalForwardingRules.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
+ klog.V(5).Infof("MockAlphaForwardingRules.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockAlphaGlobalForwardingRules) Insert(ctx context.Context, key *meta.Key, obj *alpha.ForwardingRule) error {
+func (m *MockAlphaForwardingRules) Insert(ctx context.Context, key *meta.Key, obj *alpha.ForwardingRule) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockAlphaGlobalForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -9027,15 +9258,15 @@ func (m *MockAlphaGlobalForwardingRules) Insert(ctx context.Context, key *meta.K
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockAlphaGlobalForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockAlphaGlobalForwardingRules %v exists", key),
+ Message: fmt.Sprintf("MockAlphaForwardingRules %v exists", key),
}
- klog.V(5).Infof("MockAlphaGlobalForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
@@ -9043,16 +9274,16 @@ func (m *MockAlphaGlobalForwardingRules) Insert(ctx context.Context, key *meta.K
projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "forwardingRules")
obj.SelfLink = SelfLink(meta.VersionAlpha, projectID, "forwardingRules", key)
- m.Objects[*key] = &MockGlobalForwardingRulesObj{obj}
- klog.V(5).Infof("MockAlphaGlobalForwardingRules.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ m.Objects[*key] = &MockForwardingRulesObj{obj}
+ klog.V(5).Infof("MockAlphaForwardingRules.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockAlphaGlobalForwardingRules) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockAlphaForwardingRules) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockAlphaGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -9064,223 +9295,222 @@ func (m *MockAlphaGlobalForwardingRules) Delete(ctx context.Context, key *meta.K
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockAlphaGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockAlphaGlobalForwardingRules %v not found", key),
+ Message: fmt.Sprintf("MockAlphaForwardingRules %v not found", key),
}
- klog.V(5).Infof("MockAlphaGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockAlphaGlobalForwardingRules.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockAlphaForwardingRules.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockAlphaGlobalForwardingRules) Obj(o *alpha.ForwardingRule) *MockGlobalForwardingRulesObj {
- return &MockGlobalForwardingRulesObj{o}
+func (m *MockAlphaForwardingRules) Obj(o *alpha.ForwardingRule) *MockForwardingRulesObj {
+ return &MockForwardingRulesObj{o}
}
// SetTarget is a mock for the corresponding method.
-func (m *MockAlphaGlobalForwardingRules) SetTarget(ctx context.Context, key *meta.Key, arg0 *alpha.TargetReference) error {
+func (m *MockAlphaForwardingRules) SetTarget(ctx context.Context, key *meta.Key, arg0 *alpha.TargetReference) error {
if m.SetTargetHook != nil {
return m.SetTargetHook(ctx, key, arg0, m)
}
return nil
}
-// GCEAlphaGlobalForwardingRules is a simplifying adapter for the GCE GlobalForwardingRules.
-type GCEAlphaGlobalForwardingRules struct {
+// GCEAlphaForwardingRules is a simplifying adapter for the GCE ForwardingRules.
+type GCEAlphaForwardingRules struct {
s *Service
}
// Get the ForwardingRule named by key.
-func (g *GCEAlphaGlobalForwardingRules) Get(ctx context.Context, key *meta.Key) (*alpha.ForwardingRule, error) {
- klog.V(5).Infof("GCEAlphaGlobalForwardingRules.Get(%v, %v): called", ctx, key)
+func (g *GCEAlphaForwardingRules) Get(ctx context.Context, key *meta.Key) (*alpha.ForwardingRule, error) {
+ klog.V(5).Infof("GCEAlphaForwardingRules.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaGlobalForwardingRules.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaForwardingRules.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "GlobalForwardingRules")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "ForwardingRules")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
Version: meta.Version("alpha"),
- Service: "GlobalForwardingRules",
+ Service: "ForwardingRules",
}
- klog.V(5).Infof("GCEAlphaGlobalForwardingRules.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaForwardingRules.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaGlobalForwardingRules.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaForwardingRules.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.Alpha.GlobalForwardingRules.Get(projectID, key.Name)
+ call := g.s.Alpha.ForwardingRules.Get(projectID, key.Region, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEAlphaGlobalForwardingRules.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEAlphaForwardingRules.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
// List all ForwardingRule objects.
-func (g *GCEAlphaGlobalForwardingRules) List(ctx context.Context, fl *filter.F) ([]*alpha.ForwardingRule, error) {
- klog.V(5).Infof("GCEAlphaGlobalForwardingRules.List(%v, %v) called", ctx, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "GlobalForwardingRules")
+func (g *GCEAlphaForwardingRules) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.ForwardingRule, error) {
+ klog.V(5).Infof("GCEAlphaForwardingRules.List(%v, %v, %v) called", ctx, region, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "ForwardingRules")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
Version: meta.Version("alpha"),
- Service: "GlobalForwardingRules",
+ Service: "ForwardingRules",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCEAlphaGlobalForwardingRules.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
- call := g.s.Alpha.GlobalForwardingRules.List(projectID)
+ klog.V(5).Infof("GCEAlphaForwardingRules.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk)
+ call := g.s.Alpha.ForwardingRules.List(projectID, region)
if fl != filter.None {
call.Filter(fl.String())
}
var all []*alpha.ForwardingRule
f := func(l *alpha.ForwardingRuleList) error {
- klog.V(5).Infof("GCEAlphaGlobalForwardingRules.List(%v, ..., %v): page %+v", ctx, fl, l)
+ klog.V(5).Infof("GCEAlphaForwardingRules.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEAlphaGlobalForwardingRules.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEAlphaForwardingRules.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEAlphaGlobalForwardingRules.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEAlphaForwardingRules.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEAlphaGlobalForwardingRules.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEAlphaForwardingRules.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
// Insert ForwardingRule with key of value obj.
-func (g *GCEAlphaGlobalForwardingRules) Insert(ctx context.Context, key *meta.Key, obj *alpha.ForwardingRule) error {
- klog.V(5).Infof("GCEAlphaGlobalForwardingRules.Insert(%v, %v, %+v): called", ctx, key, obj)
+func (g *GCEAlphaForwardingRules) Insert(ctx context.Context, key *meta.Key, obj *alpha.ForwardingRule) error {
+ klog.V(5).Infof("GCEAlphaForwardingRules.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaGlobalForwardingRules.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaForwardingRules.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "GlobalForwardingRules")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "ForwardingRules")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
Version: meta.Version("alpha"),
- Service: "GlobalForwardingRules",
+ Service: "ForwardingRules",
}
- klog.V(5).Infof("GCEAlphaGlobalForwardingRules.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaForwardingRules.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaGlobalForwardingRules.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaForwardingRules.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.Alpha.GlobalForwardingRules.Insert(projectID, obj)
+ call := g.s.Alpha.ForwardingRules.Insert(projectID, key.Region, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaGlobalForwardingRules.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaForwardingRules.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaGlobalForwardingRules.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCEAlphaForwardingRules.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
// Delete the ForwardingRule referenced by key.
-func (g *GCEAlphaGlobalForwardingRules) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEAlphaGlobalForwardingRules.Delete(%v, %v): called", ctx, key)
+func (g *GCEAlphaForwardingRules) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEAlphaForwardingRules.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaGlobalForwardingRules.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaForwardingRules.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "GlobalForwardingRules")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "ForwardingRules")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
Version: meta.Version("alpha"),
- Service: "GlobalForwardingRules",
+ Service: "ForwardingRules",
}
- klog.V(5).Infof("GCEAlphaGlobalForwardingRules.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaForwardingRules.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaGlobalForwardingRules.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaForwardingRules.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Alpha.GlobalForwardingRules.Delete(projectID, key.Name)
-
+ call := g.s.Alpha.ForwardingRules.Delete(projectID, key.Region, key.Name)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// SetTarget is a method on GCEAlphaGlobalForwardingRules.
-func (g *GCEAlphaGlobalForwardingRules) SetTarget(ctx context.Context, key *meta.Key, arg0 *alpha.TargetReference) error {
- klog.V(5).Infof("GCEAlphaGlobalForwardingRules.SetTarget(%v, %v, ...): called", ctx, key)
+// SetTarget is a method on GCEAlphaForwardingRules.
+func (g *GCEAlphaForwardingRules) SetTarget(ctx context.Context, key *meta.Key, arg0 *alpha.TargetReference) error {
+ klog.V(5).Infof("GCEAlphaForwardingRules.SetTarget(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaGlobalForwardingRules.SetTarget(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaForwardingRules.SetTarget(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "GlobalForwardingRules")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "ForwardingRules")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "SetTarget",
Version: meta.Version("alpha"),
- Service: "GlobalForwardingRules",
+ Service: "ForwardingRules",
}
- klog.V(5).Infof("GCEAlphaGlobalForwardingRules.SetTarget(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaForwardingRules.SetTarget(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaGlobalForwardingRules.SetTarget(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaForwardingRules.SetTarget(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Alpha.GlobalForwardingRules.SetTarget(projectID, key.Name, arg0)
+ call := g.s.Alpha.ForwardingRules.SetTarget(projectID, key.Region, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaGlobalForwardingRules.SetTarget(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaForwardingRules.SetTarget(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaGlobalForwardingRules.SetTarget(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaForwardingRules.SetTarget(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// BetaGlobalForwardingRules is an interface that allows for mocking of GlobalForwardingRules.
-type BetaGlobalForwardingRules interface {
+// BetaForwardingRules is an interface that allows for mocking of ForwardingRules.
+type BetaForwardingRules interface {
Get(ctx context.Context, key *meta.Key) (*beta.ForwardingRule, error)
- List(ctx context.Context, fl *filter.F) ([]*beta.ForwardingRule, error)
+ List(ctx context.Context, region string, fl *filter.F) ([]*beta.ForwardingRule, error)
Insert(ctx context.Context, key *meta.Key, obj *beta.ForwardingRule) error
Delete(ctx context.Context, key *meta.Key) error
SetTarget(context.Context, *meta.Key, *beta.TargetReference) error
}
-// NewMockBetaGlobalForwardingRules returns a new mock for GlobalForwardingRules.
-func NewMockBetaGlobalForwardingRules(pr ProjectRouter, objs map[meta.Key]*MockGlobalForwardingRulesObj) *MockBetaGlobalForwardingRules {
- mock := &MockBetaGlobalForwardingRules{
+// NewMockBetaForwardingRules returns a new mock for ForwardingRules.
+func NewMockBetaForwardingRules(pr ProjectRouter, objs map[meta.Key]*MockForwardingRulesObj) *MockBetaForwardingRules {
+ mock := &MockBetaForwardingRules{
ProjectRouter: pr,
Objects: objs,
@@ -9291,14 +9521,14 @@ func NewMockBetaGlobalForwardingRules(pr ProjectRouter, objs map[meta.Key]*MockG
return mock
}
-// MockBetaGlobalForwardingRules is the mock for GlobalForwardingRules.
-type MockBetaGlobalForwardingRules struct {
+// MockBetaForwardingRules is the mock for ForwardingRules.
+type MockBetaForwardingRules struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
// Objects maintained by the mock.
- Objects map[meta.Key]*MockGlobalForwardingRulesObj
+ Objects map[meta.Key]*MockForwardingRulesObj
// If an entry exists for the given key and operation, then the error
// will be returned instead of the operation.
@@ -9311,11 +9541,11 @@ type MockBetaGlobalForwardingRules struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockBetaGlobalForwardingRules) (bool, *beta.ForwardingRule, error)
- ListHook func(ctx context.Context, fl *filter.F, m *MockBetaGlobalForwardingRules) (bool, []*beta.ForwardingRule, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *beta.ForwardingRule, m *MockBetaGlobalForwardingRules) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaGlobalForwardingRules) (bool, error)
- SetTargetHook func(context.Context, *meta.Key, *beta.TargetReference, *MockBetaGlobalForwardingRules) error
+ GetHook func(ctx context.Context, key *meta.Key, m *MockBetaForwardingRules) (bool, *beta.ForwardingRule, error)
+ ListHook func(ctx context.Context, region string, fl *filter.F, m *MockBetaForwardingRules) (bool, []*beta.ForwardingRule, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *beta.ForwardingRule, m *MockBetaForwardingRules) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaForwardingRules) (bool, error)
+ SetTargetHook func(context.Context, *meta.Key, *beta.TargetReference, *MockBetaForwardingRules) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -9323,10 +9553,10 @@ type MockBetaGlobalForwardingRules struct {
}
// Get returns the object from the mock.
-func (m *MockBetaGlobalForwardingRules) Get(ctx context.Context, key *meta.Key) (*beta.ForwardingRule, error) {
+func (m *MockBetaForwardingRules) Get(ctx context.Context, key *meta.Key) (*beta.ForwardingRule, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockBetaGlobalForwardingRules.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaForwardingRules.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -9338,28 +9568,28 @@ func (m *MockBetaGlobalForwardingRules) Get(ctx context.Context, key *meta.Key)
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockBetaGlobalForwardingRules.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaForwardingRules.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
typedObj := obj.ToBeta()
- klog.V(5).Infof("MockBetaGlobalForwardingRules.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ klog.V(5).Infof("MockBetaForwardingRules.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockBetaGlobalForwardingRules %v not found", key),
+ Message: fmt.Sprintf("MockBetaForwardingRules %v not found", key),
}
- klog.V(5).Infof("MockBetaGlobalForwardingRules.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaForwardingRules.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
-// List all of the objects in the mock.
-func (m *MockBetaGlobalForwardingRules) List(ctx context.Context, fl *filter.F) ([]*beta.ForwardingRule, error) {
+// List all of the objects in the mock in the given region.
+func (m *MockBetaForwardingRules) List(ctx context.Context, region string, fl *filter.F) ([]*beta.ForwardingRule, error) {
if m.ListHook != nil {
- if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
- klog.V(5).Infof("MockBetaGlobalForwardingRules.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
+ if intercept, objs, err := m.ListHook(ctx, region, fl, m); intercept {
+ klog.V(5).Infof("MockBetaForwardingRules.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err)
return objs, err
}
}
@@ -9369,28 +9599,31 @@ func (m *MockBetaGlobalForwardingRules) List(ctx context.Context, fl *filter.F)
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockBetaGlobalForwardingRules.List(%v, %v) = nil, %v", ctx, fl, err)
+ klog.V(5).Infof("MockBetaForwardingRules.List(%v, %q, %v) = nil, %v", ctx, region, fl, err)
return nil, *m.ListError
}
var objs []*beta.ForwardingRule
- for _, obj := range m.Objects {
+ for key, obj := range m.Objects {
+ if key.Region != region {
+ continue
+ }
if !fl.Match(obj.ToBeta()) {
continue
}
objs = append(objs, obj.ToBeta())
}
- klog.V(5).Infof("MockBetaGlobalForwardingRules.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
+ klog.V(5).Infof("MockBetaForwardingRules.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockBetaGlobalForwardingRules) Insert(ctx context.Context, key *meta.Key, obj *beta.ForwardingRule) error {
+func (m *MockBetaForwardingRules) Insert(ctx context.Context, key *meta.Key, obj *beta.ForwardingRule) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockBetaGlobalForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -9402,15 +9635,15 @@ func (m *MockBetaGlobalForwardingRules) Insert(ctx context.Context, key *meta.Ke
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockBetaGlobalForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockBetaGlobalForwardingRules %v exists", key),
+ Message: fmt.Sprintf("MockBetaForwardingRules %v exists", key),
}
- klog.V(5).Infof("MockBetaGlobalForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
@@ -9418,16 +9651,16 @@ func (m *MockBetaGlobalForwardingRules) Insert(ctx context.Context, key *meta.Ke
projectID := m.ProjectRouter.ProjectID(ctx, "beta", "forwardingRules")
obj.SelfLink = SelfLink(meta.VersionBeta, projectID, "forwardingRules", key)
- m.Objects[*key] = &MockGlobalForwardingRulesObj{obj}
- klog.V(5).Infof("MockBetaGlobalForwardingRules.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ m.Objects[*key] = &MockForwardingRulesObj{obj}
+ klog.V(5).Infof("MockBetaForwardingRules.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockBetaGlobalForwardingRules) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockBetaForwardingRules) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockBetaGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -9439,223 +9672,222 @@ func (m *MockBetaGlobalForwardingRules) Delete(ctx context.Context, key *meta.Ke
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockBetaGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockBetaGlobalForwardingRules %v not found", key),
+ Message: fmt.Sprintf("MockBetaForwardingRules %v not found", key),
}
- klog.V(5).Infof("MockBetaGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockBetaGlobalForwardingRules.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockBetaForwardingRules.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockBetaGlobalForwardingRules) Obj(o *beta.ForwardingRule) *MockGlobalForwardingRulesObj {
- return &MockGlobalForwardingRulesObj{o}
+func (m *MockBetaForwardingRules) Obj(o *beta.ForwardingRule) *MockForwardingRulesObj {
+ return &MockForwardingRulesObj{o}
}
// SetTarget is a mock for the corresponding method.
-func (m *MockBetaGlobalForwardingRules) SetTarget(ctx context.Context, key *meta.Key, arg0 *beta.TargetReference) error {
+func (m *MockBetaForwardingRules) SetTarget(ctx context.Context, key *meta.Key, arg0 *beta.TargetReference) error {
if m.SetTargetHook != nil {
return m.SetTargetHook(ctx, key, arg0, m)
}
return nil
}
-// GCEBetaGlobalForwardingRules is a simplifying adapter for the GCE GlobalForwardingRules.
-type GCEBetaGlobalForwardingRules struct {
+// GCEBetaForwardingRules is a simplifying adapter for the GCE ForwardingRules.
+type GCEBetaForwardingRules struct {
s *Service
}
// Get the ForwardingRule named by key.
-func (g *GCEBetaGlobalForwardingRules) Get(ctx context.Context, key *meta.Key) (*beta.ForwardingRule, error) {
- klog.V(5).Infof("GCEBetaGlobalForwardingRules.Get(%v, %v): called", ctx, key)
+func (g *GCEBetaForwardingRules) Get(ctx context.Context, key *meta.Key) (*beta.ForwardingRule, error) {
+ klog.V(5).Infof("GCEBetaForwardingRules.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaGlobalForwardingRules.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaForwardingRules.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "GlobalForwardingRules")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "ForwardingRules")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
Version: meta.Version("beta"),
- Service: "GlobalForwardingRules",
+ Service: "ForwardingRules",
}
- klog.V(5).Infof("GCEBetaGlobalForwardingRules.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaForwardingRules.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaGlobalForwardingRules.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaForwardingRules.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.Beta.GlobalForwardingRules.Get(projectID, key.Name)
+ call := g.s.Beta.ForwardingRules.Get(projectID, key.Region, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEBetaGlobalForwardingRules.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEBetaForwardingRules.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
// List all ForwardingRule objects.
-func (g *GCEBetaGlobalForwardingRules) List(ctx context.Context, fl *filter.F) ([]*beta.ForwardingRule, error) {
- klog.V(5).Infof("GCEBetaGlobalForwardingRules.List(%v, %v) called", ctx, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "GlobalForwardingRules")
+func (g *GCEBetaForwardingRules) List(ctx context.Context, region string, fl *filter.F) ([]*beta.ForwardingRule, error) {
+ klog.V(5).Infof("GCEBetaForwardingRules.List(%v, %v, %v) called", ctx, region, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "ForwardingRules")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
Version: meta.Version("beta"),
- Service: "GlobalForwardingRules",
+ Service: "ForwardingRules",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCEBetaGlobalForwardingRules.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
- call := g.s.Beta.GlobalForwardingRules.List(projectID)
+ klog.V(5).Infof("GCEBetaForwardingRules.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk)
+ call := g.s.Beta.ForwardingRules.List(projectID, region)
if fl != filter.None {
call.Filter(fl.String())
}
var all []*beta.ForwardingRule
f := func(l *beta.ForwardingRuleList) error {
- klog.V(5).Infof("GCEBetaGlobalForwardingRules.List(%v, ..., %v): page %+v", ctx, fl, l)
+ klog.V(5).Infof("GCEBetaForwardingRules.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEBetaGlobalForwardingRules.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEBetaForwardingRules.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEBetaGlobalForwardingRules.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEBetaForwardingRules.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEBetaGlobalForwardingRules.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEBetaForwardingRules.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
// Insert ForwardingRule with key of value obj.
-func (g *GCEBetaGlobalForwardingRules) Insert(ctx context.Context, key *meta.Key, obj *beta.ForwardingRule) error {
- klog.V(5).Infof("GCEBetaGlobalForwardingRules.Insert(%v, %v, %+v): called", ctx, key, obj)
+func (g *GCEBetaForwardingRules) Insert(ctx context.Context, key *meta.Key, obj *beta.ForwardingRule) error {
+ klog.V(5).Infof("GCEBetaForwardingRules.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaGlobalForwardingRules.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaForwardingRules.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "GlobalForwardingRules")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "ForwardingRules")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
Version: meta.Version("beta"),
- Service: "GlobalForwardingRules",
+ Service: "ForwardingRules",
}
- klog.V(5).Infof("GCEBetaGlobalForwardingRules.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaForwardingRules.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaGlobalForwardingRules.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaForwardingRules.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.Beta.GlobalForwardingRules.Insert(projectID, obj)
+ call := g.s.Beta.ForwardingRules.Insert(projectID, key.Region, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaGlobalForwardingRules.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaForwardingRules.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaGlobalForwardingRules.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCEBetaForwardingRules.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
// Delete the ForwardingRule referenced by key.
-func (g *GCEBetaGlobalForwardingRules) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEBetaGlobalForwardingRules.Delete(%v, %v): called", ctx, key)
+func (g *GCEBetaForwardingRules) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEBetaForwardingRules.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaGlobalForwardingRules.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaForwardingRules.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "GlobalForwardingRules")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "ForwardingRules")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
Version: meta.Version("beta"),
- Service: "GlobalForwardingRules",
+ Service: "ForwardingRules",
}
- klog.V(5).Infof("GCEBetaGlobalForwardingRules.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaForwardingRules.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaGlobalForwardingRules.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaForwardingRules.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Beta.GlobalForwardingRules.Delete(projectID, key.Name)
-
+ call := g.s.Beta.ForwardingRules.Delete(projectID, key.Region, key.Name)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// SetTarget is a method on GCEBetaGlobalForwardingRules.
-func (g *GCEBetaGlobalForwardingRules) SetTarget(ctx context.Context, key *meta.Key, arg0 *beta.TargetReference) error {
- klog.V(5).Infof("GCEBetaGlobalForwardingRules.SetTarget(%v, %v, ...): called", ctx, key)
+// SetTarget is a method on GCEBetaForwardingRules.
+func (g *GCEBetaForwardingRules) SetTarget(ctx context.Context, key *meta.Key, arg0 *beta.TargetReference) error {
+ klog.V(5).Infof("GCEBetaForwardingRules.SetTarget(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaGlobalForwardingRules.SetTarget(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaForwardingRules.SetTarget(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "GlobalForwardingRules")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "ForwardingRules")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "SetTarget",
Version: meta.Version("beta"),
- Service: "GlobalForwardingRules",
+ Service: "ForwardingRules",
}
- klog.V(5).Infof("GCEBetaGlobalForwardingRules.SetTarget(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaForwardingRules.SetTarget(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaGlobalForwardingRules.SetTarget(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaForwardingRules.SetTarget(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Beta.GlobalForwardingRules.SetTarget(projectID, key.Name, arg0)
+ call := g.s.Beta.ForwardingRules.SetTarget(projectID, key.Region, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaGlobalForwardingRules.SetTarget(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaForwardingRules.SetTarget(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaGlobalForwardingRules.SetTarget(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaForwardingRules.SetTarget(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// GlobalForwardingRules is an interface that allows for mocking of GlobalForwardingRules.
-type GlobalForwardingRules interface {
- Get(ctx context.Context, key *meta.Key) (*ga.ForwardingRule, error)
- List(ctx context.Context, fl *filter.F) ([]*ga.ForwardingRule, error)
- Insert(ctx context.Context, key *meta.Key, obj *ga.ForwardingRule) error
+// AlphaGlobalForwardingRules is an interface that allows for mocking of GlobalForwardingRules.
+type AlphaGlobalForwardingRules interface {
+ Get(ctx context.Context, key *meta.Key) (*alpha.ForwardingRule, error)
+ List(ctx context.Context, fl *filter.F) ([]*alpha.ForwardingRule, error)
+ Insert(ctx context.Context, key *meta.Key, obj *alpha.ForwardingRule) error
Delete(ctx context.Context, key *meta.Key) error
- SetTarget(context.Context, *meta.Key, *ga.TargetReference) error
+ SetTarget(context.Context, *meta.Key, *alpha.TargetReference) error
}
-// NewMockGlobalForwardingRules returns a new mock for GlobalForwardingRules.
-func NewMockGlobalForwardingRules(pr ProjectRouter, objs map[meta.Key]*MockGlobalForwardingRulesObj) *MockGlobalForwardingRules {
- mock := &MockGlobalForwardingRules{
+// NewMockAlphaGlobalForwardingRules returns a new mock for GlobalForwardingRules.
+func NewMockAlphaGlobalForwardingRules(pr ProjectRouter, objs map[meta.Key]*MockGlobalForwardingRulesObj) *MockAlphaGlobalForwardingRules {
+ mock := &MockAlphaGlobalForwardingRules{
ProjectRouter: pr,
Objects: objs,
@@ -9666,8 +9898,8 @@ func NewMockGlobalForwardingRules(pr ProjectRouter, objs map[meta.Key]*MockGloba
return mock
}
-// MockGlobalForwardingRules is the mock for GlobalForwardingRules.
-type MockGlobalForwardingRules struct {
+// MockAlphaGlobalForwardingRules is the mock for GlobalForwardingRules.
+type MockAlphaGlobalForwardingRules struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
@@ -9686,11 +9918,11 @@ type MockGlobalForwardingRules struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockGlobalForwardingRules) (bool, *ga.ForwardingRule, error)
- ListHook func(ctx context.Context, fl *filter.F, m *MockGlobalForwardingRules) (bool, []*ga.ForwardingRule, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *ga.ForwardingRule, m *MockGlobalForwardingRules) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockGlobalForwardingRules) (bool, error)
- SetTargetHook func(context.Context, *meta.Key, *ga.TargetReference, *MockGlobalForwardingRules) error
+ GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaGlobalForwardingRules) (bool, *alpha.ForwardingRule, error)
+ ListHook func(ctx context.Context, fl *filter.F, m *MockAlphaGlobalForwardingRules) (bool, []*alpha.ForwardingRule, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *alpha.ForwardingRule, m *MockAlphaGlobalForwardingRules) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaGlobalForwardingRules) (bool, error)
+ SetTargetHook func(context.Context, *meta.Key, *alpha.TargetReference, *MockAlphaGlobalForwardingRules) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -9698,10 +9930,10 @@ type MockGlobalForwardingRules struct {
}
// Get returns the object from the mock.
-func (m *MockGlobalForwardingRules) Get(ctx context.Context, key *meta.Key) (*ga.ForwardingRule, error) {
+func (m *MockAlphaGlobalForwardingRules) Get(ctx context.Context, key *meta.Key) (*alpha.ForwardingRule, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockGlobalForwardingRules.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaGlobalForwardingRules.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -9713,28 +9945,28 @@ func (m *MockGlobalForwardingRules) Get(ctx context.Context, key *meta.Key) (*ga
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockGlobalForwardingRules.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaGlobalForwardingRules.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
- typedObj := obj.ToGA()
- klog.V(5).Infof("MockGlobalForwardingRules.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ typedObj := obj.ToAlpha()
+ klog.V(5).Infof("MockAlphaGlobalForwardingRules.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockGlobalForwardingRules %v not found", key),
+ Message: fmt.Sprintf("MockAlphaGlobalForwardingRules %v not found", key),
}
- klog.V(5).Infof("MockGlobalForwardingRules.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaGlobalForwardingRules.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
// List all of the objects in the mock.
-func (m *MockGlobalForwardingRules) List(ctx context.Context, fl *filter.F) ([]*ga.ForwardingRule, error) {
+func (m *MockAlphaGlobalForwardingRules) List(ctx context.Context, fl *filter.F) ([]*alpha.ForwardingRule, error) {
if m.ListHook != nil {
if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
- klog.V(5).Infof("MockGlobalForwardingRules.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
+ klog.V(5).Infof("MockAlphaGlobalForwardingRules.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
return objs, err
}
}
@@ -9744,28 +9976,28 @@ func (m *MockGlobalForwardingRules) List(ctx context.Context, fl *filter.F) ([]*
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockGlobalForwardingRules.List(%v, %v) = nil, %v", ctx, fl, err)
+ klog.V(5).Infof("MockAlphaGlobalForwardingRules.List(%v, %v) = nil, %v", ctx, fl, err)
return nil, *m.ListError
}
- var objs []*ga.ForwardingRule
+ var objs []*alpha.ForwardingRule
for _, obj := range m.Objects {
- if !fl.Match(obj.ToGA()) {
+ if !fl.Match(obj.ToAlpha()) {
continue
}
- objs = append(objs, obj.ToGA())
+ objs = append(objs, obj.ToAlpha())
}
- klog.V(5).Infof("MockGlobalForwardingRules.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
+ klog.V(5).Infof("MockAlphaGlobalForwardingRules.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockGlobalForwardingRules) Insert(ctx context.Context, key *meta.Key, obj *ga.ForwardingRule) error {
+func (m *MockAlphaGlobalForwardingRules) Insert(ctx context.Context, key *meta.Key, obj *alpha.ForwardingRule) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockGlobalForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaGlobalForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -9777,32 +10009,32 @@ func (m *MockGlobalForwardingRules) Insert(ctx context.Context, key *meta.Key, o
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockGlobalForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaGlobalForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockGlobalForwardingRules %v exists", key),
+ Message: fmt.Sprintf("MockAlphaGlobalForwardingRules %v exists", key),
}
- klog.V(5).Infof("MockGlobalForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaGlobalForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "ga", "forwardingRules")
- obj.SelfLink = SelfLink(meta.VersionGA, projectID, "forwardingRules", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "forwardingRules")
+ obj.SelfLink = SelfLink(meta.VersionAlpha, projectID, "forwardingRules", key)
m.Objects[*key] = &MockGlobalForwardingRulesObj{obj}
- klog.V(5).Infof("MockGlobalForwardingRules.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ klog.V(5).Infof("MockAlphaGlobalForwardingRules.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockGlobalForwardingRules) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockAlphaGlobalForwardingRules) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -9814,223 +10046,223 @@ func (m *MockGlobalForwardingRules) Delete(ctx context.Context, key *meta.Key) e
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockGlobalForwardingRules %v not found", key),
+ Message: fmt.Sprintf("MockAlphaGlobalForwardingRules %v not found", key),
}
- klog.V(5).Infof("MockGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockGlobalForwardingRules.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockAlphaGlobalForwardingRules.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockGlobalForwardingRules) Obj(o *ga.ForwardingRule) *MockGlobalForwardingRulesObj {
+func (m *MockAlphaGlobalForwardingRules) Obj(o *alpha.ForwardingRule) *MockGlobalForwardingRulesObj {
return &MockGlobalForwardingRulesObj{o}
}
// SetTarget is a mock for the corresponding method.
-func (m *MockGlobalForwardingRules) SetTarget(ctx context.Context, key *meta.Key, arg0 *ga.TargetReference) error {
+func (m *MockAlphaGlobalForwardingRules) SetTarget(ctx context.Context, key *meta.Key, arg0 *alpha.TargetReference) error {
if m.SetTargetHook != nil {
return m.SetTargetHook(ctx, key, arg0, m)
}
return nil
}
-// GCEGlobalForwardingRules is a simplifying adapter for the GCE GlobalForwardingRules.
-type GCEGlobalForwardingRules struct {
+// GCEAlphaGlobalForwardingRules is a simplifying adapter for the GCE GlobalForwardingRules.
+type GCEAlphaGlobalForwardingRules struct {
s *Service
}
// Get the ForwardingRule named by key.
-func (g *GCEGlobalForwardingRules) Get(ctx context.Context, key *meta.Key) (*ga.ForwardingRule, error) {
- klog.V(5).Infof("GCEGlobalForwardingRules.Get(%v, %v): called", ctx, key)
+func (g *GCEAlphaGlobalForwardingRules) Get(ctx context.Context, key *meta.Key) (*alpha.ForwardingRule, error) {
+ klog.V(5).Infof("GCEAlphaGlobalForwardingRules.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEGlobalForwardingRules.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaGlobalForwardingRules.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "GlobalForwardingRules")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "GlobalForwardingRules")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
- Version: meta.Version("ga"),
+ Version: meta.Version("alpha"),
Service: "GlobalForwardingRules",
}
- klog.V(5).Infof("GCEGlobalForwardingRules.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaGlobalForwardingRules.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEGlobalForwardingRules.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaGlobalForwardingRules.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.GA.GlobalForwardingRules.Get(projectID, key.Name)
+ call := g.s.Alpha.GlobalForwardingRules.Get(projectID, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEGlobalForwardingRules.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEAlphaGlobalForwardingRules.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
// List all ForwardingRule objects.
-func (g *GCEGlobalForwardingRules) List(ctx context.Context, fl *filter.F) ([]*ga.ForwardingRule, error) {
- klog.V(5).Infof("GCEGlobalForwardingRules.List(%v, %v) called", ctx, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "GlobalForwardingRules")
+func (g *GCEAlphaGlobalForwardingRules) List(ctx context.Context, fl *filter.F) ([]*alpha.ForwardingRule, error) {
+ klog.V(5).Infof("GCEAlphaGlobalForwardingRules.List(%v, %v) called", ctx, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "GlobalForwardingRules")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
- Version: meta.Version("ga"),
+ Version: meta.Version("alpha"),
Service: "GlobalForwardingRules",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCEGlobalForwardingRules.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
- call := g.s.GA.GlobalForwardingRules.List(projectID)
+ klog.V(5).Infof("GCEAlphaGlobalForwardingRules.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
+ call := g.s.Alpha.GlobalForwardingRules.List(projectID)
if fl != filter.None {
call.Filter(fl.String())
}
- var all []*ga.ForwardingRule
- f := func(l *ga.ForwardingRuleList) error {
- klog.V(5).Infof("GCEGlobalForwardingRules.List(%v, ..., %v): page %+v", ctx, fl, l)
+ var all []*alpha.ForwardingRule
+ f := func(l *alpha.ForwardingRuleList) error {
+ klog.V(5).Infof("GCEAlphaGlobalForwardingRules.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEGlobalForwardingRules.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEAlphaGlobalForwardingRules.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEGlobalForwardingRules.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEAlphaGlobalForwardingRules.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEGlobalForwardingRules.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEAlphaGlobalForwardingRules.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
// Insert ForwardingRule with key of value obj.
-func (g *GCEGlobalForwardingRules) Insert(ctx context.Context, key *meta.Key, obj *ga.ForwardingRule) error {
- klog.V(5).Infof("GCEGlobalForwardingRules.Insert(%v, %v, %+v): called", ctx, key, obj)
+func (g *GCEAlphaGlobalForwardingRules) Insert(ctx context.Context, key *meta.Key, obj *alpha.ForwardingRule) error {
+ klog.V(5).Infof("GCEAlphaGlobalForwardingRules.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEGlobalForwardingRules.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaGlobalForwardingRules.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "GlobalForwardingRules")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "GlobalForwardingRules")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
- Version: meta.Version("ga"),
+ Version: meta.Version("alpha"),
Service: "GlobalForwardingRules",
}
- klog.V(5).Infof("GCEGlobalForwardingRules.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaGlobalForwardingRules.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEGlobalForwardingRules.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaGlobalForwardingRules.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.GA.GlobalForwardingRules.Insert(projectID, obj)
+ call := g.s.Alpha.GlobalForwardingRules.Insert(projectID, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEGlobalForwardingRules.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaGlobalForwardingRules.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEGlobalForwardingRules.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCEAlphaGlobalForwardingRules.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
// Delete the ForwardingRule referenced by key.
-func (g *GCEGlobalForwardingRules) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEGlobalForwardingRules.Delete(%v, %v): called", ctx, key)
+func (g *GCEAlphaGlobalForwardingRules) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEAlphaGlobalForwardingRules.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEGlobalForwardingRules.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaGlobalForwardingRules.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "GlobalForwardingRules")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "GlobalForwardingRules")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
- Version: meta.Version("ga"),
+ Version: meta.Version("alpha"),
Service: "GlobalForwardingRules",
}
- klog.V(5).Infof("GCEGlobalForwardingRules.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaGlobalForwardingRules.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEGlobalForwardingRules.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaGlobalForwardingRules.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.GA.GlobalForwardingRules.Delete(projectID, key.Name)
+ call := g.s.Alpha.GlobalForwardingRules.Delete(projectID, key.Name)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// SetTarget is a method on GCEGlobalForwardingRules.
-func (g *GCEGlobalForwardingRules) SetTarget(ctx context.Context, key *meta.Key, arg0 *ga.TargetReference) error {
- klog.V(5).Infof("GCEGlobalForwardingRules.SetTarget(%v, %v, ...): called", ctx, key)
+// SetTarget is a method on GCEAlphaGlobalForwardingRules.
+func (g *GCEAlphaGlobalForwardingRules) SetTarget(ctx context.Context, key *meta.Key, arg0 *alpha.TargetReference) error {
+ klog.V(5).Infof("GCEAlphaGlobalForwardingRules.SetTarget(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEGlobalForwardingRules.SetTarget(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaGlobalForwardingRules.SetTarget(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "GlobalForwardingRules")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "GlobalForwardingRules")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "SetTarget",
- Version: meta.Version("ga"),
+ Version: meta.Version("alpha"),
Service: "GlobalForwardingRules",
}
- klog.V(5).Infof("GCEGlobalForwardingRules.SetTarget(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaGlobalForwardingRules.SetTarget(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEGlobalForwardingRules.SetTarget(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaGlobalForwardingRules.SetTarget(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.GA.GlobalForwardingRules.SetTarget(projectID, key.Name, arg0)
+ call := g.s.Alpha.GlobalForwardingRules.SetTarget(projectID, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEGlobalForwardingRules.SetTarget(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaGlobalForwardingRules.SetTarget(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEGlobalForwardingRules.SetTarget(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaGlobalForwardingRules.SetTarget(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// HealthChecks is an interface that allows for mocking of HealthChecks.
-type HealthChecks interface {
- Get(ctx context.Context, key *meta.Key) (*ga.HealthCheck, error)
- List(ctx context.Context, fl *filter.F) ([]*ga.HealthCheck, error)
- Insert(ctx context.Context, key *meta.Key, obj *ga.HealthCheck) error
+// BetaGlobalForwardingRules is an interface that allows for mocking of GlobalForwardingRules.
+type BetaGlobalForwardingRules interface {
+ Get(ctx context.Context, key *meta.Key) (*beta.ForwardingRule, error)
+ List(ctx context.Context, fl *filter.F) ([]*beta.ForwardingRule, error)
+ Insert(ctx context.Context, key *meta.Key, obj *beta.ForwardingRule) error
Delete(ctx context.Context, key *meta.Key) error
- Update(context.Context, *meta.Key, *ga.HealthCheck) error
+ SetTarget(context.Context, *meta.Key, *beta.TargetReference) error
}
-// NewMockHealthChecks returns a new mock for HealthChecks.
-func NewMockHealthChecks(pr ProjectRouter, objs map[meta.Key]*MockHealthChecksObj) *MockHealthChecks {
- mock := &MockHealthChecks{
+// NewMockBetaGlobalForwardingRules returns a new mock for GlobalForwardingRules.
+func NewMockBetaGlobalForwardingRules(pr ProjectRouter, objs map[meta.Key]*MockGlobalForwardingRulesObj) *MockBetaGlobalForwardingRules {
+ mock := &MockBetaGlobalForwardingRules{
ProjectRouter: pr,
Objects: objs,
@@ -10041,14 +10273,14 @@ func NewMockHealthChecks(pr ProjectRouter, objs map[meta.Key]*MockHealthChecksOb
return mock
}
-// MockHealthChecks is the mock for HealthChecks.
-type MockHealthChecks struct {
+// MockBetaGlobalForwardingRules is the mock for GlobalForwardingRules.
+type MockBetaGlobalForwardingRules struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
// Objects maintained by the mock.
- Objects map[meta.Key]*MockHealthChecksObj
+ Objects map[meta.Key]*MockGlobalForwardingRulesObj
// If an entry exists for the given key and operation, then the error
// will be returned instead of the operation.
@@ -10061,11 +10293,11 @@ type MockHealthChecks struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockHealthChecks) (bool, *ga.HealthCheck, error)
- ListHook func(ctx context.Context, fl *filter.F, m *MockHealthChecks) (bool, []*ga.HealthCheck, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *ga.HealthCheck, m *MockHealthChecks) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockHealthChecks) (bool, error)
- UpdateHook func(context.Context, *meta.Key, *ga.HealthCheck, *MockHealthChecks) error
+ GetHook func(ctx context.Context, key *meta.Key, m *MockBetaGlobalForwardingRules) (bool, *beta.ForwardingRule, error)
+ ListHook func(ctx context.Context, fl *filter.F, m *MockBetaGlobalForwardingRules) (bool, []*beta.ForwardingRule, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *beta.ForwardingRule, m *MockBetaGlobalForwardingRules) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaGlobalForwardingRules) (bool, error)
+ SetTargetHook func(context.Context, *meta.Key, *beta.TargetReference, *MockBetaGlobalForwardingRules) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -10073,10 +10305,10 @@ type MockHealthChecks struct {
}
// Get returns the object from the mock.
-func (m *MockHealthChecks) Get(ctx context.Context, key *meta.Key) (*ga.HealthCheck, error) {
+func (m *MockBetaGlobalForwardingRules) Get(ctx context.Context, key *meta.Key) (*beta.ForwardingRule, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockHealthChecks.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaGlobalForwardingRules.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -10088,28 +10320,28 @@ func (m *MockHealthChecks) Get(ctx context.Context, key *meta.Key) (*ga.HealthCh
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaGlobalForwardingRules.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
- typedObj := obj.ToGA()
- klog.V(5).Infof("MockHealthChecks.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ typedObj := obj.ToBeta()
+ klog.V(5).Infof("MockBetaGlobalForwardingRules.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockHealthChecks %v not found", key),
+ Message: fmt.Sprintf("MockBetaGlobalForwardingRules %v not found", key),
}
- klog.V(5).Infof("MockHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaGlobalForwardingRules.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
// List all of the objects in the mock.
-func (m *MockHealthChecks) List(ctx context.Context, fl *filter.F) ([]*ga.HealthCheck, error) {
+func (m *MockBetaGlobalForwardingRules) List(ctx context.Context, fl *filter.F) ([]*beta.ForwardingRule, error) {
if m.ListHook != nil {
if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
- klog.V(5).Infof("MockHealthChecks.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
+ klog.V(5).Infof("MockBetaGlobalForwardingRules.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
return objs, err
}
}
@@ -10119,28 +10351,28 @@ func (m *MockHealthChecks) List(ctx context.Context, fl *filter.F) ([]*ga.Health
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockHealthChecks.List(%v, %v) = nil, %v", ctx, fl, err)
+ klog.V(5).Infof("MockBetaGlobalForwardingRules.List(%v, %v) = nil, %v", ctx, fl, err)
return nil, *m.ListError
}
- var objs []*ga.HealthCheck
+ var objs []*beta.ForwardingRule
for _, obj := range m.Objects {
- if !fl.Match(obj.ToGA()) {
+ if !fl.Match(obj.ToBeta()) {
continue
}
- objs = append(objs, obj.ToGA())
+ objs = append(objs, obj.ToBeta())
}
- klog.V(5).Infof("MockHealthChecks.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
+ klog.V(5).Infof("MockBetaGlobalForwardingRules.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *ga.HealthCheck) error {
+func (m *MockBetaGlobalForwardingRules) Insert(ctx context.Context, key *meta.Key, obj *beta.ForwardingRule) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaGlobalForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -10152,32 +10384,32 @@ func (m *MockHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *ga.He
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaGlobalForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockHealthChecks %v exists", key),
+ Message: fmt.Sprintf("MockBetaGlobalForwardingRules %v exists", key),
}
- klog.V(5).Infof("MockHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaGlobalForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "ga", "healthChecks")
- obj.SelfLink = SelfLink(meta.VersionGA, projectID, "healthChecks", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "beta", "forwardingRules")
+ obj.SelfLink = SelfLink(meta.VersionBeta, projectID, "forwardingRules", key)
- m.Objects[*key] = &MockHealthChecksObj{obj}
- klog.V(5).Infof("MockHealthChecks.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ m.Objects[*key] = &MockGlobalForwardingRulesObj{obj}
+ klog.V(5).Infof("MockBetaGlobalForwardingRules.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockHealthChecks) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockBetaGlobalForwardingRules) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -10189,223 +10421,223 @@ func (m *MockHealthChecks) Delete(ctx context.Context, key *meta.Key) error {
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockHealthChecks %v not found", key),
+ Message: fmt.Sprintf("MockBetaGlobalForwardingRules %v not found", key),
}
- klog.V(5).Infof("MockHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockHealthChecks.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockBetaGlobalForwardingRules.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockHealthChecks) Obj(o *ga.HealthCheck) *MockHealthChecksObj {
- return &MockHealthChecksObj{o}
+func (m *MockBetaGlobalForwardingRules) Obj(o *beta.ForwardingRule) *MockGlobalForwardingRulesObj {
+ return &MockGlobalForwardingRulesObj{o}
}
-// Update is a mock for the corresponding method.
-func (m *MockHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *ga.HealthCheck) error {
- if m.UpdateHook != nil {
- return m.UpdateHook(ctx, key, arg0, m)
+// SetTarget is a mock for the corresponding method.
+func (m *MockBetaGlobalForwardingRules) SetTarget(ctx context.Context, key *meta.Key, arg0 *beta.TargetReference) error {
+ if m.SetTargetHook != nil {
+ return m.SetTargetHook(ctx, key, arg0, m)
}
return nil
}
-// GCEHealthChecks is a simplifying adapter for the GCE HealthChecks.
-type GCEHealthChecks struct {
+// GCEBetaGlobalForwardingRules is a simplifying adapter for the GCE GlobalForwardingRules.
+type GCEBetaGlobalForwardingRules struct {
s *Service
}
-// Get the HealthCheck named by key.
-func (g *GCEHealthChecks) Get(ctx context.Context, key *meta.Key) (*ga.HealthCheck, error) {
- klog.V(5).Infof("GCEHealthChecks.Get(%v, %v): called", ctx, key)
+// Get the ForwardingRule named by key.
+func (g *GCEBetaGlobalForwardingRules) Get(ctx context.Context, key *meta.Key) (*beta.ForwardingRule, error) {
+ klog.V(5).Infof("GCEBetaGlobalForwardingRules.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEHealthChecks.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaGlobalForwardingRules.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "HealthChecks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "GlobalForwardingRules")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
- Version: meta.Version("ga"),
- Service: "HealthChecks",
+ Version: meta.Version("beta"),
+ Service: "GlobalForwardingRules",
}
- klog.V(5).Infof("GCEHealthChecks.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaGlobalForwardingRules.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEHealthChecks.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaGlobalForwardingRules.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.GA.HealthChecks.Get(projectID, key.Name)
+ call := g.s.Beta.GlobalForwardingRules.Get(projectID, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEHealthChecks.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEBetaGlobalForwardingRules.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
-// List all HealthCheck objects.
-func (g *GCEHealthChecks) List(ctx context.Context, fl *filter.F) ([]*ga.HealthCheck, error) {
- klog.V(5).Infof("GCEHealthChecks.List(%v, %v) called", ctx, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "HealthChecks")
+// List all ForwardingRule objects.
+func (g *GCEBetaGlobalForwardingRules) List(ctx context.Context, fl *filter.F) ([]*beta.ForwardingRule, error) {
+ klog.V(5).Infof("GCEBetaGlobalForwardingRules.List(%v, %v) called", ctx, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "GlobalForwardingRules")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
- Version: meta.Version("ga"),
- Service: "HealthChecks",
+ Version: meta.Version("beta"),
+ Service: "GlobalForwardingRules",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCEHealthChecks.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
- call := g.s.GA.HealthChecks.List(projectID)
+ klog.V(5).Infof("GCEBetaGlobalForwardingRules.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
+ call := g.s.Beta.GlobalForwardingRules.List(projectID)
if fl != filter.None {
call.Filter(fl.String())
}
- var all []*ga.HealthCheck
- f := func(l *ga.HealthCheckList) error {
- klog.V(5).Infof("GCEHealthChecks.List(%v, ..., %v): page %+v", ctx, fl, l)
+ var all []*beta.ForwardingRule
+ f := func(l *beta.ForwardingRuleList) error {
+ klog.V(5).Infof("GCEBetaGlobalForwardingRules.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEBetaGlobalForwardingRules.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEHealthChecks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEBetaGlobalForwardingRules.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEBetaGlobalForwardingRules.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
-// Insert HealthCheck with key of value obj.
-func (g *GCEHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *ga.HealthCheck) error {
- klog.V(5).Infof("GCEHealthChecks.Insert(%v, %v, %+v): called", ctx, key, obj)
+// Insert ForwardingRule with key of value obj.
+func (g *GCEBetaGlobalForwardingRules) Insert(ctx context.Context, key *meta.Key, obj *beta.ForwardingRule) error {
+ klog.V(5).Infof("GCEBetaGlobalForwardingRules.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEHealthChecks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaGlobalForwardingRules.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "HealthChecks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "GlobalForwardingRules")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
- Version: meta.Version("ga"),
- Service: "HealthChecks",
+ Version: meta.Version("beta"),
+ Service: "GlobalForwardingRules",
}
- klog.V(5).Infof("GCEHealthChecks.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaGlobalForwardingRules.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEHealthChecks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaGlobalForwardingRules.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.GA.HealthChecks.Insert(projectID, obj)
+ call := g.s.Beta.GlobalForwardingRules.Insert(projectID, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEHealthChecks.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaGlobalForwardingRules.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEHealthChecks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCEBetaGlobalForwardingRules.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
-// Delete the HealthCheck referenced by key.
-func (g *GCEHealthChecks) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEHealthChecks.Delete(%v, %v): called", ctx, key)
+// Delete the ForwardingRule referenced by key.
+func (g *GCEBetaGlobalForwardingRules) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEBetaGlobalForwardingRules.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEHealthChecks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaGlobalForwardingRules.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "HealthChecks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "GlobalForwardingRules")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
- Version: meta.Version("ga"),
- Service: "HealthChecks",
+ Version: meta.Version("beta"),
+ Service: "GlobalForwardingRules",
}
- klog.V(5).Infof("GCEHealthChecks.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaGlobalForwardingRules.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEHealthChecks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaGlobalForwardingRules.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.GA.HealthChecks.Delete(projectID, key.Name)
+ call := g.s.Beta.GlobalForwardingRules.Delete(projectID, key.Name)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// Update is a method on GCEHealthChecks.
-func (g *GCEHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *ga.HealthCheck) error {
- klog.V(5).Infof("GCEHealthChecks.Update(%v, %v, ...): called", ctx, key)
+// SetTarget is a method on GCEBetaGlobalForwardingRules.
+func (g *GCEBetaGlobalForwardingRules) SetTarget(ctx context.Context, key *meta.Key, arg0 *beta.TargetReference) error {
+ klog.V(5).Infof("GCEBetaGlobalForwardingRules.SetTarget(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEHealthChecks.Update(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaGlobalForwardingRules.SetTarget(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "HealthChecks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "GlobalForwardingRules")
rk := &RateLimitKey{
ProjectID: projectID,
- Operation: "Update",
- Version: meta.Version("ga"),
- Service: "HealthChecks",
+ Operation: "SetTarget",
+ Version: meta.Version("beta"),
+ Service: "GlobalForwardingRules",
}
- klog.V(5).Infof("GCEHealthChecks.Update(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaGlobalForwardingRules.SetTarget(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEHealthChecks.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaGlobalForwardingRules.SetTarget(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.GA.HealthChecks.Update(projectID, key.Name, arg0)
+ call := g.s.Beta.GlobalForwardingRules.SetTarget(projectID, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaGlobalForwardingRules.SetTarget(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaGlobalForwardingRules.SetTarget(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// AlphaHealthChecks is an interface that allows for mocking of HealthChecks.
-type AlphaHealthChecks interface {
- Get(ctx context.Context, key *meta.Key) (*alpha.HealthCheck, error)
- List(ctx context.Context, fl *filter.F) ([]*alpha.HealthCheck, error)
- Insert(ctx context.Context, key *meta.Key, obj *alpha.HealthCheck) error
+// GlobalForwardingRules is an interface that allows for mocking of GlobalForwardingRules.
+type GlobalForwardingRules interface {
+ Get(ctx context.Context, key *meta.Key) (*ga.ForwardingRule, error)
+ List(ctx context.Context, fl *filter.F) ([]*ga.ForwardingRule, error)
+ Insert(ctx context.Context, key *meta.Key, obj *ga.ForwardingRule) error
Delete(ctx context.Context, key *meta.Key) error
- Update(context.Context, *meta.Key, *alpha.HealthCheck) error
+ SetTarget(context.Context, *meta.Key, *ga.TargetReference) error
}
-// NewMockAlphaHealthChecks returns a new mock for HealthChecks.
-func NewMockAlphaHealthChecks(pr ProjectRouter, objs map[meta.Key]*MockHealthChecksObj) *MockAlphaHealthChecks {
- mock := &MockAlphaHealthChecks{
+// NewMockGlobalForwardingRules returns a new mock for GlobalForwardingRules.
+func NewMockGlobalForwardingRules(pr ProjectRouter, objs map[meta.Key]*MockGlobalForwardingRulesObj) *MockGlobalForwardingRules {
+ mock := &MockGlobalForwardingRules{
ProjectRouter: pr,
Objects: objs,
@@ -10416,14 +10648,14 @@ func NewMockAlphaHealthChecks(pr ProjectRouter, objs map[meta.Key]*MockHealthChe
return mock
}
-// MockAlphaHealthChecks is the mock for HealthChecks.
-type MockAlphaHealthChecks struct {
+// MockGlobalForwardingRules is the mock for GlobalForwardingRules.
+type MockGlobalForwardingRules struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
// Objects maintained by the mock.
- Objects map[meta.Key]*MockHealthChecksObj
+ Objects map[meta.Key]*MockGlobalForwardingRulesObj
// If an entry exists for the given key and operation, then the error
// will be returned instead of the operation.
@@ -10436,11 +10668,11 @@ type MockAlphaHealthChecks struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaHealthChecks) (bool, *alpha.HealthCheck, error)
- ListHook func(ctx context.Context, fl *filter.F, m *MockAlphaHealthChecks) (bool, []*alpha.HealthCheck, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *alpha.HealthCheck, m *MockAlphaHealthChecks) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaHealthChecks) (bool, error)
- UpdateHook func(context.Context, *meta.Key, *alpha.HealthCheck, *MockAlphaHealthChecks) error
+ GetHook func(ctx context.Context, key *meta.Key, m *MockGlobalForwardingRules) (bool, *ga.ForwardingRule, error)
+ ListHook func(ctx context.Context, fl *filter.F, m *MockGlobalForwardingRules) (bool, []*ga.ForwardingRule, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *ga.ForwardingRule, m *MockGlobalForwardingRules) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockGlobalForwardingRules) (bool, error)
+ SetTargetHook func(context.Context, *meta.Key, *ga.TargetReference, *MockGlobalForwardingRules) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -10448,10 +10680,10 @@ type MockAlphaHealthChecks struct {
}
// Get returns the object from the mock.
-func (m *MockAlphaHealthChecks) Get(ctx context.Context, key *meta.Key) (*alpha.HealthCheck, error) {
+func (m *MockGlobalForwardingRules) Get(ctx context.Context, key *meta.Key) (*ga.ForwardingRule, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockAlphaHealthChecks.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockGlobalForwardingRules.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -10463,28 +10695,28 @@ func (m *MockAlphaHealthChecks) Get(ctx context.Context, key *meta.Key) (*alpha.
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockAlphaHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockGlobalForwardingRules.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
- typedObj := obj.ToAlpha()
- klog.V(5).Infof("MockAlphaHealthChecks.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ typedObj := obj.ToGA()
+ klog.V(5).Infof("MockGlobalForwardingRules.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockAlphaHealthChecks %v not found", key),
+ Message: fmt.Sprintf("MockGlobalForwardingRules %v not found", key),
}
- klog.V(5).Infof("MockAlphaHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockGlobalForwardingRules.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
// List all of the objects in the mock.
-func (m *MockAlphaHealthChecks) List(ctx context.Context, fl *filter.F) ([]*alpha.HealthCheck, error) {
+func (m *MockGlobalForwardingRules) List(ctx context.Context, fl *filter.F) ([]*ga.ForwardingRule, error) {
if m.ListHook != nil {
if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
- klog.V(5).Infof("MockAlphaHealthChecks.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
+ klog.V(5).Infof("MockGlobalForwardingRules.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
return objs, err
}
}
@@ -10494,28 +10726,28 @@ func (m *MockAlphaHealthChecks) List(ctx context.Context, fl *filter.F) ([]*alph
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockAlphaHealthChecks.List(%v, %v) = nil, %v", ctx, fl, err)
+ klog.V(5).Infof("MockGlobalForwardingRules.List(%v, %v) = nil, %v", ctx, fl, err)
return nil, *m.ListError
}
- var objs []*alpha.HealthCheck
+ var objs []*ga.ForwardingRule
for _, obj := range m.Objects {
- if !fl.Match(obj.ToAlpha()) {
+ if !fl.Match(obj.ToGA()) {
continue
}
- objs = append(objs, obj.ToAlpha())
+ objs = append(objs, obj.ToGA())
}
- klog.V(5).Infof("MockAlphaHealthChecks.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
+ klog.V(5).Infof("MockGlobalForwardingRules.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockAlphaHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *alpha.HealthCheck) error {
+func (m *MockGlobalForwardingRules) Insert(ctx context.Context, key *meta.Key, obj *ga.ForwardingRule) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockAlphaHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockGlobalForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -10527,32 +10759,32 @@ func (m *MockAlphaHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockAlphaHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockGlobalForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockAlphaHealthChecks %v exists", key),
+ Message: fmt.Sprintf("MockGlobalForwardingRules %v exists", key),
}
- klog.V(5).Infof("MockAlphaHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockGlobalForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "healthChecks")
- obj.SelfLink = SelfLink(meta.VersionAlpha, projectID, "healthChecks", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "ga", "forwardingRules")
+ obj.SelfLink = SelfLink(meta.VersionGA, projectID, "forwardingRules", key)
- m.Objects[*key] = &MockHealthChecksObj{obj}
- klog.V(5).Infof("MockAlphaHealthChecks.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ m.Objects[*key] = &MockGlobalForwardingRulesObj{obj}
+ klog.V(5).Infof("MockGlobalForwardingRules.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockAlphaHealthChecks) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockGlobalForwardingRules) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockAlphaHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -10564,223 +10796,223 @@ func (m *MockAlphaHealthChecks) Delete(ctx context.Context, key *meta.Key) error
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockAlphaHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockAlphaHealthChecks %v not found", key),
+ Message: fmt.Sprintf("MockGlobalForwardingRules %v not found", key),
}
- klog.V(5).Infof("MockAlphaHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockAlphaHealthChecks.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockGlobalForwardingRules.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockAlphaHealthChecks) Obj(o *alpha.HealthCheck) *MockHealthChecksObj {
- return &MockHealthChecksObj{o}
+func (m *MockGlobalForwardingRules) Obj(o *ga.ForwardingRule) *MockGlobalForwardingRulesObj {
+ return &MockGlobalForwardingRulesObj{o}
}
-// Update is a mock for the corresponding method.
-func (m *MockAlphaHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *alpha.HealthCheck) error {
- if m.UpdateHook != nil {
- return m.UpdateHook(ctx, key, arg0, m)
+// SetTarget is a mock for the corresponding method.
+func (m *MockGlobalForwardingRules) SetTarget(ctx context.Context, key *meta.Key, arg0 *ga.TargetReference) error {
+ if m.SetTargetHook != nil {
+ return m.SetTargetHook(ctx, key, arg0, m)
}
return nil
}
-// GCEAlphaHealthChecks is a simplifying adapter for the GCE HealthChecks.
-type GCEAlphaHealthChecks struct {
+// GCEGlobalForwardingRules is a simplifying adapter for the GCE GlobalForwardingRules.
+type GCEGlobalForwardingRules struct {
s *Service
}
-// Get the HealthCheck named by key.
-func (g *GCEAlphaHealthChecks) Get(ctx context.Context, key *meta.Key) (*alpha.HealthCheck, error) {
- klog.V(5).Infof("GCEAlphaHealthChecks.Get(%v, %v): called", ctx, key)
+// Get the ForwardingRule named by key.
+func (g *GCEGlobalForwardingRules) Get(ctx context.Context, key *meta.Key) (*ga.ForwardingRule, error) {
+ klog.V(5).Infof("GCEGlobalForwardingRules.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaHealthChecks.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEGlobalForwardingRules.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "HealthChecks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "GlobalForwardingRules")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
- Version: meta.Version("alpha"),
- Service: "HealthChecks",
+ Version: meta.Version("ga"),
+ Service: "GlobalForwardingRules",
}
- klog.V(5).Infof("GCEAlphaHealthChecks.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEGlobalForwardingRules.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaHealthChecks.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEGlobalForwardingRules.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.Alpha.HealthChecks.Get(projectID, key.Name)
+ call := g.s.GA.GlobalForwardingRules.Get(projectID, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEAlphaHealthChecks.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEGlobalForwardingRules.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
-// List all HealthCheck objects.
-func (g *GCEAlphaHealthChecks) List(ctx context.Context, fl *filter.F) ([]*alpha.HealthCheck, error) {
- klog.V(5).Infof("GCEAlphaHealthChecks.List(%v, %v) called", ctx, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "HealthChecks")
+// List all ForwardingRule objects.
+func (g *GCEGlobalForwardingRules) List(ctx context.Context, fl *filter.F) ([]*ga.ForwardingRule, error) {
+ klog.V(5).Infof("GCEGlobalForwardingRules.List(%v, %v) called", ctx, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "GlobalForwardingRules")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
- Version: meta.Version("alpha"),
- Service: "HealthChecks",
+ Version: meta.Version("ga"),
+ Service: "GlobalForwardingRules",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCEAlphaHealthChecks.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
- call := g.s.Alpha.HealthChecks.List(projectID)
+ klog.V(5).Infof("GCEGlobalForwardingRules.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
+ call := g.s.GA.GlobalForwardingRules.List(projectID)
if fl != filter.None {
call.Filter(fl.String())
}
- var all []*alpha.HealthCheck
- f := func(l *alpha.HealthCheckList) error {
- klog.V(5).Infof("GCEAlphaHealthChecks.List(%v, ..., %v): page %+v", ctx, fl, l)
+ var all []*ga.ForwardingRule
+ f := func(l *ga.ForwardingRuleList) error {
+ klog.V(5).Infof("GCEGlobalForwardingRules.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEAlphaHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEGlobalForwardingRules.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEAlphaHealthChecks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEGlobalForwardingRules.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEAlphaHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEGlobalForwardingRules.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
-// Insert HealthCheck with key of value obj.
-func (g *GCEAlphaHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *alpha.HealthCheck) error {
- klog.V(5).Infof("GCEAlphaHealthChecks.Insert(%v, %v, %+v): called", ctx, key, obj)
+// Insert ForwardingRule with key of value obj.
+func (g *GCEGlobalForwardingRules) Insert(ctx context.Context, key *meta.Key, obj *ga.ForwardingRule) error {
+ klog.V(5).Infof("GCEGlobalForwardingRules.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaHealthChecks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEGlobalForwardingRules.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "HealthChecks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "GlobalForwardingRules")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
- Version: meta.Version("alpha"),
- Service: "HealthChecks",
+ Version: meta.Version("ga"),
+ Service: "GlobalForwardingRules",
}
- klog.V(5).Infof("GCEAlphaHealthChecks.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEGlobalForwardingRules.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaHealthChecks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEGlobalForwardingRules.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.Alpha.HealthChecks.Insert(projectID, obj)
+ call := g.s.GA.GlobalForwardingRules.Insert(projectID, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaHealthChecks.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEGlobalForwardingRules.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaHealthChecks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCEGlobalForwardingRules.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
-// Delete the HealthCheck referenced by key.
-func (g *GCEAlphaHealthChecks) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEAlphaHealthChecks.Delete(%v, %v): called", ctx, key)
+// Delete the ForwardingRule referenced by key.
+func (g *GCEGlobalForwardingRules) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEGlobalForwardingRules.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaHealthChecks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEGlobalForwardingRules.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "HealthChecks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "GlobalForwardingRules")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
- Version: meta.Version("alpha"),
- Service: "HealthChecks",
+ Version: meta.Version("ga"),
+ Service: "GlobalForwardingRules",
}
- klog.V(5).Infof("GCEAlphaHealthChecks.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEGlobalForwardingRules.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaHealthChecks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEGlobalForwardingRules.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Alpha.HealthChecks.Delete(projectID, key.Name)
+ call := g.s.GA.GlobalForwardingRules.Delete(projectID, key.Name)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// Update is a method on GCEAlphaHealthChecks.
-func (g *GCEAlphaHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *alpha.HealthCheck) error {
- klog.V(5).Infof("GCEAlphaHealthChecks.Update(%v, %v, ...): called", ctx, key)
+// SetTarget is a method on GCEGlobalForwardingRules.
+func (g *GCEGlobalForwardingRules) SetTarget(ctx context.Context, key *meta.Key, arg0 *ga.TargetReference) error {
+ klog.V(5).Infof("GCEGlobalForwardingRules.SetTarget(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaHealthChecks.Update(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEGlobalForwardingRules.SetTarget(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "HealthChecks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "GlobalForwardingRules")
rk := &RateLimitKey{
ProjectID: projectID,
- Operation: "Update",
- Version: meta.Version("alpha"),
- Service: "HealthChecks",
+ Operation: "SetTarget",
+ Version: meta.Version("ga"),
+ Service: "GlobalForwardingRules",
}
- klog.V(5).Infof("GCEAlphaHealthChecks.Update(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEGlobalForwardingRules.SetTarget(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaHealthChecks.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEGlobalForwardingRules.SetTarget(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Alpha.HealthChecks.Update(projectID, key.Name, arg0)
+ call := g.s.GA.GlobalForwardingRules.SetTarget(projectID, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEGlobalForwardingRules.SetTarget(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEGlobalForwardingRules.SetTarget(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// BetaHealthChecks is an interface that allows for mocking of HealthChecks.
-type BetaHealthChecks interface {
- Get(ctx context.Context, key *meta.Key) (*beta.HealthCheck, error)
- List(ctx context.Context, fl *filter.F) ([]*beta.HealthCheck, error)
- Insert(ctx context.Context, key *meta.Key, obj *beta.HealthCheck) error
+// HealthChecks is an interface that allows for mocking of HealthChecks.
+type HealthChecks interface {
+ Get(ctx context.Context, key *meta.Key) (*ga.HealthCheck, error)
+ List(ctx context.Context, fl *filter.F) ([]*ga.HealthCheck, error)
+ Insert(ctx context.Context, key *meta.Key, obj *ga.HealthCheck) error
Delete(ctx context.Context, key *meta.Key) error
- Update(context.Context, *meta.Key, *beta.HealthCheck) error
+ Update(context.Context, *meta.Key, *ga.HealthCheck) error
}
-// NewMockBetaHealthChecks returns a new mock for HealthChecks.
-func NewMockBetaHealthChecks(pr ProjectRouter, objs map[meta.Key]*MockHealthChecksObj) *MockBetaHealthChecks {
- mock := &MockBetaHealthChecks{
+// NewMockHealthChecks returns a new mock for HealthChecks.
+func NewMockHealthChecks(pr ProjectRouter, objs map[meta.Key]*MockHealthChecksObj) *MockHealthChecks {
+ mock := &MockHealthChecks{
ProjectRouter: pr,
Objects: objs,
@@ -10791,8 +11023,8 @@ func NewMockBetaHealthChecks(pr ProjectRouter, objs map[meta.Key]*MockHealthChec
return mock
}
-// MockBetaHealthChecks is the mock for HealthChecks.
-type MockBetaHealthChecks struct {
+// MockHealthChecks is the mock for HealthChecks.
+type MockHealthChecks struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
@@ -10811,11 +11043,11 @@ type MockBetaHealthChecks struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockBetaHealthChecks) (bool, *beta.HealthCheck, error)
- ListHook func(ctx context.Context, fl *filter.F, m *MockBetaHealthChecks) (bool, []*beta.HealthCheck, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *beta.HealthCheck, m *MockBetaHealthChecks) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaHealthChecks) (bool, error)
- UpdateHook func(context.Context, *meta.Key, *beta.HealthCheck, *MockBetaHealthChecks) error
+ GetHook func(ctx context.Context, key *meta.Key, m *MockHealthChecks) (bool, *ga.HealthCheck, error)
+ ListHook func(ctx context.Context, fl *filter.F, m *MockHealthChecks) (bool, []*ga.HealthCheck, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *ga.HealthCheck, m *MockHealthChecks) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockHealthChecks) (bool, error)
+ UpdateHook func(context.Context, *meta.Key, *ga.HealthCheck, *MockHealthChecks) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -10823,10 +11055,10 @@ type MockBetaHealthChecks struct {
}
// Get returns the object from the mock.
-func (m *MockBetaHealthChecks) Get(ctx context.Context, key *meta.Key) (*beta.HealthCheck, error) {
+func (m *MockHealthChecks) Get(ctx context.Context, key *meta.Key) (*ga.HealthCheck, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockBetaHealthChecks.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockHealthChecks.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -10838,28 +11070,28 @@ func (m *MockBetaHealthChecks) Get(ctx context.Context, key *meta.Key) (*beta.He
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockBetaHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
- typedObj := obj.ToBeta()
- klog.V(5).Infof("MockBetaHealthChecks.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ typedObj := obj.ToGA()
+ klog.V(5).Infof("MockHealthChecks.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockBetaHealthChecks %v not found", key),
+ Message: fmt.Sprintf("MockHealthChecks %v not found", key),
}
- klog.V(5).Infof("MockBetaHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
// List all of the objects in the mock.
-func (m *MockBetaHealthChecks) List(ctx context.Context, fl *filter.F) ([]*beta.HealthCheck, error) {
+func (m *MockHealthChecks) List(ctx context.Context, fl *filter.F) ([]*ga.HealthCheck, error) {
if m.ListHook != nil {
if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
- klog.V(5).Infof("MockBetaHealthChecks.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
+ klog.V(5).Infof("MockHealthChecks.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
return objs, err
}
}
@@ -10869,28 +11101,28 @@ func (m *MockBetaHealthChecks) List(ctx context.Context, fl *filter.F) ([]*beta.
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockBetaHealthChecks.List(%v, %v) = nil, %v", ctx, fl, err)
+ klog.V(5).Infof("MockHealthChecks.List(%v, %v) = nil, %v", ctx, fl, err)
return nil, *m.ListError
}
- var objs []*beta.HealthCheck
+ var objs []*ga.HealthCheck
for _, obj := range m.Objects {
- if !fl.Match(obj.ToBeta()) {
+ if !fl.Match(obj.ToGA()) {
continue
}
- objs = append(objs, obj.ToBeta())
+ objs = append(objs, obj.ToGA())
}
- klog.V(5).Infof("MockBetaHealthChecks.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
+ klog.V(5).Infof("MockHealthChecks.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockBetaHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *beta.HealthCheck) error {
+func (m *MockHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *ga.HealthCheck) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockBetaHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -10902,32 +11134,32 @@ func (m *MockBetaHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *b
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockBetaHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockBetaHealthChecks %v exists", key),
+ Message: fmt.Sprintf("MockHealthChecks %v exists", key),
}
- klog.V(5).Infof("MockBetaHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "beta", "healthChecks")
- obj.SelfLink = SelfLink(meta.VersionBeta, projectID, "healthChecks", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "ga", "healthChecks")
+ obj.SelfLink = SelfLink(meta.VersionGA, projectID, "healthChecks", key)
m.Objects[*key] = &MockHealthChecksObj{obj}
- klog.V(5).Infof("MockBetaHealthChecks.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ klog.V(5).Infof("MockHealthChecks.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockBetaHealthChecks) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockHealthChecks) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockBetaHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -10939,223 +11171,223 @@ func (m *MockBetaHealthChecks) Delete(ctx context.Context, key *meta.Key) error
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockBetaHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockBetaHealthChecks %v not found", key),
+ Message: fmt.Sprintf("MockHealthChecks %v not found", key),
}
- klog.V(5).Infof("MockBetaHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockBetaHealthChecks.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockHealthChecks.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockBetaHealthChecks) Obj(o *beta.HealthCheck) *MockHealthChecksObj {
+func (m *MockHealthChecks) Obj(o *ga.HealthCheck) *MockHealthChecksObj {
return &MockHealthChecksObj{o}
}
// Update is a mock for the corresponding method.
-func (m *MockBetaHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *beta.HealthCheck) error {
+func (m *MockHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *ga.HealthCheck) error {
if m.UpdateHook != nil {
return m.UpdateHook(ctx, key, arg0, m)
}
return nil
}
-// GCEBetaHealthChecks is a simplifying adapter for the GCE HealthChecks.
-type GCEBetaHealthChecks struct {
+// GCEHealthChecks is a simplifying adapter for the GCE HealthChecks.
+type GCEHealthChecks struct {
s *Service
}
// Get the HealthCheck named by key.
-func (g *GCEBetaHealthChecks) Get(ctx context.Context, key *meta.Key) (*beta.HealthCheck, error) {
- klog.V(5).Infof("GCEBetaHealthChecks.Get(%v, %v): called", ctx, key)
+func (g *GCEHealthChecks) Get(ctx context.Context, key *meta.Key) (*ga.HealthCheck, error) {
+ klog.V(5).Infof("GCEHealthChecks.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaHealthChecks.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEHealthChecks.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "HealthChecks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "HealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
- Version: meta.Version("beta"),
+ Version: meta.Version("ga"),
Service: "HealthChecks",
}
- klog.V(5).Infof("GCEBetaHealthChecks.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEHealthChecks.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaHealthChecks.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEHealthChecks.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.Beta.HealthChecks.Get(projectID, key.Name)
+ call := g.s.GA.HealthChecks.Get(projectID, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEBetaHealthChecks.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEHealthChecks.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
// List all HealthCheck objects.
-func (g *GCEBetaHealthChecks) List(ctx context.Context, fl *filter.F) ([]*beta.HealthCheck, error) {
- klog.V(5).Infof("GCEBetaHealthChecks.List(%v, %v) called", ctx, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "HealthChecks")
+func (g *GCEHealthChecks) List(ctx context.Context, fl *filter.F) ([]*ga.HealthCheck, error) {
+ klog.V(5).Infof("GCEHealthChecks.List(%v, %v) called", ctx, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "HealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
- Version: meta.Version("beta"),
+ Version: meta.Version("ga"),
Service: "HealthChecks",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCEBetaHealthChecks.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
- call := g.s.Beta.HealthChecks.List(projectID)
+ klog.V(5).Infof("GCEHealthChecks.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
+ call := g.s.GA.HealthChecks.List(projectID)
if fl != filter.None {
call.Filter(fl.String())
}
- var all []*beta.HealthCheck
- f := func(l *beta.HealthCheckList) error {
- klog.V(5).Infof("GCEBetaHealthChecks.List(%v, ..., %v): page %+v", ctx, fl, l)
+ var all []*ga.HealthCheck
+ f := func(l *ga.HealthCheckList) error {
+ klog.V(5).Infof("GCEHealthChecks.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEBetaHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEBetaHealthChecks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEHealthChecks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEBetaHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
// Insert HealthCheck with key of value obj.
-func (g *GCEBetaHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *beta.HealthCheck) error {
- klog.V(5).Infof("GCEBetaHealthChecks.Insert(%v, %v, %+v): called", ctx, key, obj)
+func (g *GCEHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *ga.HealthCheck) error {
+ klog.V(5).Infof("GCEHealthChecks.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaHealthChecks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEHealthChecks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "HealthChecks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "HealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
- Version: meta.Version("beta"),
+ Version: meta.Version("ga"),
Service: "HealthChecks",
}
- klog.V(5).Infof("GCEBetaHealthChecks.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEHealthChecks.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaHealthChecks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEHealthChecks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.Beta.HealthChecks.Insert(projectID, obj)
+ call := g.s.GA.HealthChecks.Insert(projectID, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaHealthChecks.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEHealthChecks.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaHealthChecks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCEHealthChecks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
// Delete the HealthCheck referenced by key.
-func (g *GCEBetaHealthChecks) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEBetaHealthChecks.Delete(%v, %v): called", ctx, key)
+func (g *GCEHealthChecks) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEHealthChecks.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaHealthChecks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEHealthChecks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "HealthChecks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "HealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
- Version: meta.Version("beta"),
+ Version: meta.Version("ga"),
Service: "HealthChecks",
}
- klog.V(5).Infof("GCEBetaHealthChecks.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEHealthChecks.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaHealthChecks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEHealthChecks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Beta.HealthChecks.Delete(projectID, key.Name)
+ call := g.s.GA.HealthChecks.Delete(projectID, key.Name)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// Update is a method on GCEBetaHealthChecks.
-func (g *GCEBetaHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *beta.HealthCheck) error {
- klog.V(5).Infof("GCEBetaHealthChecks.Update(%v, %v, ...): called", ctx, key)
+// Update is a method on GCEHealthChecks.
+func (g *GCEHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *ga.HealthCheck) error {
+ klog.V(5).Infof("GCEHealthChecks.Update(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaHealthChecks.Update(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEHealthChecks.Update(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "HealthChecks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "HealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Update",
- Version: meta.Version("beta"),
+ Version: meta.Version("ga"),
Service: "HealthChecks",
}
- klog.V(5).Infof("GCEBetaHealthChecks.Update(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEHealthChecks.Update(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaHealthChecks.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEHealthChecks.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Beta.HealthChecks.Update(projectID, key.Name, arg0)
+ call := g.s.GA.HealthChecks.Update(projectID, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// AlphaRegionHealthChecks is an interface that allows for mocking of RegionHealthChecks.
-type AlphaRegionHealthChecks interface {
+// AlphaHealthChecks is an interface that allows for mocking of HealthChecks.
+type AlphaHealthChecks interface {
Get(ctx context.Context, key *meta.Key) (*alpha.HealthCheck, error)
- List(ctx context.Context, region string, fl *filter.F) ([]*alpha.HealthCheck, error)
+ List(ctx context.Context, fl *filter.F) ([]*alpha.HealthCheck, error)
Insert(ctx context.Context, key *meta.Key, obj *alpha.HealthCheck) error
Delete(ctx context.Context, key *meta.Key) error
Update(context.Context, *meta.Key, *alpha.HealthCheck) error
}
-// NewMockAlphaRegionHealthChecks returns a new mock for RegionHealthChecks.
-func NewMockAlphaRegionHealthChecks(pr ProjectRouter, objs map[meta.Key]*MockRegionHealthChecksObj) *MockAlphaRegionHealthChecks {
- mock := &MockAlphaRegionHealthChecks{
+// NewMockAlphaHealthChecks returns a new mock for HealthChecks.
+func NewMockAlphaHealthChecks(pr ProjectRouter, objs map[meta.Key]*MockHealthChecksObj) *MockAlphaHealthChecks {
+ mock := &MockAlphaHealthChecks{
ProjectRouter: pr,
Objects: objs,
@@ -11166,14 +11398,14 @@ func NewMockAlphaRegionHealthChecks(pr ProjectRouter, objs map[meta.Key]*MockReg
return mock
}
-// MockAlphaRegionHealthChecks is the mock for RegionHealthChecks.
-type MockAlphaRegionHealthChecks struct {
+// MockAlphaHealthChecks is the mock for HealthChecks.
+type MockAlphaHealthChecks struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
// Objects maintained by the mock.
- Objects map[meta.Key]*MockRegionHealthChecksObj
+ Objects map[meta.Key]*MockHealthChecksObj
// If an entry exists for the given key and operation, then the error
// will be returned instead of the operation.
@@ -11186,11 +11418,11 @@ type MockAlphaRegionHealthChecks struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaRegionHealthChecks) (bool, *alpha.HealthCheck, error)
- ListHook func(ctx context.Context, region string, fl *filter.F, m *MockAlphaRegionHealthChecks) (bool, []*alpha.HealthCheck, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *alpha.HealthCheck, m *MockAlphaRegionHealthChecks) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaRegionHealthChecks) (bool, error)
- UpdateHook func(context.Context, *meta.Key, *alpha.HealthCheck, *MockAlphaRegionHealthChecks) error
+ GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaHealthChecks) (bool, *alpha.HealthCheck, error)
+ ListHook func(ctx context.Context, fl *filter.F, m *MockAlphaHealthChecks) (bool, []*alpha.HealthCheck, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *alpha.HealthCheck, m *MockAlphaHealthChecks) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaHealthChecks) (bool, error)
+ UpdateHook func(context.Context, *meta.Key, *alpha.HealthCheck, *MockAlphaHealthChecks) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -11198,10 +11430,10 @@ type MockAlphaRegionHealthChecks struct {
}
// Get returns the object from the mock.
-func (m *MockAlphaRegionHealthChecks) Get(ctx context.Context, key *meta.Key) (*alpha.HealthCheck, error) {
+func (m *MockAlphaHealthChecks) Get(ctx context.Context, key *meta.Key) (*alpha.HealthCheck, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockAlphaRegionHealthChecks.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaHealthChecks.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -11213,28 +11445,28 @@ func (m *MockAlphaRegionHealthChecks) Get(ctx context.Context, key *meta.Key) (*
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockAlphaRegionHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
typedObj := obj.ToAlpha()
- klog.V(5).Infof("MockAlphaRegionHealthChecks.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ klog.V(5).Infof("MockAlphaHealthChecks.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockAlphaRegionHealthChecks %v not found", key),
+ Message: fmt.Sprintf("MockAlphaHealthChecks %v not found", key),
}
- klog.V(5).Infof("MockAlphaRegionHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
-// List all of the objects in the mock in the given region.
-func (m *MockAlphaRegionHealthChecks) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.HealthCheck, error) {
+// List all of the objects in the mock.
+func (m *MockAlphaHealthChecks) List(ctx context.Context, fl *filter.F) ([]*alpha.HealthCheck, error) {
if m.ListHook != nil {
- if intercept, objs, err := m.ListHook(ctx, region, fl, m); intercept {
- klog.V(5).Infof("MockAlphaRegionHealthChecks.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err)
+ if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
+ klog.V(5).Infof("MockAlphaHealthChecks.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
return objs, err
}
}
@@ -11244,31 +11476,28 @@ func (m *MockAlphaRegionHealthChecks) List(ctx context.Context, region string, f
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockAlphaRegionHealthChecks.List(%v, %q, %v) = nil, %v", ctx, region, fl, err)
+ klog.V(5).Infof("MockAlphaHealthChecks.List(%v, %v) = nil, %v", ctx, fl, err)
return nil, *m.ListError
}
var objs []*alpha.HealthCheck
- for key, obj := range m.Objects {
- if key.Region != region {
- continue
- }
+ for _, obj := range m.Objects {
if !fl.Match(obj.ToAlpha()) {
continue
}
objs = append(objs, obj.ToAlpha())
}
- klog.V(5).Infof("MockAlphaRegionHealthChecks.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs))
+ klog.V(5).Infof("MockAlphaHealthChecks.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockAlphaRegionHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *alpha.HealthCheck) error {
+func (m *MockAlphaHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *alpha.HealthCheck) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockAlphaRegionHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -11280,15 +11509,15 @@ func (m *MockAlphaRegionHealthChecks) Insert(ctx context.Context, key *meta.Key,
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockAlphaRegionHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockAlphaRegionHealthChecks %v exists", key),
+ Message: fmt.Sprintf("MockAlphaHealthChecks %v exists", key),
}
- klog.V(5).Infof("MockAlphaRegionHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
@@ -11296,16 +11525,16 @@ func (m *MockAlphaRegionHealthChecks) Insert(ctx context.Context, key *meta.Key,
projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "healthChecks")
obj.SelfLink = SelfLink(meta.VersionAlpha, projectID, "healthChecks", key)
- m.Objects[*key] = &MockRegionHealthChecksObj{obj}
- klog.V(5).Infof("MockAlphaRegionHealthChecks.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ m.Objects[*key] = &MockHealthChecksObj{obj}
+ klog.V(5).Infof("MockAlphaHealthChecks.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockAlphaRegionHealthChecks) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockAlphaHealthChecks) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockAlphaRegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -11317,222 +11546,223 @@ func (m *MockAlphaRegionHealthChecks) Delete(ctx context.Context, key *meta.Key)
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockAlphaRegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockAlphaRegionHealthChecks %v not found", key),
+ Message: fmt.Sprintf("MockAlphaHealthChecks %v not found", key),
}
- klog.V(5).Infof("MockAlphaRegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockAlphaRegionHealthChecks.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockAlphaHealthChecks.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockAlphaRegionHealthChecks) Obj(o *alpha.HealthCheck) *MockRegionHealthChecksObj {
- return &MockRegionHealthChecksObj{o}
+func (m *MockAlphaHealthChecks) Obj(o *alpha.HealthCheck) *MockHealthChecksObj {
+ return &MockHealthChecksObj{o}
}
// Update is a mock for the corresponding method.
-func (m *MockAlphaRegionHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *alpha.HealthCheck) error {
+func (m *MockAlphaHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *alpha.HealthCheck) error {
if m.UpdateHook != nil {
return m.UpdateHook(ctx, key, arg0, m)
}
return nil
}
-// GCEAlphaRegionHealthChecks is a simplifying adapter for the GCE RegionHealthChecks.
-type GCEAlphaRegionHealthChecks struct {
+// GCEAlphaHealthChecks is a simplifying adapter for the GCE HealthChecks.
+type GCEAlphaHealthChecks struct {
s *Service
}
// Get the HealthCheck named by key.
-func (g *GCEAlphaRegionHealthChecks) Get(ctx context.Context, key *meta.Key) (*alpha.HealthCheck, error) {
- klog.V(5).Infof("GCEAlphaRegionHealthChecks.Get(%v, %v): called", ctx, key)
+func (g *GCEAlphaHealthChecks) Get(ctx context.Context, key *meta.Key) (*alpha.HealthCheck, error) {
+ klog.V(5).Infof("GCEAlphaHealthChecks.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaRegionHealthChecks.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaHealthChecks.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionHealthChecks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "HealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
Version: meta.Version("alpha"),
- Service: "RegionHealthChecks",
+ Service: "HealthChecks",
}
- klog.V(5).Infof("GCEAlphaRegionHealthChecks.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaHealthChecks.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaRegionHealthChecks.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaHealthChecks.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.Alpha.RegionHealthChecks.Get(projectID, key.Region, key.Name)
+ call := g.s.Alpha.HealthChecks.Get(projectID, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEAlphaRegionHealthChecks.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEAlphaHealthChecks.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
// List all HealthCheck objects.
-func (g *GCEAlphaRegionHealthChecks) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.HealthCheck, error) {
- klog.V(5).Infof("GCEAlphaRegionHealthChecks.List(%v, %v, %v) called", ctx, region, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionHealthChecks")
+func (g *GCEAlphaHealthChecks) List(ctx context.Context, fl *filter.F) ([]*alpha.HealthCheck, error) {
+ klog.V(5).Infof("GCEAlphaHealthChecks.List(%v, %v) called", ctx, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "HealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
Version: meta.Version("alpha"),
- Service: "RegionHealthChecks",
+ Service: "HealthChecks",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCEAlphaRegionHealthChecks.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk)
- call := g.s.Alpha.RegionHealthChecks.List(projectID, region)
+ klog.V(5).Infof("GCEAlphaHealthChecks.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
+ call := g.s.Alpha.HealthChecks.List(projectID)
if fl != filter.None {
call.Filter(fl.String())
}
var all []*alpha.HealthCheck
f := func(l *alpha.HealthCheckList) error {
- klog.V(5).Infof("GCEAlphaRegionHealthChecks.List(%v, ..., %v): page %+v", ctx, fl, l)
+ klog.V(5).Infof("GCEAlphaHealthChecks.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEAlphaRegionHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEAlphaHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEAlphaRegionHealthChecks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEAlphaHealthChecks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEAlphaRegionHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEAlphaHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
// Insert HealthCheck with key of value obj.
-func (g *GCEAlphaRegionHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *alpha.HealthCheck) error {
- klog.V(5).Infof("GCEAlphaRegionHealthChecks.Insert(%v, %v, %+v): called", ctx, key, obj)
+func (g *GCEAlphaHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *alpha.HealthCheck) error {
+ klog.V(5).Infof("GCEAlphaHealthChecks.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaRegionHealthChecks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaHealthChecks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionHealthChecks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "HealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
Version: meta.Version("alpha"),
- Service: "RegionHealthChecks",
+ Service: "HealthChecks",
}
- klog.V(5).Infof("GCEAlphaRegionHealthChecks.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaHealthChecks.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaRegionHealthChecks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaHealthChecks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.Alpha.RegionHealthChecks.Insert(projectID, key.Region, obj)
+ call := g.s.Alpha.HealthChecks.Insert(projectID, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaRegionHealthChecks.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaHealthChecks.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaRegionHealthChecks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCEAlphaHealthChecks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
// Delete the HealthCheck referenced by key.
-func (g *GCEAlphaRegionHealthChecks) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEAlphaRegionHealthChecks.Delete(%v, %v): called", ctx, key)
+func (g *GCEAlphaHealthChecks) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEAlphaHealthChecks.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaRegionHealthChecks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaHealthChecks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionHealthChecks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "HealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
Version: meta.Version("alpha"),
- Service: "RegionHealthChecks",
+ Service: "HealthChecks",
}
- klog.V(5).Infof("GCEAlphaRegionHealthChecks.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaHealthChecks.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaRegionHealthChecks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaHealthChecks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Alpha.RegionHealthChecks.Delete(projectID, key.Region, key.Name)
+ call := g.s.Alpha.HealthChecks.Delete(projectID, key.Name)
+
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaRegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaRegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// Update is a method on GCEAlphaRegionHealthChecks.
-func (g *GCEAlphaRegionHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *alpha.HealthCheck) error {
- klog.V(5).Infof("GCEAlphaRegionHealthChecks.Update(%v, %v, ...): called", ctx, key)
+// Update is a method on GCEAlphaHealthChecks.
+func (g *GCEAlphaHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *alpha.HealthCheck) error {
+ klog.V(5).Infof("GCEAlphaHealthChecks.Update(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaRegionHealthChecks.Update(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaHealthChecks.Update(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionHealthChecks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "HealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Update",
Version: meta.Version("alpha"),
- Service: "RegionHealthChecks",
+ Service: "HealthChecks",
}
- klog.V(5).Infof("GCEAlphaRegionHealthChecks.Update(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaHealthChecks.Update(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaRegionHealthChecks.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaHealthChecks.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Alpha.RegionHealthChecks.Update(projectID, key.Region, key.Name, arg0)
+ call := g.s.Alpha.HealthChecks.Update(projectID, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaRegionHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaRegionHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// BetaRegionHealthChecks is an interface that allows for mocking of RegionHealthChecks.
-type BetaRegionHealthChecks interface {
+// BetaHealthChecks is an interface that allows for mocking of HealthChecks.
+type BetaHealthChecks interface {
Get(ctx context.Context, key *meta.Key) (*beta.HealthCheck, error)
- List(ctx context.Context, region string, fl *filter.F) ([]*beta.HealthCheck, error)
+ List(ctx context.Context, fl *filter.F) ([]*beta.HealthCheck, error)
Insert(ctx context.Context, key *meta.Key, obj *beta.HealthCheck) error
Delete(ctx context.Context, key *meta.Key) error
Update(context.Context, *meta.Key, *beta.HealthCheck) error
}
-// NewMockBetaRegionHealthChecks returns a new mock for RegionHealthChecks.
-func NewMockBetaRegionHealthChecks(pr ProjectRouter, objs map[meta.Key]*MockRegionHealthChecksObj) *MockBetaRegionHealthChecks {
- mock := &MockBetaRegionHealthChecks{
+// NewMockBetaHealthChecks returns a new mock for HealthChecks.
+func NewMockBetaHealthChecks(pr ProjectRouter, objs map[meta.Key]*MockHealthChecksObj) *MockBetaHealthChecks {
+ mock := &MockBetaHealthChecks{
ProjectRouter: pr,
Objects: objs,
@@ -11543,14 +11773,14 @@ func NewMockBetaRegionHealthChecks(pr ProjectRouter, objs map[meta.Key]*MockRegi
return mock
}
-// MockBetaRegionHealthChecks is the mock for RegionHealthChecks.
-type MockBetaRegionHealthChecks struct {
+// MockBetaHealthChecks is the mock for HealthChecks.
+type MockBetaHealthChecks struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
// Objects maintained by the mock.
- Objects map[meta.Key]*MockRegionHealthChecksObj
+ Objects map[meta.Key]*MockHealthChecksObj
// If an entry exists for the given key and operation, then the error
// will be returned instead of the operation.
@@ -11563,11 +11793,11 @@ type MockBetaRegionHealthChecks struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockBetaRegionHealthChecks) (bool, *beta.HealthCheck, error)
- ListHook func(ctx context.Context, region string, fl *filter.F, m *MockBetaRegionHealthChecks) (bool, []*beta.HealthCheck, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *beta.HealthCheck, m *MockBetaRegionHealthChecks) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaRegionHealthChecks) (bool, error)
- UpdateHook func(context.Context, *meta.Key, *beta.HealthCheck, *MockBetaRegionHealthChecks) error
+ GetHook func(ctx context.Context, key *meta.Key, m *MockBetaHealthChecks) (bool, *beta.HealthCheck, error)
+ ListHook func(ctx context.Context, fl *filter.F, m *MockBetaHealthChecks) (bool, []*beta.HealthCheck, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *beta.HealthCheck, m *MockBetaHealthChecks) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaHealthChecks) (bool, error)
+ UpdateHook func(context.Context, *meta.Key, *beta.HealthCheck, *MockBetaHealthChecks) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -11575,10 +11805,10 @@ type MockBetaRegionHealthChecks struct {
}
// Get returns the object from the mock.
-func (m *MockBetaRegionHealthChecks) Get(ctx context.Context, key *meta.Key) (*beta.HealthCheck, error) {
+func (m *MockBetaHealthChecks) Get(ctx context.Context, key *meta.Key) (*beta.HealthCheck, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockBetaRegionHealthChecks.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaHealthChecks.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -11590,28 +11820,28 @@ func (m *MockBetaRegionHealthChecks) Get(ctx context.Context, key *meta.Key) (*b
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockBetaRegionHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
typedObj := obj.ToBeta()
- klog.V(5).Infof("MockBetaRegionHealthChecks.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ klog.V(5).Infof("MockBetaHealthChecks.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockBetaRegionHealthChecks %v not found", key),
+ Message: fmt.Sprintf("MockBetaHealthChecks %v not found", key),
}
- klog.V(5).Infof("MockBetaRegionHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
-// List all of the objects in the mock in the given region.
-func (m *MockBetaRegionHealthChecks) List(ctx context.Context, region string, fl *filter.F) ([]*beta.HealthCheck, error) {
+// List all of the objects in the mock.
+func (m *MockBetaHealthChecks) List(ctx context.Context, fl *filter.F) ([]*beta.HealthCheck, error) {
if m.ListHook != nil {
- if intercept, objs, err := m.ListHook(ctx, region, fl, m); intercept {
- klog.V(5).Infof("MockBetaRegionHealthChecks.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err)
+ if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
+ klog.V(5).Infof("MockBetaHealthChecks.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
return objs, err
}
}
@@ -11621,31 +11851,28 @@ func (m *MockBetaRegionHealthChecks) List(ctx context.Context, region string, fl
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockBetaRegionHealthChecks.List(%v, %q, %v) = nil, %v", ctx, region, fl, err)
+ klog.V(5).Infof("MockBetaHealthChecks.List(%v, %v) = nil, %v", ctx, fl, err)
return nil, *m.ListError
}
var objs []*beta.HealthCheck
- for key, obj := range m.Objects {
- if key.Region != region {
- continue
- }
+ for _, obj := range m.Objects {
if !fl.Match(obj.ToBeta()) {
continue
}
objs = append(objs, obj.ToBeta())
}
- klog.V(5).Infof("MockBetaRegionHealthChecks.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs))
+ klog.V(5).Infof("MockBetaHealthChecks.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockBetaRegionHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *beta.HealthCheck) error {
+func (m *MockBetaHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *beta.HealthCheck) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockBetaRegionHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -11657,15 +11884,15 @@ func (m *MockBetaRegionHealthChecks) Insert(ctx context.Context, key *meta.Key,
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockBetaRegionHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockBetaRegionHealthChecks %v exists", key),
+ Message: fmt.Sprintf("MockBetaHealthChecks %v exists", key),
}
- klog.V(5).Infof("MockBetaRegionHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
@@ -11673,16 +11900,16 @@ func (m *MockBetaRegionHealthChecks) Insert(ctx context.Context, key *meta.Key,
projectID := m.ProjectRouter.ProjectID(ctx, "beta", "healthChecks")
obj.SelfLink = SelfLink(meta.VersionBeta, projectID, "healthChecks", key)
- m.Objects[*key] = &MockRegionHealthChecksObj{obj}
- klog.V(5).Infof("MockBetaRegionHealthChecks.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ m.Objects[*key] = &MockHealthChecksObj{obj}
+ klog.V(5).Infof("MockBetaHealthChecks.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockBetaRegionHealthChecks) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockBetaHealthChecks) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockBetaRegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -11694,222 +11921,223 @@ func (m *MockBetaRegionHealthChecks) Delete(ctx context.Context, key *meta.Key)
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockBetaRegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockBetaRegionHealthChecks %v not found", key),
+ Message: fmt.Sprintf("MockBetaHealthChecks %v not found", key),
}
- klog.V(5).Infof("MockBetaRegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockBetaRegionHealthChecks.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockBetaHealthChecks.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockBetaRegionHealthChecks) Obj(o *beta.HealthCheck) *MockRegionHealthChecksObj {
- return &MockRegionHealthChecksObj{o}
+func (m *MockBetaHealthChecks) Obj(o *beta.HealthCheck) *MockHealthChecksObj {
+ return &MockHealthChecksObj{o}
}
// Update is a mock for the corresponding method.
-func (m *MockBetaRegionHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *beta.HealthCheck) error {
+func (m *MockBetaHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *beta.HealthCheck) error {
if m.UpdateHook != nil {
return m.UpdateHook(ctx, key, arg0, m)
}
return nil
}
-// GCEBetaRegionHealthChecks is a simplifying adapter for the GCE RegionHealthChecks.
-type GCEBetaRegionHealthChecks struct {
+// GCEBetaHealthChecks is a simplifying adapter for the GCE HealthChecks.
+type GCEBetaHealthChecks struct {
s *Service
}
// Get the HealthCheck named by key.
-func (g *GCEBetaRegionHealthChecks) Get(ctx context.Context, key *meta.Key) (*beta.HealthCheck, error) {
- klog.V(5).Infof("GCEBetaRegionHealthChecks.Get(%v, %v): called", ctx, key)
+func (g *GCEBetaHealthChecks) Get(ctx context.Context, key *meta.Key) (*beta.HealthCheck, error) {
+ klog.V(5).Infof("GCEBetaHealthChecks.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaRegionHealthChecks.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaHealthChecks.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionHealthChecks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "HealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
Version: meta.Version("beta"),
- Service: "RegionHealthChecks",
+ Service: "HealthChecks",
}
- klog.V(5).Infof("GCEBetaRegionHealthChecks.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaHealthChecks.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaRegionHealthChecks.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaHealthChecks.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.Beta.RegionHealthChecks.Get(projectID, key.Region, key.Name)
+ call := g.s.Beta.HealthChecks.Get(projectID, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEBetaRegionHealthChecks.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEBetaHealthChecks.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
// List all HealthCheck objects.
-func (g *GCEBetaRegionHealthChecks) List(ctx context.Context, region string, fl *filter.F) ([]*beta.HealthCheck, error) {
- klog.V(5).Infof("GCEBetaRegionHealthChecks.List(%v, %v, %v) called", ctx, region, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionHealthChecks")
+func (g *GCEBetaHealthChecks) List(ctx context.Context, fl *filter.F) ([]*beta.HealthCheck, error) {
+ klog.V(5).Infof("GCEBetaHealthChecks.List(%v, %v) called", ctx, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "HealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
Version: meta.Version("beta"),
- Service: "RegionHealthChecks",
+ Service: "HealthChecks",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCEBetaRegionHealthChecks.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk)
- call := g.s.Beta.RegionHealthChecks.List(projectID, region)
+ klog.V(5).Infof("GCEBetaHealthChecks.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
+ call := g.s.Beta.HealthChecks.List(projectID)
if fl != filter.None {
call.Filter(fl.String())
}
var all []*beta.HealthCheck
f := func(l *beta.HealthCheckList) error {
- klog.V(5).Infof("GCEBetaRegionHealthChecks.List(%v, ..., %v): page %+v", ctx, fl, l)
+ klog.V(5).Infof("GCEBetaHealthChecks.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEBetaRegionHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEBetaHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEBetaRegionHealthChecks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEBetaHealthChecks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEBetaRegionHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEBetaHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
// Insert HealthCheck with key of value obj.
-func (g *GCEBetaRegionHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *beta.HealthCheck) error {
- klog.V(5).Infof("GCEBetaRegionHealthChecks.Insert(%v, %v, %+v): called", ctx, key, obj)
+func (g *GCEBetaHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *beta.HealthCheck) error {
+ klog.V(5).Infof("GCEBetaHealthChecks.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaRegionHealthChecks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaHealthChecks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionHealthChecks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "HealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
Version: meta.Version("beta"),
- Service: "RegionHealthChecks",
+ Service: "HealthChecks",
}
- klog.V(5).Infof("GCEBetaRegionHealthChecks.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaHealthChecks.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaRegionHealthChecks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaHealthChecks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.Beta.RegionHealthChecks.Insert(projectID, key.Region, obj)
+ call := g.s.Beta.HealthChecks.Insert(projectID, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaRegionHealthChecks.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaHealthChecks.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaRegionHealthChecks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCEBetaHealthChecks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
// Delete the HealthCheck referenced by key.
-func (g *GCEBetaRegionHealthChecks) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEBetaRegionHealthChecks.Delete(%v, %v): called", ctx, key)
+func (g *GCEBetaHealthChecks) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEBetaHealthChecks.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaRegionHealthChecks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaHealthChecks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionHealthChecks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "HealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
Version: meta.Version("beta"),
- Service: "RegionHealthChecks",
+ Service: "HealthChecks",
}
- klog.V(5).Infof("GCEBetaRegionHealthChecks.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaHealthChecks.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaRegionHealthChecks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaHealthChecks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Beta.RegionHealthChecks.Delete(projectID, key.Region, key.Name)
+ call := g.s.Beta.HealthChecks.Delete(projectID, key.Name)
+
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaRegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaRegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// Update is a method on GCEBetaRegionHealthChecks.
-func (g *GCEBetaRegionHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *beta.HealthCheck) error {
- klog.V(5).Infof("GCEBetaRegionHealthChecks.Update(%v, %v, ...): called", ctx, key)
+// Update is a method on GCEBetaHealthChecks.
+func (g *GCEBetaHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *beta.HealthCheck) error {
+ klog.V(5).Infof("GCEBetaHealthChecks.Update(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaRegionHealthChecks.Update(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaHealthChecks.Update(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionHealthChecks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "HealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Update",
Version: meta.Version("beta"),
- Service: "RegionHealthChecks",
+ Service: "HealthChecks",
}
- klog.V(5).Infof("GCEBetaRegionHealthChecks.Update(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaHealthChecks.Update(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaRegionHealthChecks.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaHealthChecks.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Beta.RegionHealthChecks.Update(projectID, key.Region, key.Name, arg0)
+ call := g.s.Beta.HealthChecks.Update(projectID, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaRegionHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaRegionHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// HttpHealthChecks is an interface that allows for mocking of HttpHealthChecks.
-type HttpHealthChecks interface {
- Get(ctx context.Context, key *meta.Key) (*ga.HttpHealthCheck, error)
- List(ctx context.Context, fl *filter.F) ([]*ga.HttpHealthCheck, error)
- Insert(ctx context.Context, key *meta.Key, obj *ga.HttpHealthCheck) error
+// AlphaRegionHealthChecks is an interface that allows for mocking of RegionHealthChecks.
+type AlphaRegionHealthChecks interface {
+ Get(ctx context.Context, key *meta.Key) (*alpha.HealthCheck, error)
+ List(ctx context.Context, region string, fl *filter.F) ([]*alpha.HealthCheck, error)
+ Insert(ctx context.Context, key *meta.Key, obj *alpha.HealthCheck) error
Delete(ctx context.Context, key *meta.Key) error
- Update(context.Context, *meta.Key, *ga.HttpHealthCheck) error
+ Update(context.Context, *meta.Key, *alpha.HealthCheck) error
}
-// NewMockHttpHealthChecks returns a new mock for HttpHealthChecks.
-func NewMockHttpHealthChecks(pr ProjectRouter, objs map[meta.Key]*MockHttpHealthChecksObj) *MockHttpHealthChecks {
- mock := &MockHttpHealthChecks{
+// NewMockAlphaRegionHealthChecks returns a new mock for RegionHealthChecks.
+func NewMockAlphaRegionHealthChecks(pr ProjectRouter, objs map[meta.Key]*MockRegionHealthChecksObj) *MockAlphaRegionHealthChecks {
+ mock := &MockAlphaRegionHealthChecks{
ProjectRouter: pr,
Objects: objs,
@@ -11920,14 +12148,14 @@ func NewMockHttpHealthChecks(pr ProjectRouter, objs map[meta.Key]*MockHttpHealth
return mock
}
-// MockHttpHealthChecks is the mock for HttpHealthChecks.
-type MockHttpHealthChecks struct {
+// MockAlphaRegionHealthChecks is the mock for RegionHealthChecks.
+type MockAlphaRegionHealthChecks struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
// Objects maintained by the mock.
- Objects map[meta.Key]*MockHttpHealthChecksObj
+ Objects map[meta.Key]*MockRegionHealthChecksObj
// If an entry exists for the given key and operation, then the error
// will be returned instead of the operation.
@@ -11940,11 +12168,11 @@ type MockHttpHealthChecks struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockHttpHealthChecks) (bool, *ga.HttpHealthCheck, error)
- ListHook func(ctx context.Context, fl *filter.F, m *MockHttpHealthChecks) (bool, []*ga.HttpHealthCheck, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *ga.HttpHealthCheck, m *MockHttpHealthChecks) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockHttpHealthChecks) (bool, error)
- UpdateHook func(context.Context, *meta.Key, *ga.HttpHealthCheck, *MockHttpHealthChecks) error
+ GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaRegionHealthChecks) (bool, *alpha.HealthCheck, error)
+ ListHook func(ctx context.Context, region string, fl *filter.F, m *MockAlphaRegionHealthChecks) (bool, []*alpha.HealthCheck, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *alpha.HealthCheck, m *MockAlphaRegionHealthChecks) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaRegionHealthChecks) (bool, error)
+ UpdateHook func(context.Context, *meta.Key, *alpha.HealthCheck, *MockAlphaRegionHealthChecks) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -11952,10 +12180,10 @@ type MockHttpHealthChecks struct {
}
// Get returns the object from the mock.
-func (m *MockHttpHealthChecks) Get(ctx context.Context, key *meta.Key) (*ga.HttpHealthCheck, error) {
+func (m *MockAlphaRegionHealthChecks) Get(ctx context.Context, key *meta.Key) (*alpha.HealthCheck, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockHttpHealthChecks.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaRegionHealthChecks.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -11967,28 +12195,28 @@ func (m *MockHttpHealthChecks) Get(ctx context.Context, key *meta.Key) (*ga.Http
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockHttpHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaRegionHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
- typedObj := obj.ToGA()
- klog.V(5).Infof("MockHttpHealthChecks.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ typedObj := obj.ToAlpha()
+ klog.V(5).Infof("MockAlphaRegionHealthChecks.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockHttpHealthChecks %v not found", key),
+ Message: fmt.Sprintf("MockAlphaRegionHealthChecks %v not found", key),
}
- klog.V(5).Infof("MockHttpHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaRegionHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
-// List all of the objects in the mock.
-func (m *MockHttpHealthChecks) List(ctx context.Context, fl *filter.F) ([]*ga.HttpHealthCheck, error) {
+// List all of the objects in the mock in the given region.
+func (m *MockAlphaRegionHealthChecks) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.HealthCheck, error) {
if m.ListHook != nil {
- if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
- klog.V(5).Infof("MockHttpHealthChecks.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
+ if intercept, objs, err := m.ListHook(ctx, region, fl, m); intercept {
+ klog.V(5).Infof("MockAlphaRegionHealthChecks.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err)
return objs, err
}
}
@@ -11998,28 +12226,31 @@ func (m *MockHttpHealthChecks) List(ctx context.Context, fl *filter.F) ([]*ga.Ht
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockHttpHealthChecks.List(%v, %v) = nil, %v", ctx, fl, err)
+ klog.V(5).Infof("MockAlphaRegionHealthChecks.List(%v, %q, %v) = nil, %v", ctx, region, fl, err)
return nil, *m.ListError
}
- var objs []*ga.HttpHealthCheck
- for _, obj := range m.Objects {
- if !fl.Match(obj.ToGA()) {
+ var objs []*alpha.HealthCheck
+ for key, obj := range m.Objects {
+ if key.Region != region {
continue
}
- objs = append(objs, obj.ToGA())
+ if !fl.Match(obj.ToAlpha()) {
+ continue
+ }
+ objs = append(objs, obj.ToAlpha())
}
- klog.V(5).Infof("MockHttpHealthChecks.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
+ klog.V(5).Infof("MockAlphaRegionHealthChecks.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockHttpHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *ga.HttpHealthCheck) error {
+func (m *MockAlphaRegionHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *alpha.HealthCheck) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockHttpHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaRegionHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -12031,32 +12262,32 @@ func (m *MockHttpHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *g
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockHttpHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaRegionHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockHttpHealthChecks %v exists", key),
+ Message: fmt.Sprintf("MockAlphaRegionHealthChecks %v exists", key),
}
- klog.V(5).Infof("MockHttpHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaRegionHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "ga", "httpHealthChecks")
- obj.SelfLink = SelfLink(meta.VersionGA, projectID, "httpHealthChecks", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "healthChecks")
+ obj.SelfLink = SelfLink(meta.VersionAlpha, projectID, "healthChecks", key)
- m.Objects[*key] = &MockHttpHealthChecksObj{obj}
- klog.V(5).Infof("MockHttpHealthChecks.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ m.Objects[*key] = &MockRegionHealthChecksObj{obj}
+ klog.V(5).Infof("MockAlphaRegionHealthChecks.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockHttpHealthChecks) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockAlphaRegionHealthChecks) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockHttpHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaRegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -12068,223 +12299,222 @@ func (m *MockHttpHealthChecks) Delete(ctx context.Context, key *meta.Key) error
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockHttpHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaRegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockHttpHealthChecks %v not found", key),
+ Message: fmt.Sprintf("MockAlphaRegionHealthChecks %v not found", key),
}
- klog.V(5).Infof("MockHttpHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaRegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockHttpHealthChecks.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockAlphaRegionHealthChecks.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockHttpHealthChecks) Obj(o *ga.HttpHealthCheck) *MockHttpHealthChecksObj {
- return &MockHttpHealthChecksObj{o}
+func (m *MockAlphaRegionHealthChecks) Obj(o *alpha.HealthCheck) *MockRegionHealthChecksObj {
+ return &MockRegionHealthChecksObj{o}
}
// Update is a mock for the corresponding method.
-func (m *MockHttpHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *ga.HttpHealthCheck) error {
+func (m *MockAlphaRegionHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *alpha.HealthCheck) error {
if m.UpdateHook != nil {
return m.UpdateHook(ctx, key, arg0, m)
}
return nil
}
-// GCEHttpHealthChecks is a simplifying adapter for the GCE HttpHealthChecks.
-type GCEHttpHealthChecks struct {
+// GCEAlphaRegionHealthChecks is a simplifying adapter for the GCE RegionHealthChecks.
+type GCEAlphaRegionHealthChecks struct {
s *Service
}
-// Get the HttpHealthCheck named by key.
-func (g *GCEHttpHealthChecks) Get(ctx context.Context, key *meta.Key) (*ga.HttpHealthCheck, error) {
- klog.V(5).Infof("GCEHttpHealthChecks.Get(%v, %v): called", ctx, key)
+// Get the HealthCheck named by key.
+func (g *GCEAlphaRegionHealthChecks) Get(ctx context.Context, key *meta.Key) (*alpha.HealthCheck, error) {
+ klog.V(5).Infof("GCEAlphaRegionHealthChecks.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEHttpHealthChecks.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaRegionHealthChecks.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "HttpHealthChecks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionHealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
- Version: meta.Version("ga"),
- Service: "HttpHealthChecks",
+ Version: meta.Version("alpha"),
+ Service: "RegionHealthChecks",
}
- klog.V(5).Infof("GCEHttpHealthChecks.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaRegionHealthChecks.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEHttpHealthChecks.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaRegionHealthChecks.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.GA.HttpHealthChecks.Get(projectID, key.Name)
+ call := g.s.Alpha.RegionHealthChecks.Get(projectID, key.Region, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEHttpHealthChecks.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEAlphaRegionHealthChecks.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
-// List all HttpHealthCheck objects.
-func (g *GCEHttpHealthChecks) List(ctx context.Context, fl *filter.F) ([]*ga.HttpHealthCheck, error) {
- klog.V(5).Infof("GCEHttpHealthChecks.List(%v, %v) called", ctx, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "HttpHealthChecks")
+// List all HealthCheck objects.
+func (g *GCEAlphaRegionHealthChecks) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.HealthCheck, error) {
+ klog.V(5).Infof("GCEAlphaRegionHealthChecks.List(%v, %v, %v) called", ctx, region, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionHealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
- Version: meta.Version("ga"),
- Service: "HttpHealthChecks",
+ Version: meta.Version("alpha"),
+ Service: "RegionHealthChecks",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCEHttpHealthChecks.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
- call := g.s.GA.HttpHealthChecks.List(projectID)
+ klog.V(5).Infof("GCEAlphaRegionHealthChecks.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk)
+ call := g.s.Alpha.RegionHealthChecks.List(projectID, region)
if fl != filter.None {
call.Filter(fl.String())
}
- var all []*ga.HttpHealthCheck
- f := func(l *ga.HttpHealthCheckList) error {
- klog.V(5).Infof("GCEHttpHealthChecks.List(%v, ..., %v): page %+v", ctx, fl, l)
+ var all []*alpha.HealthCheck
+ f := func(l *alpha.HealthCheckList) error {
+ klog.V(5).Infof("GCEAlphaRegionHealthChecks.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEHttpHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEAlphaRegionHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEHttpHealthChecks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEAlphaRegionHealthChecks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEHttpHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEAlphaRegionHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
-// Insert HttpHealthCheck with key of value obj.
-func (g *GCEHttpHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *ga.HttpHealthCheck) error {
- klog.V(5).Infof("GCEHttpHealthChecks.Insert(%v, %v, %+v): called", ctx, key, obj)
+// Insert HealthCheck with key of value obj.
+func (g *GCEAlphaRegionHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *alpha.HealthCheck) error {
+ klog.V(5).Infof("GCEAlphaRegionHealthChecks.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEHttpHealthChecks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaRegionHealthChecks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "HttpHealthChecks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionHealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
- Version: meta.Version("ga"),
- Service: "HttpHealthChecks",
+ Version: meta.Version("alpha"),
+ Service: "RegionHealthChecks",
}
- klog.V(5).Infof("GCEHttpHealthChecks.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaRegionHealthChecks.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEHttpHealthChecks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaRegionHealthChecks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.GA.HttpHealthChecks.Insert(projectID, obj)
+ call := g.s.Alpha.RegionHealthChecks.Insert(projectID, key.Region, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEHttpHealthChecks.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaRegionHealthChecks.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEHttpHealthChecks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCEAlphaRegionHealthChecks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
-// Delete the HttpHealthCheck referenced by key.
-func (g *GCEHttpHealthChecks) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEHttpHealthChecks.Delete(%v, %v): called", ctx, key)
+// Delete the HealthCheck referenced by key.
+func (g *GCEAlphaRegionHealthChecks) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEAlphaRegionHealthChecks.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEHttpHealthChecks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaRegionHealthChecks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "HttpHealthChecks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionHealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
- Version: meta.Version("ga"),
- Service: "HttpHealthChecks",
+ Version: meta.Version("alpha"),
+ Service: "RegionHealthChecks",
}
- klog.V(5).Infof("GCEHttpHealthChecks.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaRegionHealthChecks.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEHttpHealthChecks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaRegionHealthChecks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.GA.HttpHealthChecks.Delete(projectID, key.Name)
-
+ call := g.s.Alpha.RegionHealthChecks.Delete(projectID, key.Region, key.Name)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEHttpHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaRegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEHttpHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaRegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// Update is a method on GCEHttpHealthChecks.
-func (g *GCEHttpHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *ga.HttpHealthCheck) error {
- klog.V(5).Infof("GCEHttpHealthChecks.Update(%v, %v, ...): called", ctx, key)
+// Update is a method on GCEAlphaRegionHealthChecks.
+func (g *GCEAlphaRegionHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *alpha.HealthCheck) error {
+ klog.V(5).Infof("GCEAlphaRegionHealthChecks.Update(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEHttpHealthChecks.Update(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaRegionHealthChecks.Update(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "HttpHealthChecks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionHealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Update",
- Version: meta.Version("ga"),
- Service: "HttpHealthChecks",
+ Version: meta.Version("alpha"),
+ Service: "RegionHealthChecks",
}
- klog.V(5).Infof("GCEHttpHealthChecks.Update(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaRegionHealthChecks.Update(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEHttpHealthChecks.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaRegionHealthChecks.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.GA.HttpHealthChecks.Update(projectID, key.Name, arg0)
+ call := g.s.Alpha.RegionHealthChecks.Update(projectID, key.Region, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEHttpHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaRegionHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEHttpHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaRegionHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// HttpsHealthChecks is an interface that allows for mocking of HttpsHealthChecks.
-type HttpsHealthChecks interface {
- Get(ctx context.Context, key *meta.Key) (*ga.HttpsHealthCheck, error)
- List(ctx context.Context, fl *filter.F) ([]*ga.HttpsHealthCheck, error)
- Insert(ctx context.Context, key *meta.Key, obj *ga.HttpsHealthCheck) error
+// BetaRegionHealthChecks is an interface that allows for mocking of RegionHealthChecks.
+type BetaRegionHealthChecks interface {
+ Get(ctx context.Context, key *meta.Key) (*beta.HealthCheck, error)
+ List(ctx context.Context, region string, fl *filter.F) ([]*beta.HealthCheck, error)
+ Insert(ctx context.Context, key *meta.Key, obj *beta.HealthCheck) error
Delete(ctx context.Context, key *meta.Key) error
- Update(context.Context, *meta.Key, *ga.HttpsHealthCheck) error
+ Update(context.Context, *meta.Key, *beta.HealthCheck) error
}
-// NewMockHttpsHealthChecks returns a new mock for HttpsHealthChecks.
-func NewMockHttpsHealthChecks(pr ProjectRouter, objs map[meta.Key]*MockHttpsHealthChecksObj) *MockHttpsHealthChecks {
- mock := &MockHttpsHealthChecks{
+// NewMockBetaRegionHealthChecks returns a new mock for RegionHealthChecks.
+func NewMockBetaRegionHealthChecks(pr ProjectRouter, objs map[meta.Key]*MockRegionHealthChecksObj) *MockBetaRegionHealthChecks {
+ mock := &MockBetaRegionHealthChecks{
ProjectRouter: pr,
Objects: objs,
@@ -12295,14 +12525,14 @@ func NewMockHttpsHealthChecks(pr ProjectRouter, objs map[meta.Key]*MockHttpsHeal
return mock
}
-// MockHttpsHealthChecks is the mock for HttpsHealthChecks.
-type MockHttpsHealthChecks struct {
+// MockBetaRegionHealthChecks is the mock for RegionHealthChecks.
+type MockBetaRegionHealthChecks struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
// Objects maintained by the mock.
- Objects map[meta.Key]*MockHttpsHealthChecksObj
+ Objects map[meta.Key]*MockRegionHealthChecksObj
// If an entry exists for the given key and operation, then the error
// will be returned instead of the operation.
@@ -12315,11 +12545,11 @@ type MockHttpsHealthChecks struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockHttpsHealthChecks) (bool, *ga.HttpsHealthCheck, error)
- ListHook func(ctx context.Context, fl *filter.F, m *MockHttpsHealthChecks) (bool, []*ga.HttpsHealthCheck, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *ga.HttpsHealthCheck, m *MockHttpsHealthChecks) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockHttpsHealthChecks) (bool, error)
- UpdateHook func(context.Context, *meta.Key, *ga.HttpsHealthCheck, *MockHttpsHealthChecks) error
+ GetHook func(ctx context.Context, key *meta.Key, m *MockBetaRegionHealthChecks) (bool, *beta.HealthCheck, error)
+ ListHook func(ctx context.Context, region string, fl *filter.F, m *MockBetaRegionHealthChecks) (bool, []*beta.HealthCheck, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *beta.HealthCheck, m *MockBetaRegionHealthChecks) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaRegionHealthChecks) (bool, error)
+ UpdateHook func(context.Context, *meta.Key, *beta.HealthCheck, *MockBetaRegionHealthChecks) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -12327,10 +12557,10 @@ type MockHttpsHealthChecks struct {
}
// Get returns the object from the mock.
-func (m *MockHttpsHealthChecks) Get(ctx context.Context, key *meta.Key) (*ga.HttpsHealthCheck, error) {
+func (m *MockBetaRegionHealthChecks) Get(ctx context.Context, key *meta.Key) (*beta.HealthCheck, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockHttpsHealthChecks.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaRegionHealthChecks.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -12342,28 +12572,28 @@ func (m *MockHttpsHealthChecks) Get(ctx context.Context, key *meta.Key) (*ga.Htt
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockHttpsHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaRegionHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
- typedObj := obj.ToGA()
- klog.V(5).Infof("MockHttpsHealthChecks.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ typedObj := obj.ToBeta()
+ klog.V(5).Infof("MockBetaRegionHealthChecks.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockHttpsHealthChecks %v not found", key),
+ Message: fmt.Sprintf("MockBetaRegionHealthChecks %v not found", key),
}
- klog.V(5).Infof("MockHttpsHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaRegionHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
-// List all of the objects in the mock.
-func (m *MockHttpsHealthChecks) List(ctx context.Context, fl *filter.F) ([]*ga.HttpsHealthCheck, error) {
+// List all of the objects in the mock in the given region.
+func (m *MockBetaRegionHealthChecks) List(ctx context.Context, region string, fl *filter.F) ([]*beta.HealthCheck, error) {
if m.ListHook != nil {
- if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
- klog.V(5).Infof("MockHttpsHealthChecks.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
+ if intercept, objs, err := m.ListHook(ctx, region, fl, m); intercept {
+ klog.V(5).Infof("MockBetaRegionHealthChecks.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err)
return objs, err
}
}
@@ -12373,28 +12603,31 @@ func (m *MockHttpsHealthChecks) List(ctx context.Context, fl *filter.F) ([]*ga.H
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockHttpsHealthChecks.List(%v, %v) = nil, %v", ctx, fl, err)
+ klog.V(5).Infof("MockBetaRegionHealthChecks.List(%v, %q, %v) = nil, %v", ctx, region, fl, err)
return nil, *m.ListError
}
- var objs []*ga.HttpsHealthCheck
- for _, obj := range m.Objects {
- if !fl.Match(obj.ToGA()) {
+ var objs []*beta.HealthCheck
+ for key, obj := range m.Objects {
+ if key.Region != region {
continue
}
- objs = append(objs, obj.ToGA())
+ if !fl.Match(obj.ToBeta()) {
+ continue
+ }
+ objs = append(objs, obj.ToBeta())
}
- klog.V(5).Infof("MockHttpsHealthChecks.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
+ klog.V(5).Infof("MockBetaRegionHealthChecks.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockHttpsHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *ga.HttpsHealthCheck) error {
+func (m *MockBetaRegionHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *beta.HealthCheck) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockHttpsHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaRegionHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -12406,32 +12639,32 @@ func (m *MockHttpsHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockHttpsHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaRegionHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockHttpsHealthChecks %v exists", key),
+ Message: fmt.Sprintf("MockBetaRegionHealthChecks %v exists", key),
}
- klog.V(5).Infof("MockHttpsHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaRegionHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "ga", "httpsHealthChecks")
- obj.SelfLink = SelfLink(meta.VersionGA, projectID, "httpsHealthChecks", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "beta", "healthChecks")
+ obj.SelfLink = SelfLink(meta.VersionBeta, projectID, "healthChecks", key)
- m.Objects[*key] = &MockHttpsHealthChecksObj{obj}
- klog.V(5).Infof("MockHttpsHealthChecks.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ m.Objects[*key] = &MockRegionHealthChecksObj{obj}
+ klog.V(5).Infof("MockBetaRegionHealthChecks.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockHttpsHealthChecks) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockBetaRegionHealthChecks) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockHttpsHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaRegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -12443,226 +12676,222 @@ func (m *MockHttpsHealthChecks) Delete(ctx context.Context, key *meta.Key) error
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockHttpsHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaRegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockHttpsHealthChecks %v not found", key),
+ Message: fmt.Sprintf("MockBetaRegionHealthChecks %v not found", key),
}
- klog.V(5).Infof("MockHttpsHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaRegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockHttpsHealthChecks.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockBetaRegionHealthChecks.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockHttpsHealthChecks) Obj(o *ga.HttpsHealthCheck) *MockHttpsHealthChecksObj {
- return &MockHttpsHealthChecksObj{o}
+func (m *MockBetaRegionHealthChecks) Obj(o *beta.HealthCheck) *MockRegionHealthChecksObj {
+ return &MockRegionHealthChecksObj{o}
}
// Update is a mock for the corresponding method.
-func (m *MockHttpsHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *ga.HttpsHealthCheck) error {
+func (m *MockBetaRegionHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *beta.HealthCheck) error {
if m.UpdateHook != nil {
return m.UpdateHook(ctx, key, arg0, m)
}
return nil
}
-// GCEHttpsHealthChecks is a simplifying adapter for the GCE HttpsHealthChecks.
-type GCEHttpsHealthChecks struct {
+// GCEBetaRegionHealthChecks is a simplifying adapter for the GCE RegionHealthChecks.
+type GCEBetaRegionHealthChecks struct {
s *Service
}
-// Get the HttpsHealthCheck named by key.
-func (g *GCEHttpsHealthChecks) Get(ctx context.Context, key *meta.Key) (*ga.HttpsHealthCheck, error) {
- klog.V(5).Infof("GCEHttpsHealthChecks.Get(%v, %v): called", ctx, key)
-
- if !key.Valid() {
- klog.V(2).Infof("GCEHttpsHealthChecks.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+// Get the HealthCheck named by key.
+func (g *GCEBetaRegionHealthChecks) Get(ctx context.Context, key *meta.Key) (*beta.HealthCheck, error) {
+ klog.V(5).Infof("GCEBetaRegionHealthChecks.Get(%v, %v): called", ctx, key)
+
+ if !key.Valid() {
+ klog.V(2).Infof("GCEBetaRegionHealthChecks.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "HttpsHealthChecks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionHealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
- Version: meta.Version("ga"),
- Service: "HttpsHealthChecks",
+ Version: meta.Version("beta"),
+ Service: "RegionHealthChecks",
}
- klog.V(5).Infof("GCEHttpsHealthChecks.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaRegionHealthChecks.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEHttpsHealthChecks.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionHealthChecks.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.GA.HttpsHealthChecks.Get(projectID, key.Name)
+ call := g.s.Beta.RegionHealthChecks.Get(projectID, key.Region, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEHttpsHealthChecks.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEBetaRegionHealthChecks.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
-// List all HttpsHealthCheck objects.
-func (g *GCEHttpsHealthChecks) List(ctx context.Context, fl *filter.F) ([]*ga.HttpsHealthCheck, error) {
- klog.V(5).Infof("GCEHttpsHealthChecks.List(%v, %v) called", ctx, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "HttpsHealthChecks")
+// List all HealthCheck objects.
+func (g *GCEBetaRegionHealthChecks) List(ctx context.Context, region string, fl *filter.F) ([]*beta.HealthCheck, error) {
+ klog.V(5).Infof("GCEBetaRegionHealthChecks.List(%v, %v, %v) called", ctx, region, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionHealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
- Version: meta.Version("ga"),
- Service: "HttpsHealthChecks",
+ Version: meta.Version("beta"),
+ Service: "RegionHealthChecks",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCEHttpsHealthChecks.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
- call := g.s.GA.HttpsHealthChecks.List(projectID)
+ klog.V(5).Infof("GCEBetaRegionHealthChecks.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk)
+ call := g.s.Beta.RegionHealthChecks.List(projectID, region)
if fl != filter.None {
call.Filter(fl.String())
}
- var all []*ga.HttpsHealthCheck
- f := func(l *ga.HttpsHealthCheckList) error {
- klog.V(5).Infof("GCEHttpsHealthChecks.List(%v, ..., %v): page %+v", ctx, fl, l)
+ var all []*beta.HealthCheck
+ f := func(l *beta.HealthCheckList) error {
+ klog.V(5).Infof("GCEBetaRegionHealthChecks.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEHttpsHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEBetaRegionHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEHttpsHealthChecks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEBetaRegionHealthChecks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEHttpsHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEBetaRegionHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
-// Insert HttpsHealthCheck with key of value obj.
-func (g *GCEHttpsHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *ga.HttpsHealthCheck) error {
- klog.V(5).Infof("GCEHttpsHealthChecks.Insert(%v, %v, %+v): called", ctx, key, obj)
+// Insert HealthCheck with key of value obj.
+func (g *GCEBetaRegionHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *beta.HealthCheck) error {
+ klog.V(5).Infof("GCEBetaRegionHealthChecks.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEHttpsHealthChecks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaRegionHealthChecks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "HttpsHealthChecks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionHealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
- Version: meta.Version("ga"),
- Service: "HttpsHealthChecks",
+ Version: meta.Version("beta"),
+ Service: "RegionHealthChecks",
}
- klog.V(5).Infof("GCEHttpsHealthChecks.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaRegionHealthChecks.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEHttpsHealthChecks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionHealthChecks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.GA.HttpsHealthChecks.Insert(projectID, obj)
+ call := g.s.Beta.RegionHealthChecks.Insert(projectID, key.Region, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEHttpsHealthChecks.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionHealthChecks.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEHttpsHealthChecks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCEBetaRegionHealthChecks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
-// Delete the HttpsHealthCheck referenced by key.
-func (g *GCEHttpsHealthChecks) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEHttpsHealthChecks.Delete(%v, %v): called", ctx, key)
+// Delete the HealthCheck referenced by key.
+func (g *GCEBetaRegionHealthChecks) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEBetaRegionHealthChecks.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEHttpsHealthChecks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaRegionHealthChecks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "HttpsHealthChecks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionHealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
- Version: meta.Version("ga"),
- Service: "HttpsHealthChecks",
+ Version: meta.Version("beta"),
+ Service: "RegionHealthChecks",
}
- klog.V(5).Infof("GCEHttpsHealthChecks.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaRegionHealthChecks.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEHttpsHealthChecks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionHealthChecks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.GA.HttpsHealthChecks.Delete(projectID, key.Name)
-
+ call := g.s.Beta.RegionHealthChecks.Delete(projectID, key.Region, key.Name)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEHttpsHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEHttpsHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// Update is a method on GCEHttpsHealthChecks.
-func (g *GCEHttpsHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *ga.HttpsHealthCheck) error {
- klog.V(5).Infof("GCEHttpsHealthChecks.Update(%v, %v, ...): called", ctx, key)
+// Update is a method on GCEBetaRegionHealthChecks.
+func (g *GCEBetaRegionHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *beta.HealthCheck) error {
+ klog.V(5).Infof("GCEBetaRegionHealthChecks.Update(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEHttpsHealthChecks.Update(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaRegionHealthChecks.Update(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "HttpsHealthChecks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionHealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Update",
- Version: meta.Version("ga"),
- Service: "HttpsHealthChecks",
+ Version: meta.Version("beta"),
+ Service: "RegionHealthChecks",
}
- klog.V(5).Infof("GCEHttpsHealthChecks.Update(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaRegionHealthChecks.Update(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEHttpsHealthChecks.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionHealthChecks.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.GA.HttpsHealthChecks.Update(projectID, key.Name, arg0)
+ call := g.s.Beta.RegionHealthChecks.Update(projectID, key.Region, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEHttpsHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEHttpsHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// InstanceGroups is an interface that allows for mocking of InstanceGroups.
-type InstanceGroups interface {
- Get(ctx context.Context, key *meta.Key) (*ga.InstanceGroup, error)
- List(ctx context.Context, zone string, fl *filter.F) ([]*ga.InstanceGroup, error)
- Insert(ctx context.Context, key *meta.Key, obj *ga.InstanceGroup) error
+// RegionHealthChecks is an interface that allows for mocking of RegionHealthChecks.
+type RegionHealthChecks interface {
+ Get(ctx context.Context, key *meta.Key) (*ga.HealthCheck, error)
+ List(ctx context.Context, region string, fl *filter.F) ([]*ga.HealthCheck, error)
+ Insert(ctx context.Context, key *meta.Key, obj *ga.HealthCheck) error
Delete(ctx context.Context, key *meta.Key) error
- AddInstances(context.Context, *meta.Key, *ga.InstanceGroupsAddInstancesRequest) error
- ListInstances(context.Context, *meta.Key, *ga.InstanceGroupsListInstancesRequest, *filter.F) ([]*ga.InstanceWithNamedPorts, error)
- RemoveInstances(context.Context, *meta.Key, *ga.InstanceGroupsRemoveInstancesRequest) error
- SetNamedPorts(context.Context, *meta.Key, *ga.InstanceGroupsSetNamedPortsRequest) error
+ Update(context.Context, *meta.Key, *ga.HealthCheck) error
}
-// NewMockInstanceGroups returns a new mock for InstanceGroups.
-func NewMockInstanceGroups(pr ProjectRouter, objs map[meta.Key]*MockInstanceGroupsObj) *MockInstanceGroups {
- mock := &MockInstanceGroups{
+// NewMockRegionHealthChecks returns a new mock for RegionHealthChecks.
+func NewMockRegionHealthChecks(pr ProjectRouter, objs map[meta.Key]*MockRegionHealthChecksObj) *MockRegionHealthChecks {
+ mock := &MockRegionHealthChecks{
ProjectRouter: pr,
Objects: objs,
@@ -12673,14 +12902,14 @@ func NewMockInstanceGroups(pr ProjectRouter, objs map[meta.Key]*MockInstanceGrou
return mock
}
-// MockInstanceGroups is the mock for InstanceGroups.
-type MockInstanceGroups struct {
+// MockRegionHealthChecks is the mock for RegionHealthChecks.
+type MockRegionHealthChecks struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
// Objects maintained by the mock.
- Objects map[meta.Key]*MockInstanceGroupsObj
+ Objects map[meta.Key]*MockRegionHealthChecksObj
// If an entry exists for the given key and operation, then the error
// will be returned instead of the operation.
@@ -12693,14 +12922,11 @@ type MockInstanceGroups struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockInstanceGroups) (bool, *ga.InstanceGroup, error)
- ListHook func(ctx context.Context, zone string, fl *filter.F, m *MockInstanceGroups) (bool, []*ga.InstanceGroup, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *ga.InstanceGroup, m *MockInstanceGroups) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockInstanceGroups) (bool, error)
- AddInstancesHook func(context.Context, *meta.Key, *ga.InstanceGroupsAddInstancesRequest, *MockInstanceGroups) error
- ListInstancesHook func(context.Context, *meta.Key, *ga.InstanceGroupsListInstancesRequest, *filter.F, *MockInstanceGroups) ([]*ga.InstanceWithNamedPorts, error)
- RemoveInstancesHook func(context.Context, *meta.Key, *ga.InstanceGroupsRemoveInstancesRequest, *MockInstanceGroups) error
- SetNamedPortsHook func(context.Context, *meta.Key, *ga.InstanceGroupsSetNamedPortsRequest, *MockInstanceGroups) error
+ GetHook func(ctx context.Context, key *meta.Key, m *MockRegionHealthChecks) (bool, *ga.HealthCheck, error)
+ ListHook func(ctx context.Context, region string, fl *filter.F, m *MockRegionHealthChecks) (bool, []*ga.HealthCheck, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *ga.HealthCheck, m *MockRegionHealthChecks) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockRegionHealthChecks) (bool, error)
+ UpdateHook func(context.Context, *meta.Key, *ga.HealthCheck, *MockRegionHealthChecks) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -12708,10 +12934,10 @@ type MockInstanceGroups struct {
}
// Get returns the object from the mock.
-func (m *MockInstanceGroups) Get(ctx context.Context, key *meta.Key) (*ga.InstanceGroup, error) {
+func (m *MockRegionHealthChecks) Get(ctx context.Context, key *meta.Key) (*ga.HealthCheck, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockInstanceGroups.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockRegionHealthChecks.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -12723,28 +12949,28 @@ func (m *MockInstanceGroups) Get(ctx context.Context, key *meta.Key) (*ga.Instan
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockInstanceGroups.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockRegionHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
typedObj := obj.ToGA()
- klog.V(5).Infof("MockInstanceGroups.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ klog.V(5).Infof("MockRegionHealthChecks.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockInstanceGroups %v not found", key),
+ Message: fmt.Sprintf("MockRegionHealthChecks %v not found", key),
}
- klog.V(5).Infof("MockInstanceGroups.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockRegionHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
-// List all of the objects in the mock in the given zone.
-func (m *MockInstanceGroups) List(ctx context.Context, zone string, fl *filter.F) ([]*ga.InstanceGroup, error) {
+// List all of the objects in the mock in the given region.
+func (m *MockRegionHealthChecks) List(ctx context.Context, region string, fl *filter.F) ([]*ga.HealthCheck, error) {
if m.ListHook != nil {
- if intercept, objs, err := m.ListHook(ctx, zone, fl, m); intercept {
- klog.V(5).Infof("MockInstanceGroups.List(%v, %q, %v) = [%v items], %v", ctx, zone, fl, len(objs), err)
+ if intercept, objs, err := m.ListHook(ctx, region, fl, m); intercept {
+ klog.V(5).Infof("MockRegionHealthChecks.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err)
return objs, err
}
}
@@ -12754,14 +12980,14 @@ func (m *MockInstanceGroups) List(ctx context.Context, zone string, fl *filter.F
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockInstanceGroups.List(%v, %q, %v) = nil, %v", ctx, zone, fl, err)
+ klog.V(5).Infof("MockRegionHealthChecks.List(%v, %q, %v) = nil, %v", ctx, region, fl, err)
return nil, *m.ListError
}
- var objs []*ga.InstanceGroup
+ var objs []*ga.HealthCheck
for key, obj := range m.Objects {
- if key.Zone != zone {
+ if key.Region != region {
continue
}
if !fl.Match(obj.ToGA()) {
@@ -12770,15 +12996,15 @@ func (m *MockInstanceGroups) List(ctx context.Context, zone string, fl *filter.F
objs = append(objs, obj.ToGA())
}
- klog.V(5).Infof("MockInstanceGroups.List(%v, %q, %v) = [%v items], nil", ctx, zone, fl, len(objs))
+ klog.V(5).Infof("MockRegionHealthChecks.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockInstanceGroups) Insert(ctx context.Context, key *meta.Key, obj *ga.InstanceGroup) error {
+func (m *MockRegionHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *ga.HealthCheck) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockInstanceGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockRegionHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -12790,32 +13016,32 @@ func (m *MockInstanceGroups) Insert(ctx context.Context, key *meta.Key, obj *ga.
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockInstanceGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockRegionHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockInstanceGroups %v exists", key),
+ Message: fmt.Sprintf("MockRegionHealthChecks %v exists", key),
}
- klog.V(5).Infof("MockInstanceGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockRegionHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "ga", "instanceGroups")
- obj.SelfLink = SelfLink(meta.VersionGA, projectID, "instanceGroups", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "ga", "healthChecks")
+ obj.SelfLink = SelfLink(meta.VersionGA, projectID, "healthChecks", key)
- m.Objects[*key] = &MockInstanceGroupsObj{obj}
- klog.V(5).Infof("MockInstanceGroups.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ m.Objects[*key] = &MockRegionHealthChecksObj{obj}
+ klog.V(5).Infof("MockRegionHealthChecks.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockInstanceGroups) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockRegionHealthChecks) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockInstanceGroups.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockRegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -12827,357 +13053,222 @@ func (m *MockInstanceGroups) Delete(ctx context.Context, key *meta.Key) error {
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockInstanceGroups.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockRegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockInstanceGroups %v not found", key),
+ Message: fmt.Sprintf("MockRegionHealthChecks %v not found", key),
}
- klog.V(5).Infof("MockInstanceGroups.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockRegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockInstanceGroups.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockRegionHealthChecks.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockInstanceGroups) Obj(o *ga.InstanceGroup) *MockInstanceGroupsObj {
- return &MockInstanceGroupsObj{o}
-}
-
-// AddInstances is a mock for the corresponding method.
-func (m *MockInstanceGroups) AddInstances(ctx context.Context, key *meta.Key, arg0 *ga.InstanceGroupsAddInstancesRequest) error {
- if m.AddInstancesHook != nil {
- return m.AddInstancesHook(ctx, key, arg0, m)
- }
- return nil
-}
-
-// ListInstances is a mock for the corresponding method.
-func (m *MockInstanceGroups) ListInstances(ctx context.Context, key *meta.Key, arg0 *ga.InstanceGroupsListInstancesRequest, fl *filter.F) ([]*ga.InstanceWithNamedPorts, error) {
- if m.ListInstancesHook != nil {
- return m.ListInstancesHook(ctx, key, arg0, fl, m)
- }
- return nil, nil
-}
-
-// RemoveInstances is a mock for the corresponding method.
-func (m *MockInstanceGroups) RemoveInstances(ctx context.Context, key *meta.Key, arg0 *ga.InstanceGroupsRemoveInstancesRequest) error {
- if m.RemoveInstancesHook != nil {
- return m.RemoveInstancesHook(ctx, key, arg0, m)
- }
- return nil
+func (m *MockRegionHealthChecks) Obj(o *ga.HealthCheck) *MockRegionHealthChecksObj {
+ return &MockRegionHealthChecksObj{o}
}
-// SetNamedPorts is a mock for the corresponding method.
-func (m *MockInstanceGroups) SetNamedPorts(ctx context.Context, key *meta.Key, arg0 *ga.InstanceGroupsSetNamedPortsRequest) error {
- if m.SetNamedPortsHook != nil {
- return m.SetNamedPortsHook(ctx, key, arg0, m)
+// Update is a mock for the corresponding method.
+func (m *MockRegionHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *ga.HealthCheck) error {
+ if m.UpdateHook != nil {
+ return m.UpdateHook(ctx, key, arg0, m)
}
return nil
}
-// GCEInstanceGroups is a simplifying adapter for the GCE InstanceGroups.
-type GCEInstanceGroups struct {
+// GCERegionHealthChecks is a simplifying adapter for the GCE RegionHealthChecks.
+type GCERegionHealthChecks struct {
s *Service
}
-// Get the InstanceGroup named by key.
-func (g *GCEInstanceGroups) Get(ctx context.Context, key *meta.Key) (*ga.InstanceGroup, error) {
- klog.V(5).Infof("GCEInstanceGroups.Get(%v, %v): called", ctx, key)
+// Get the HealthCheck named by key.
+func (g *GCERegionHealthChecks) Get(ctx context.Context, key *meta.Key) (*ga.HealthCheck, error) {
+ klog.V(5).Infof("GCERegionHealthChecks.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEInstanceGroups.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCERegionHealthChecks.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "InstanceGroups")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionHealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
Version: meta.Version("ga"),
- Service: "InstanceGroups",
+ Service: "RegionHealthChecks",
}
- klog.V(5).Infof("GCEInstanceGroups.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCERegionHealthChecks.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEInstanceGroups.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCERegionHealthChecks.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.GA.InstanceGroups.Get(projectID, key.Zone, key.Name)
+ call := g.s.GA.RegionHealthChecks.Get(projectID, key.Region, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEInstanceGroups.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCERegionHealthChecks.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
-// List all InstanceGroup objects.
-func (g *GCEInstanceGroups) List(ctx context.Context, zone string, fl *filter.F) ([]*ga.InstanceGroup, error) {
- klog.V(5).Infof("GCEInstanceGroups.List(%v, %v, %v) called", ctx, zone, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "InstanceGroups")
+// List all HealthCheck objects.
+func (g *GCERegionHealthChecks) List(ctx context.Context, region string, fl *filter.F) ([]*ga.HealthCheck, error) {
+ klog.V(5).Infof("GCERegionHealthChecks.List(%v, %v, %v) called", ctx, region, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionHealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
Version: meta.Version("ga"),
- Service: "InstanceGroups",
+ Service: "RegionHealthChecks",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCEInstanceGroups.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, zone, fl, projectID, rk)
- call := g.s.GA.InstanceGroups.List(projectID, zone)
+ klog.V(5).Infof("GCERegionHealthChecks.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk)
+ call := g.s.GA.RegionHealthChecks.List(projectID, region)
if fl != filter.None {
call.Filter(fl.String())
}
- var all []*ga.InstanceGroup
- f := func(l *ga.InstanceGroupList) error {
- klog.V(5).Infof("GCEInstanceGroups.List(%v, ..., %v): page %+v", ctx, fl, l)
+ var all []*ga.HealthCheck
+ f := func(l *ga.HealthCheckList) error {
+ klog.V(5).Infof("GCERegionHealthChecks.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEInstanceGroups.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCERegionHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEInstanceGroups.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCERegionHealthChecks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEInstanceGroups.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCERegionHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
-// Insert InstanceGroup with key of value obj.
-func (g *GCEInstanceGroups) Insert(ctx context.Context, key *meta.Key, obj *ga.InstanceGroup) error {
- klog.V(5).Infof("GCEInstanceGroups.Insert(%v, %v, %+v): called", ctx, key, obj)
+// Insert HealthCheck with key of value obj.
+func (g *GCERegionHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *ga.HealthCheck) error {
+ klog.V(5).Infof("GCERegionHealthChecks.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEInstanceGroups.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCERegionHealthChecks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "InstanceGroups")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionHealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
Version: meta.Version("ga"),
- Service: "InstanceGroups",
+ Service: "RegionHealthChecks",
}
- klog.V(5).Infof("GCEInstanceGroups.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCERegionHealthChecks.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEInstanceGroups.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCERegionHealthChecks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.GA.InstanceGroups.Insert(projectID, key.Zone, obj)
+ call := g.s.GA.RegionHealthChecks.Insert(projectID, key.Region, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEInstanceGroups.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCERegionHealthChecks.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEInstanceGroups.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCERegionHealthChecks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
-// Delete the InstanceGroup referenced by key.
-func (g *GCEInstanceGroups) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEInstanceGroups.Delete(%v, %v): called", ctx, key)
+// Delete the HealthCheck referenced by key.
+func (g *GCERegionHealthChecks) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCERegionHealthChecks.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEInstanceGroups.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCERegionHealthChecks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "InstanceGroups")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionHealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
Version: meta.Version("ga"),
- Service: "InstanceGroups",
+ Service: "RegionHealthChecks",
}
- klog.V(5).Infof("GCEInstanceGroups.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCERegionHealthChecks.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEInstanceGroups.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCERegionHealthChecks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.GA.InstanceGroups.Delete(projectID, key.Zone, key.Name)
+ call := g.s.GA.RegionHealthChecks.Delete(projectID, key.Region, key.Name)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEInstanceGroups.Delete(%v, %v) = %v", ctx, key, err)
- return err
- }
-
- err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEInstanceGroups.Delete(%v, %v) = %v", ctx, key, err)
- return err
-}
-
-// AddInstances is a method on GCEInstanceGroups.
-func (g *GCEInstanceGroups) AddInstances(ctx context.Context, key *meta.Key, arg0 *ga.InstanceGroupsAddInstancesRequest) error {
- klog.V(5).Infof("GCEInstanceGroups.AddInstances(%v, %v, ...): called", ctx, key)
-
- if !key.Valid() {
- klog.V(2).Infof("GCEInstanceGroups.AddInstances(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
- return fmt.Errorf("invalid GCE key (%+v)", key)
- }
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "InstanceGroups")
- rk := &RateLimitKey{
- ProjectID: projectID,
- Operation: "AddInstances",
- Version: meta.Version("ga"),
- Service: "InstanceGroups",
- }
- klog.V(5).Infof("GCEInstanceGroups.AddInstances(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
-
- if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEInstanceGroups.AddInstances(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
- return err
- }
- call := g.s.GA.InstanceGroups.AddInstances(projectID, key.Zone, key.Name, arg0)
- call.Context(ctx)
- op, err := call.Do()
- if err != nil {
- klog.V(4).Infof("GCEInstanceGroups.AddInstances(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCERegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
- err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEInstanceGroups.AddInstances(%v, %v, ...) = %+v", ctx, key, err)
- return err
-}
-
-// ListInstances is a method on GCEInstanceGroups.
-func (g *GCEInstanceGroups) ListInstances(ctx context.Context, key *meta.Key, arg0 *ga.InstanceGroupsListInstancesRequest, fl *filter.F) ([]*ga.InstanceWithNamedPorts, error) {
- klog.V(5).Infof("GCEInstanceGroups.ListInstances(%v, %v, ...): called", ctx, key)
-
- if !key.Valid() {
- klog.V(2).Infof("GCEInstanceGroups.ListInstances(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
- return nil, fmt.Errorf("invalid GCE key (%+v)", key)
- }
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "InstanceGroups")
- rk := &RateLimitKey{
- ProjectID: projectID,
- Operation: "ListInstances",
- Version: meta.Version("ga"),
- Service: "InstanceGroups",
- }
- klog.V(5).Infof("GCEInstanceGroups.ListInstances(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
-
- if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEInstanceGroups.ListInstances(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
- return nil, err
- }
- call := g.s.GA.InstanceGroups.ListInstances(projectID, key.Zone, key.Name, arg0)
- var all []*ga.InstanceWithNamedPorts
- f := func(l *ga.InstanceGroupsListInstances) error {
- klog.V(5).Infof("GCEInstanceGroups.ListInstances(%v, %v, ...): page %+v", ctx, key, l)
- all = append(all, l.Items...)
- return nil
- }
- if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEInstanceGroups.ListInstances(%v, %v, ...) = %v, %v", ctx, key, nil, err)
- return nil, err
- }
- if klog.V(4) {
- klog.V(4).Infof("GCEInstanceGroups.ListInstances(%v, %v, ...) = [%v items], %v", ctx, key, len(all), nil)
- } else if klog.V(5) {
- var asStr []string
- for _, o := range all {
- asStr = append(asStr, fmt.Sprintf("%+v", o))
- }
- klog.V(5).Infof("GCEInstanceGroups.ListInstances(%v, %v, ...) = %v, %v", ctx, key, asStr, nil)
- }
- return all, nil
-}
-
-// RemoveInstances is a method on GCEInstanceGroups.
-func (g *GCEInstanceGroups) RemoveInstances(ctx context.Context, key *meta.Key, arg0 *ga.InstanceGroupsRemoveInstancesRequest) error {
- klog.V(5).Infof("GCEInstanceGroups.RemoveInstances(%v, %v, ...): called", ctx, key)
-
- if !key.Valid() {
- klog.V(2).Infof("GCEInstanceGroups.RemoveInstances(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
- return fmt.Errorf("invalid GCE key (%+v)", key)
- }
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "InstanceGroups")
- rk := &RateLimitKey{
- ProjectID: projectID,
- Operation: "RemoveInstances",
- Version: meta.Version("ga"),
- Service: "InstanceGroups",
- }
- klog.V(5).Infof("GCEInstanceGroups.RemoveInstances(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
- if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEInstanceGroups.RemoveInstances(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
- return err
- }
- call := g.s.GA.InstanceGroups.RemoveInstances(projectID, key.Zone, key.Name, arg0)
- call.Context(ctx)
- op, err := call.Do()
- if err != nil {
- klog.V(4).Infof("GCEInstanceGroups.RemoveInstances(%v, %v, ...) = %+v", ctx, key, err)
- return err
- }
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEInstanceGroups.RemoveInstances(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCERegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// SetNamedPorts is a method on GCEInstanceGroups.
-func (g *GCEInstanceGroups) SetNamedPorts(ctx context.Context, key *meta.Key, arg0 *ga.InstanceGroupsSetNamedPortsRequest) error {
- klog.V(5).Infof("GCEInstanceGroups.SetNamedPorts(%v, %v, ...): called", ctx, key)
+// Update is a method on GCERegionHealthChecks.
+func (g *GCERegionHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *ga.HealthCheck) error {
+ klog.V(5).Infof("GCERegionHealthChecks.Update(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEInstanceGroups.SetNamedPorts(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCERegionHealthChecks.Update(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "InstanceGroups")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionHealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
- Operation: "SetNamedPorts",
+ Operation: "Update",
Version: meta.Version("ga"),
- Service: "InstanceGroups",
+ Service: "RegionHealthChecks",
}
- klog.V(5).Infof("GCEInstanceGroups.SetNamedPorts(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCERegionHealthChecks.Update(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEInstanceGroups.SetNamedPorts(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCERegionHealthChecks.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.GA.InstanceGroups.SetNamedPorts(projectID, key.Zone, key.Name, arg0)
+ call := g.s.GA.RegionHealthChecks.Update(projectID, key.Region, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEInstanceGroups.SetNamedPorts(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCERegionHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEInstanceGroups.SetNamedPorts(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCERegionHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// Instances is an interface that allows for mocking of Instances.
-type Instances interface {
- Get(ctx context.Context, key *meta.Key) (*ga.Instance, error)
- List(ctx context.Context, zone string, fl *filter.F) ([]*ga.Instance, error)
- Insert(ctx context.Context, key *meta.Key, obj *ga.Instance) error
+// HttpHealthChecks is an interface that allows for mocking of HttpHealthChecks.
+type HttpHealthChecks interface {
+ Get(ctx context.Context, key *meta.Key) (*ga.HttpHealthCheck, error)
+ List(ctx context.Context, fl *filter.F) ([]*ga.HttpHealthCheck, error)
+ Insert(ctx context.Context, key *meta.Key, obj *ga.HttpHealthCheck) error
Delete(ctx context.Context, key *meta.Key) error
- AttachDisk(context.Context, *meta.Key, *ga.AttachedDisk) error
- DetachDisk(context.Context, *meta.Key, string) error
+ Update(context.Context, *meta.Key, *ga.HttpHealthCheck) error
}
-// NewMockInstances returns a new mock for Instances.
-func NewMockInstances(pr ProjectRouter, objs map[meta.Key]*MockInstancesObj) *MockInstances {
- mock := &MockInstances{
+// NewMockHttpHealthChecks returns a new mock for HttpHealthChecks.
+func NewMockHttpHealthChecks(pr ProjectRouter, objs map[meta.Key]*MockHttpHealthChecksObj) *MockHttpHealthChecks {
+ mock := &MockHttpHealthChecks{
ProjectRouter: pr,
Objects: objs,
@@ -13188,14 +13279,14 @@ func NewMockInstances(pr ProjectRouter, objs map[meta.Key]*MockInstancesObj) *Mo
return mock
}
-// MockInstances is the mock for Instances.
-type MockInstances struct {
+// MockHttpHealthChecks is the mock for HttpHealthChecks.
+type MockHttpHealthChecks struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
// Objects maintained by the mock.
- Objects map[meta.Key]*MockInstancesObj
+ Objects map[meta.Key]*MockHttpHealthChecksObj
// If an entry exists for the given key and operation, then the error
// will be returned instead of the operation.
@@ -13208,12 +13299,11 @@ type MockInstances struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockInstances) (bool, *ga.Instance, error)
- ListHook func(ctx context.Context, zone string, fl *filter.F, m *MockInstances) (bool, []*ga.Instance, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *ga.Instance, m *MockInstances) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockInstances) (bool, error)
- AttachDiskHook func(context.Context, *meta.Key, *ga.AttachedDisk, *MockInstances) error
- DetachDiskHook func(context.Context, *meta.Key, string, *MockInstances) error
+ GetHook func(ctx context.Context, key *meta.Key, m *MockHttpHealthChecks) (bool, *ga.HttpHealthCheck, error)
+ ListHook func(ctx context.Context, fl *filter.F, m *MockHttpHealthChecks) (bool, []*ga.HttpHealthCheck, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *ga.HttpHealthCheck, m *MockHttpHealthChecks) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockHttpHealthChecks) (bool, error)
+ UpdateHook func(context.Context, *meta.Key, *ga.HttpHealthCheck, *MockHttpHealthChecks) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -13221,10 +13311,10 @@ type MockInstances struct {
}
// Get returns the object from the mock.
-func (m *MockInstances) Get(ctx context.Context, key *meta.Key) (*ga.Instance, error) {
+func (m *MockHttpHealthChecks) Get(ctx context.Context, key *meta.Key) (*ga.HttpHealthCheck, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockInstances.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockHttpHealthChecks.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -13236,28 +13326,28 @@ func (m *MockInstances) Get(ctx context.Context, key *meta.Key) (*ga.Instance, e
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockInstances.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockHttpHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
typedObj := obj.ToGA()
- klog.V(5).Infof("MockInstances.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ klog.V(5).Infof("MockHttpHealthChecks.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockInstances %v not found", key),
+ Message: fmt.Sprintf("MockHttpHealthChecks %v not found", key),
}
- klog.V(5).Infof("MockInstances.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockHttpHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
-// List all of the objects in the mock in the given zone.
-func (m *MockInstances) List(ctx context.Context, zone string, fl *filter.F) ([]*ga.Instance, error) {
+// List all of the objects in the mock.
+func (m *MockHttpHealthChecks) List(ctx context.Context, fl *filter.F) ([]*ga.HttpHealthCheck, error) {
if m.ListHook != nil {
- if intercept, objs, err := m.ListHook(ctx, zone, fl, m); intercept {
- klog.V(5).Infof("MockInstances.List(%v, %q, %v) = [%v items], %v", ctx, zone, fl, len(objs), err)
+ if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
+ klog.V(5).Infof("MockHttpHealthChecks.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
return objs, err
}
}
@@ -13267,31 +13357,28 @@ func (m *MockInstances) List(ctx context.Context, zone string, fl *filter.F) ([]
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockInstances.List(%v, %q, %v) = nil, %v", ctx, zone, fl, err)
+ klog.V(5).Infof("MockHttpHealthChecks.List(%v, %v) = nil, %v", ctx, fl, err)
return nil, *m.ListError
}
- var objs []*ga.Instance
- for key, obj := range m.Objects {
- if key.Zone != zone {
- continue
- }
+ var objs []*ga.HttpHealthCheck
+ for _, obj := range m.Objects {
if !fl.Match(obj.ToGA()) {
continue
}
objs = append(objs, obj.ToGA())
}
- klog.V(5).Infof("MockInstances.List(%v, %q, %v) = [%v items], nil", ctx, zone, fl, len(objs))
+ klog.V(5).Infof("MockHttpHealthChecks.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockInstances) Insert(ctx context.Context, key *meta.Key, obj *ga.Instance) error {
+func (m *MockHttpHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *ga.HttpHealthCheck) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockInstances.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockHttpHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -13303,32 +13390,32 @@ func (m *MockInstances) Insert(ctx context.Context, key *meta.Key, obj *ga.Insta
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockInstances.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockHttpHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockInstances %v exists", key),
+ Message: fmt.Sprintf("MockHttpHealthChecks %v exists", key),
}
- klog.V(5).Infof("MockInstances.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockHttpHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "ga", "instances")
- obj.SelfLink = SelfLink(meta.VersionGA, projectID, "instances", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "ga", "httpHealthChecks")
+ obj.SelfLink = SelfLink(meta.VersionGA, projectID, "httpHealthChecks", key)
- m.Objects[*key] = &MockInstancesObj{obj}
- klog.V(5).Infof("MockInstances.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ m.Objects[*key] = &MockHttpHealthChecksObj{obj}
+ klog.V(5).Infof("MockHttpHealthChecks.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockInstances) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockHttpHealthChecks) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockInstances.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockHttpHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -13340,265 +13427,223 @@ func (m *MockInstances) Delete(ctx context.Context, key *meta.Key) error {
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockInstances.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockHttpHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockInstances %v not found", key),
+ Message: fmt.Sprintf("MockHttpHealthChecks %v not found", key),
}
- klog.V(5).Infof("MockInstances.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockHttpHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockInstances.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockHttpHealthChecks.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockInstances) Obj(o *ga.Instance) *MockInstancesObj {
- return &MockInstancesObj{o}
+func (m *MockHttpHealthChecks) Obj(o *ga.HttpHealthCheck) *MockHttpHealthChecksObj {
+ return &MockHttpHealthChecksObj{o}
}
-// AttachDisk is a mock for the corresponding method.
-func (m *MockInstances) AttachDisk(ctx context.Context, key *meta.Key, arg0 *ga.AttachedDisk) error {
- if m.AttachDiskHook != nil {
- return m.AttachDiskHook(ctx, key, arg0, m)
+// Update is a mock for the corresponding method.
+func (m *MockHttpHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *ga.HttpHealthCheck) error {
+ if m.UpdateHook != nil {
+ return m.UpdateHook(ctx, key, arg0, m)
}
return nil
}
-// DetachDisk is a mock for the corresponding method.
-func (m *MockInstances) DetachDisk(ctx context.Context, key *meta.Key, arg0 string) error {
- if m.DetachDiskHook != nil {
- return m.DetachDiskHook(ctx, key, arg0, m)
- }
- return nil
-}
-
-// GCEInstances is a simplifying adapter for the GCE Instances.
-type GCEInstances struct {
+// GCEHttpHealthChecks is a simplifying adapter for the GCE HttpHealthChecks.
+type GCEHttpHealthChecks struct {
s *Service
}
-// Get the Instance named by key.
-func (g *GCEInstances) Get(ctx context.Context, key *meta.Key) (*ga.Instance, error) {
- klog.V(5).Infof("GCEInstances.Get(%v, %v): called", ctx, key)
+// Get the HttpHealthCheck named by key.
+func (g *GCEHttpHealthChecks) Get(ctx context.Context, key *meta.Key) (*ga.HttpHealthCheck, error) {
+ klog.V(5).Infof("GCEHttpHealthChecks.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEInstances.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEHttpHealthChecks.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Instances")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "HttpHealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
Version: meta.Version("ga"),
- Service: "Instances",
+ Service: "HttpHealthChecks",
}
- klog.V(5).Infof("GCEInstances.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEHttpHealthChecks.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEInstances.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEHttpHealthChecks.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.GA.Instances.Get(projectID, key.Zone, key.Name)
+ call := g.s.GA.HttpHealthChecks.Get(projectID, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEInstances.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEHttpHealthChecks.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
-// List all Instance objects.
-func (g *GCEInstances) List(ctx context.Context, zone string, fl *filter.F) ([]*ga.Instance, error) {
- klog.V(5).Infof("GCEInstances.List(%v, %v, %v) called", ctx, zone, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Instances")
+// List all HttpHealthCheck objects.
+func (g *GCEHttpHealthChecks) List(ctx context.Context, fl *filter.F) ([]*ga.HttpHealthCheck, error) {
+ klog.V(5).Infof("GCEHttpHealthChecks.List(%v, %v) called", ctx, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "HttpHealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
Version: meta.Version("ga"),
- Service: "Instances",
+ Service: "HttpHealthChecks",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCEInstances.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, zone, fl, projectID, rk)
- call := g.s.GA.Instances.List(projectID, zone)
+ klog.V(5).Infof("GCEHttpHealthChecks.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
+ call := g.s.GA.HttpHealthChecks.List(projectID)
if fl != filter.None {
call.Filter(fl.String())
}
- var all []*ga.Instance
- f := func(l *ga.InstanceList) error {
- klog.V(5).Infof("GCEInstances.List(%v, ..., %v): page %+v", ctx, fl, l)
+ var all []*ga.HttpHealthCheck
+ f := func(l *ga.HttpHealthCheckList) error {
+ klog.V(5).Infof("GCEHttpHealthChecks.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEInstances.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEHttpHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEInstances.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEHttpHealthChecks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEInstances.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEHttpHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
-// Insert Instance with key of value obj.
-func (g *GCEInstances) Insert(ctx context.Context, key *meta.Key, obj *ga.Instance) error {
- klog.V(5).Infof("GCEInstances.Insert(%v, %v, %+v): called", ctx, key, obj)
+// Insert HttpHealthCheck with key of value obj.
+func (g *GCEHttpHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *ga.HttpHealthCheck) error {
+ klog.V(5).Infof("GCEHttpHealthChecks.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEInstances.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEHttpHealthChecks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Instances")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "HttpHealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
Version: meta.Version("ga"),
- Service: "Instances",
+ Service: "HttpHealthChecks",
}
- klog.V(5).Infof("GCEInstances.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEHttpHealthChecks.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEInstances.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEHttpHealthChecks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.GA.Instances.Insert(projectID, key.Zone, obj)
+ call := g.s.GA.HttpHealthChecks.Insert(projectID, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEInstances.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEHttpHealthChecks.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEInstances.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCEHttpHealthChecks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
-// Delete the Instance referenced by key.
-func (g *GCEInstances) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEInstances.Delete(%v, %v): called", ctx, key)
+// Delete the HttpHealthCheck referenced by key.
+func (g *GCEHttpHealthChecks) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEHttpHealthChecks.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEInstances.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEHttpHealthChecks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Instances")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "HttpHealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
Version: meta.Version("ga"),
- Service: "Instances",
+ Service: "HttpHealthChecks",
}
- klog.V(5).Infof("GCEInstances.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEHttpHealthChecks.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEInstances.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEHttpHealthChecks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.GA.Instances.Delete(projectID, key.Zone, key.Name)
+ call := g.s.GA.HttpHealthChecks.Delete(projectID, key.Name)
+
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEInstances.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEHttpHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEInstances.Delete(%v, %v) = %v", ctx, key, err)
- return err
-}
-
-// AttachDisk is a method on GCEInstances.
-func (g *GCEInstances) AttachDisk(ctx context.Context, key *meta.Key, arg0 *ga.AttachedDisk) error {
- klog.V(5).Infof("GCEInstances.AttachDisk(%v, %v, ...): called", ctx, key)
-
- if !key.Valid() {
- klog.V(2).Infof("GCEInstances.AttachDisk(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
- return fmt.Errorf("invalid GCE key (%+v)", key)
- }
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Instances")
- rk := &RateLimitKey{
- ProjectID: projectID,
- Operation: "AttachDisk",
- Version: meta.Version("ga"),
- Service: "Instances",
- }
- klog.V(5).Infof("GCEInstances.AttachDisk(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
-
- if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEInstances.AttachDisk(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
- return err
- }
- call := g.s.GA.Instances.AttachDisk(projectID, key.Zone, key.Name, arg0)
- call.Context(ctx)
- op, err := call.Do()
- if err != nil {
- klog.V(4).Infof("GCEInstances.AttachDisk(%v, %v, ...) = %+v", ctx, key, err)
- return err
- }
- err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEInstances.AttachDisk(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEHttpHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// DetachDisk is a method on GCEInstances.
-func (g *GCEInstances) DetachDisk(ctx context.Context, key *meta.Key, arg0 string) error {
- klog.V(5).Infof("GCEInstances.DetachDisk(%v, %v, ...): called", ctx, key)
+// Update is a method on GCEHttpHealthChecks.
+func (g *GCEHttpHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *ga.HttpHealthCheck) error {
+ klog.V(5).Infof("GCEHttpHealthChecks.Update(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEInstances.DetachDisk(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEHttpHealthChecks.Update(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Instances")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "HttpHealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
- Operation: "DetachDisk",
+ Operation: "Update",
Version: meta.Version("ga"),
- Service: "Instances",
+ Service: "HttpHealthChecks",
}
- klog.V(5).Infof("GCEInstances.DetachDisk(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEHttpHealthChecks.Update(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEInstances.DetachDisk(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEHttpHealthChecks.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.GA.Instances.DetachDisk(projectID, key.Zone, key.Name, arg0)
+ call := g.s.GA.HttpHealthChecks.Update(projectID, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEInstances.DetachDisk(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEHttpHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEInstances.DetachDisk(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEHttpHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// BetaInstances is an interface that allows for mocking of Instances.
-type BetaInstances interface {
- Get(ctx context.Context, key *meta.Key) (*beta.Instance, error)
- List(ctx context.Context, zone string, fl *filter.F) ([]*beta.Instance, error)
- Insert(ctx context.Context, key *meta.Key, obj *beta.Instance) error
+// HttpsHealthChecks is an interface that allows for mocking of HttpsHealthChecks.
+type HttpsHealthChecks interface {
+ Get(ctx context.Context, key *meta.Key) (*ga.HttpsHealthCheck, error)
+ List(ctx context.Context, fl *filter.F) ([]*ga.HttpsHealthCheck, error)
+ Insert(ctx context.Context, key *meta.Key, obj *ga.HttpsHealthCheck) error
Delete(ctx context.Context, key *meta.Key) error
- AttachDisk(context.Context, *meta.Key, *beta.AttachedDisk) error
- DetachDisk(context.Context, *meta.Key, string) error
- UpdateNetworkInterface(context.Context, *meta.Key, string, *beta.NetworkInterface) error
+ Update(context.Context, *meta.Key, *ga.HttpsHealthCheck) error
}
-// NewMockBetaInstances returns a new mock for Instances.
-func NewMockBetaInstances(pr ProjectRouter, objs map[meta.Key]*MockInstancesObj) *MockBetaInstances {
- mock := &MockBetaInstances{
+// NewMockHttpsHealthChecks returns a new mock for HttpsHealthChecks.
+func NewMockHttpsHealthChecks(pr ProjectRouter, objs map[meta.Key]*MockHttpsHealthChecksObj) *MockHttpsHealthChecks {
+ mock := &MockHttpsHealthChecks{
ProjectRouter: pr,
Objects: objs,
@@ -13609,14 +13654,14 @@ func NewMockBetaInstances(pr ProjectRouter, objs map[meta.Key]*MockInstancesObj)
return mock
}
-// MockBetaInstances is the mock for Instances.
-type MockBetaInstances struct {
+// MockHttpsHealthChecks is the mock for HttpsHealthChecks.
+type MockHttpsHealthChecks struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
// Objects maintained by the mock.
- Objects map[meta.Key]*MockInstancesObj
+ Objects map[meta.Key]*MockHttpsHealthChecksObj
// If an entry exists for the given key and operation, then the error
// will be returned instead of the operation.
@@ -13629,13 +13674,11 @@ type MockBetaInstances struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockBetaInstances) (bool, *beta.Instance, error)
- ListHook func(ctx context.Context, zone string, fl *filter.F, m *MockBetaInstances) (bool, []*beta.Instance, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *beta.Instance, m *MockBetaInstances) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaInstances) (bool, error)
- AttachDiskHook func(context.Context, *meta.Key, *beta.AttachedDisk, *MockBetaInstances) error
- DetachDiskHook func(context.Context, *meta.Key, string, *MockBetaInstances) error
- UpdateNetworkInterfaceHook func(context.Context, *meta.Key, string, *beta.NetworkInterface, *MockBetaInstances) error
+ GetHook func(ctx context.Context, key *meta.Key, m *MockHttpsHealthChecks) (bool, *ga.HttpsHealthCheck, error)
+ ListHook func(ctx context.Context, fl *filter.F, m *MockHttpsHealthChecks) (bool, []*ga.HttpsHealthCheck, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *ga.HttpsHealthCheck, m *MockHttpsHealthChecks) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockHttpsHealthChecks) (bool, error)
+ UpdateHook func(context.Context, *meta.Key, *ga.HttpsHealthCheck, *MockHttpsHealthChecks) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -13643,10 +13686,10 @@ type MockBetaInstances struct {
}
// Get returns the object from the mock.
-func (m *MockBetaInstances) Get(ctx context.Context, key *meta.Key) (*beta.Instance, error) {
+func (m *MockHttpsHealthChecks) Get(ctx context.Context, key *meta.Key) (*ga.HttpsHealthCheck, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockBetaInstances.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockHttpsHealthChecks.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -13658,28 +13701,28 @@ func (m *MockBetaInstances) Get(ctx context.Context, key *meta.Key) (*beta.Insta
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockBetaInstances.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockHttpsHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
- typedObj := obj.ToBeta()
- klog.V(5).Infof("MockBetaInstances.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ typedObj := obj.ToGA()
+ klog.V(5).Infof("MockHttpsHealthChecks.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockBetaInstances %v not found", key),
+ Message: fmt.Sprintf("MockHttpsHealthChecks %v not found", key),
}
- klog.V(5).Infof("MockBetaInstances.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockHttpsHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
-// List all of the objects in the mock in the given zone.
-func (m *MockBetaInstances) List(ctx context.Context, zone string, fl *filter.F) ([]*beta.Instance, error) {
+// List all of the objects in the mock.
+func (m *MockHttpsHealthChecks) List(ctx context.Context, fl *filter.F) ([]*ga.HttpsHealthCheck, error) {
if m.ListHook != nil {
- if intercept, objs, err := m.ListHook(ctx, zone, fl, m); intercept {
- klog.V(5).Infof("MockBetaInstances.List(%v, %q, %v) = [%v items], %v", ctx, zone, fl, len(objs), err)
+ if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
+ klog.V(5).Infof("MockHttpsHealthChecks.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
return objs, err
}
}
@@ -13689,31 +13732,28 @@ func (m *MockBetaInstances) List(ctx context.Context, zone string, fl *filter.F)
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockBetaInstances.List(%v, %q, %v) = nil, %v", ctx, zone, fl, err)
+ klog.V(5).Infof("MockHttpsHealthChecks.List(%v, %v) = nil, %v", ctx, fl, err)
return nil, *m.ListError
}
- var objs []*beta.Instance
- for key, obj := range m.Objects {
- if key.Zone != zone {
- continue
- }
- if !fl.Match(obj.ToBeta()) {
+ var objs []*ga.HttpsHealthCheck
+ for _, obj := range m.Objects {
+ if !fl.Match(obj.ToGA()) {
continue
}
- objs = append(objs, obj.ToBeta())
+ objs = append(objs, obj.ToGA())
}
- klog.V(5).Infof("MockBetaInstances.List(%v, %q, %v) = [%v items], nil", ctx, zone, fl, len(objs))
+ klog.V(5).Infof("MockHttpsHealthChecks.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockBetaInstances) Insert(ctx context.Context, key *meta.Key, obj *beta.Instance) error {
+func (m *MockHttpsHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *ga.HttpsHealthCheck) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockBetaInstances.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockHttpsHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -13725,32 +13765,32 @@ func (m *MockBetaInstances) Insert(ctx context.Context, key *meta.Key, obj *beta
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockBetaInstances.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockHttpsHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockBetaInstances %v exists", key),
+ Message: fmt.Sprintf("MockHttpsHealthChecks %v exists", key),
}
- klog.V(5).Infof("MockBetaInstances.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockHttpsHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "beta", "instances")
- obj.SelfLink = SelfLink(meta.VersionBeta, projectID, "instances", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "ga", "httpsHealthChecks")
+ obj.SelfLink = SelfLink(meta.VersionGA, projectID, "httpsHealthChecks", key)
- m.Objects[*key] = &MockInstancesObj{obj}
- klog.V(5).Infof("MockBetaInstances.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ m.Objects[*key] = &MockHttpsHealthChecksObj{obj}
+ klog.V(5).Infof("MockHttpsHealthChecks.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockBetaInstances) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockHttpsHealthChecks) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockBetaInstances.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockHttpsHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -13762,306 +13802,226 @@ func (m *MockBetaInstances) Delete(ctx context.Context, key *meta.Key) error {
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockBetaInstances.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockHttpsHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockBetaInstances %v not found", key),
+ Message: fmt.Sprintf("MockHttpsHealthChecks %v not found", key),
}
- klog.V(5).Infof("MockBetaInstances.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockHttpsHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockBetaInstances.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockHttpsHealthChecks.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockBetaInstances) Obj(o *beta.Instance) *MockInstancesObj {
- return &MockInstancesObj{o}
-}
-
-// AttachDisk is a mock for the corresponding method.
-func (m *MockBetaInstances) AttachDisk(ctx context.Context, key *meta.Key, arg0 *beta.AttachedDisk) error {
- if m.AttachDiskHook != nil {
- return m.AttachDiskHook(ctx, key, arg0, m)
- }
- return nil
-}
-
-// DetachDisk is a mock for the corresponding method.
-func (m *MockBetaInstances) DetachDisk(ctx context.Context, key *meta.Key, arg0 string) error {
- if m.DetachDiskHook != nil {
- return m.DetachDiskHook(ctx, key, arg0, m)
- }
- return nil
+func (m *MockHttpsHealthChecks) Obj(o *ga.HttpsHealthCheck) *MockHttpsHealthChecksObj {
+ return &MockHttpsHealthChecksObj{o}
}
-// UpdateNetworkInterface is a mock for the corresponding method.
-func (m *MockBetaInstances) UpdateNetworkInterface(ctx context.Context, key *meta.Key, arg0 string, arg1 *beta.NetworkInterface) error {
- if m.UpdateNetworkInterfaceHook != nil {
- return m.UpdateNetworkInterfaceHook(ctx, key, arg0, arg1, m)
+// Update is a mock for the corresponding method.
+func (m *MockHttpsHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *ga.HttpsHealthCheck) error {
+ if m.UpdateHook != nil {
+ return m.UpdateHook(ctx, key, arg0, m)
}
return nil
}
-// GCEBetaInstances is a simplifying adapter for the GCE Instances.
-type GCEBetaInstances struct {
+// GCEHttpsHealthChecks is a simplifying adapter for the GCE HttpsHealthChecks.
+type GCEHttpsHealthChecks struct {
s *Service
}
-// Get the Instance named by key.
-func (g *GCEBetaInstances) Get(ctx context.Context, key *meta.Key) (*beta.Instance, error) {
- klog.V(5).Infof("GCEBetaInstances.Get(%v, %v): called", ctx, key)
+// Get the HttpsHealthCheck named by key.
+func (g *GCEHttpsHealthChecks) Get(ctx context.Context, key *meta.Key) (*ga.HttpsHealthCheck, error) {
+ klog.V(5).Infof("GCEHttpsHealthChecks.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaInstances.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEHttpsHealthChecks.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Instances")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "HttpsHealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
- Version: meta.Version("beta"),
- Service: "Instances",
+ Version: meta.Version("ga"),
+ Service: "HttpsHealthChecks",
}
- klog.V(5).Infof("GCEBetaInstances.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEHttpsHealthChecks.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaInstances.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEHttpsHealthChecks.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.Beta.Instances.Get(projectID, key.Zone, key.Name)
+ call := g.s.GA.HttpsHealthChecks.Get(projectID, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEBetaInstances.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEHttpsHealthChecks.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
-// List all Instance objects.
-func (g *GCEBetaInstances) List(ctx context.Context, zone string, fl *filter.F) ([]*beta.Instance, error) {
- klog.V(5).Infof("GCEBetaInstances.List(%v, %v, %v) called", ctx, zone, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Instances")
+// List all HttpsHealthCheck objects.
+func (g *GCEHttpsHealthChecks) List(ctx context.Context, fl *filter.F) ([]*ga.HttpsHealthCheck, error) {
+ klog.V(5).Infof("GCEHttpsHealthChecks.List(%v, %v) called", ctx, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "HttpsHealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
- Version: meta.Version("beta"),
- Service: "Instances",
+ Version: meta.Version("ga"),
+ Service: "HttpsHealthChecks",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCEBetaInstances.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, zone, fl, projectID, rk)
- call := g.s.Beta.Instances.List(projectID, zone)
+ klog.V(5).Infof("GCEHttpsHealthChecks.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
+ call := g.s.GA.HttpsHealthChecks.List(projectID)
if fl != filter.None {
call.Filter(fl.String())
}
- var all []*beta.Instance
- f := func(l *beta.InstanceList) error {
- klog.V(5).Infof("GCEBetaInstances.List(%v, ..., %v): page %+v", ctx, fl, l)
+ var all []*ga.HttpsHealthCheck
+ f := func(l *ga.HttpsHealthCheckList) error {
+ klog.V(5).Infof("GCEHttpsHealthChecks.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEBetaInstances.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEHttpsHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEBetaInstances.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEHttpsHealthChecks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEBetaInstances.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEHttpsHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
-// Insert Instance with key of value obj.
-func (g *GCEBetaInstances) Insert(ctx context.Context, key *meta.Key, obj *beta.Instance) error {
- klog.V(5).Infof("GCEBetaInstances.Insert(%v, %v, %+v): called", ctx, key, obj)
+// Insert HttpsHealthCheck with key of value obj.
+func (g *GCEHttpsHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *ga.HttpsHealthCheck) error {
+ klog.V(5).Infof("GCEHttpsHealthChecks.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaInstances.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEHttpsHealthChecks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Instances")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "HttpsHealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
- Version: meta.Version("beta"),
- Service: "Instances",
+ Version: meta.Version("ga"),
+ Service: "HttpsHealthChecks",
}
- klog.V(5).Infof("GCEBetaInstances.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEHttpsHealthChecks.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaInstances.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEHttpsHealthChecks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.Beta.Instances.Insert(projectID, key.Zone, obj)
+ call := g.s.GA.HttpsHealthChecks.Insert(projectID, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaInstances.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEHttpsHealthChecks.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaInstances.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCEHttpsHealthChecks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
-// Delete the Instance referenced by key.
-func (g *GCEBetaInstances) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEBetaInstances.Delete(%v, %v): called", ctx, key)
+// Delete the HttpsHealthCheck referenced by key.
+func (g *GCEHttpsHealthChecks) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEHttpsHealthChecks.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaInstances.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEHttpsHealthChecks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Instances")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "HttpsHealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
- Version: meta.Version("beta"),
- Service: "Instances",
+ Version: meta.Version("ga"),
+ Service: "HttpsHealthChecks",
}
- klog.V(5).Infof("GCEBetaInstances.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEHttpsHealthChecks.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaInstances.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
- return err
- }
- call := g.s.Beta.Instances.Delete(projectID, key.Zone, key.Name)
- call.Context(ctx)
-
- op, err := call.Do()
- if err != nil {
- klog.V(4).Infof("GCEBetaInstances.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEHttpsHealthChecks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
+ call := g.s.GA.HttpsHealthChecks.Delete(projectID, key.Name)
- err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaInstances.Delete(%v, %v) = %v", ctx, key, err)
- return err
-}
-
-// AttachDisk is a method on GCEBetaInstances.
-func (g *GCEBetaInstances) AttachDisk(ctx context.Context, key *meta.Key, arg0 *beta.AttachedDisk) error {
- klog.V(5).Infof("GCEBetaInstances.AttachDisk(%v, %v, ...): called", ctx, key)
-
- if !key.Valid() {
- klog.V(2).Infof("GCEBetaInstances.AttachDisk(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
- return fmt.Errorf("invalid GCE key (%+v)", key)
- }
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Instances")
- rk := &RateLimitKey{
- ProjectID: projectID,
- Operation: "AttachDisk",
- Version: meta.Version("beta"),
- Service: "Instances",
- }
- klog.V(5).Infof("GCEBetaInstances.AttachDisk(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
-
- if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaInstances.AttachDisk(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
- return err
- }
- call := g.s.Beta.Instances.AttachDisk(projectID, key.Zone, key.Name, arg0)
call.Context(ctx)
- op, err := call.Do()
- if err != nil {
- klog.V(4).Infof("GCEBetaInstances.AttachDisk(%v, %v, ...) = %+v", ctx, key, err)
- return err
- }
- err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaInstances.AttachDisk(%v, %v, ...) = %+v", ctx, key, err)
- return err
-}
-
-// DetachDisk is a method on GCEBetaInstances.
-func (g *GCEBetaInstances) DetachDisk(ctx context.Context, key *meta.Key, arg0 string) error {
- klog.V(5).Infof("GCEBetaInstances.DetachDisk(%v, %v, ...): called", ctx, key)
-
- if !key.Valid() {
- klog.V(2).Infof("GCEBetaInstances.DetachDisk(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
- return fmt.Errorf("invalid GCE key (%+v)", key)
- }
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Instances")
- rk := &RateLimitKey{
- ProjectID: projectID,
- Operation: "DetachDisk",
- Version: meta.Version("beta"),
- Service: "Instances",
- }
- klog.V(5).Infof("GCEBetaInstances.DetachDisk(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
- if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaInstances.DetachDisk(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
- return err
- }
- call := g.s.Beta.Instances.DetachDisk(projectID, key.Zone, key.Name, arg0)
- call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaInstances.DetachDisk(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEHttpsHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
+
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaInstances.DetachDisk(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEHttpsHealthChecks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// UpdateNetworkInterface is a method on GCEBetaInstances.
-func (g *GCEBetaInstances) UpdateNetworkInterface(ctx context.Context, key *meta.Key, arg0 string, arg1 *beta.NetworkInterface) error {
- klog.V(5).Infof("GCEBetaInstances.UpdateNetworkInterface(%v, %v, ...): called", ctx, key)
+// Update is a method on GCEHttpsHealthChecks.
+func (g *GCEHttpsHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *ga.HttpsHealthCheck) error {
+ klog.V(5).Infof("GCEHttpsHealthChecks.Update(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaInstances.UpdateNetworkInterface(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEHttpsHealthChecks.Update(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Instances")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "HttpsHealthChecks")
rk := &RateLimitKey{
ProjectID: projectID,
- Operation: "UpdateNetworkInterface",
- Version: meta.Version("beta"),
- Service: "Instances",
+ Operation: "Update",
+ Version: meta.Version("ga"),
+ Service: "HttpsHealthChecks",
}
- klog.V(5).Infof("GCEBetaInstances.UpdateNetworkInterface(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEHttpsHealthChecks.Update(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaInstances.UpdateNetworkInterface(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEHttpsHealthChecks.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Beta.Instances.UpdateNetworkInterface(projectID, key.Zone, key.Name, arg0, arg1)
+ call := g.s.GA.HttpsHealthChecks.Update(projectID, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaInstances.UpdateNetworkInterface(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEHttpsHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaInstances.UpdateNetworkInterface(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEHttpsHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// AlphaInstances is an interface that allows for mocking of Instances.
-type AlphaInstances interface {
- Get(ctx context.Context, key *meta.Key) (*alpha.Instance, error)
- List(ctx context.Context, zone string, fl *filter.F) ([]*alpha.Instance, error)
- Insert(ctx context.Context, key *meta.Key, obj *alpha.Instance) error
+// InstanceGroups is an interface that allows for mocking of InstanceGroups.
+type InstanceGroups interface {
+ Get(ctx context.Context, key *meta.Key) (*ga.InstanceGroup, error)
+ List(ctx context.Context, zone string, fl *filter.F) ([]*ga.InstanceGroup, error)
+ Insert(ctx context.Context, key *meta.Key, obj *ga.InstanceGroup) error
Delete(ctx context.Context, key *meta.Key) error
- AttachDisk(context.Context, *meta.Key, *alpha.AttachedDisk) error
- DetachDisk(context.Context, *meta.Key, string) error
- UpdateNetworkInterface(context.Context, *meta.Key, string, *alpha.NetworkInterface) error
+ AddInstances(context.Context, *meta.Key, *ga.InstanceGroupsAddInstancesRequest) error
+ ListInstances(context.Context, *meta.Key, *ga.InstanceGroupsListInstancesRequest, *filter.F) ([]*ga.InstanceWithNamedPorts, error)
+ RemoveInstances(context.Context, *meta.Key, *ga.InstanceGroupsRemoveInstancesRequest) error
+ SetNamedPorts(context.Context, *meta.Key, *ga.InstanceGroupsSetNamedPortsRequest) error
}
-// NewMockAlphaInstances returns a new mock for Instances.
-func NewMockAlphaInstances(pr ProjectRouter, objs map[meta.Key]*MockInstancesObj) *MockAlphaInstances {
- mock := &MockAlphaInstances{
+// NewMockInstanceGroups returns a new mock for InstanceGroups.
+func NewMockInstanceGroups(pr ProjectRouter, objs map[meta.Key]*MockInstanceGroupsObj) *MockInstanceGroups {
+ mock := &MockInstanceGroups{
ProjectRouter: pr,
Objects: objs,
@@ -14072,14 +14032,14 @@ func NewMockAlphaInstances(pr ProjectRouter, objs map[meta.Key]*MockInstancesObj
return mock
}
-// MockAlphaInstances is the mock for Instances.
-type MockAlphaInstances struct {
+// MockInstanceGroups is the mock for InstanceGroups.
+type MockInstanceGroups struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
// Objects maintained by the mock.
- Objects map[meta.Key]*MockInstancesObj
+ Objects map[meta.Key]*MockInstanceGroupsObj
// If an entry exists for the given key and operation, then the error
// will be returned instead of the operation.
@@ -14092,13 +14052,14 @@ type MockAlphaInstances struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaInstances) (bool, *alpha.Instance, error)
- ListHook func(ctx context.Context, zone string, fl *filter.F, m *MockAlphaInstances) (bool, []*alpha.Instance, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *alpha.Instance, m *MockAlphaInstances) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaInstances) (bool, error)
- AttachDiskHook func(context.Context, *meta.Key, *alpha.AttachedDisk, *MockAlphaInstances) error
- DetachDiskHook func(context.Context, *meta.Key, string, *MockAlphaInstances) error
- UpdateNetworkInterfaceHook func(context.Context, *meta.Key, string, *alpha.NetworkInterface, *MockAlphaInstances) error
+ GetHook func(ctx context.Context, key *meta.Key, m *MockInstanceGroups) (bool, *ga.InstanceGroup, error)
+ ListHook func(ctx context.Context, zone string, fl *filter.F, m *MockInstanceGroups) (bool, []*ga.InstanceGroup, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *ga.InstanceGroup, m *MockInstanceGroups) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockInstanceGroups) (bool, error)
+ AddInstancesHook func(context.Context, *meta.Key, *ga.InstanceGroupsAddInstancesRequest, *MockInstanceGroups) error
+ ListInstancesHook func(context.Context, *meta.Key, *ga.InstanceGroupsListInstancesRequest, *filter.F, *MockInstanceGroups) ([]*ga.InstanceWithNamedPorts, error)
+ RemoveInstancesHook func(context.Context, *meta.Key, *ga.InstanceGroupsRemoveInstancesRequest, *MockInstanceGroups) error
+ SetNamedPortsHook func(context.Context, *meta.Key, *ga.InstanceGroupsSetNamedPortsRequest, *MockInstanceGroups) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -14106,10 +14067,10 @@ type MockAlphaInstances struct {
}
// Get returns the object from the mock.
-func (m *MockAlphaInstances) Get(ctx context.Context, key *meta.Key) (*alpha.Instance, error) {
+func (m *MockInstanceGroups) Get(ctx context.Context, key *meta.Key) (*ga.InstanceGroup, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockAlphaInstances.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockInstanceGroups.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -14121,28 +14082,28 @@ func (m *MockAlphaInstances) Get(ctx context.Context, key *meta.Key) (*alpha.Ins
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockAlphaInstances.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockInstanceGroups.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
- typedObj := obj.ToAlpha()
- klog.V(5).Infof("MockAlphaInstances.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ typedObj := obj.ToGA()
+ klog.V(5).Infof("MockInstanceGroups.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockAlphaInstances %v not found", key),
+ Message: fmt.Sprintf("MockInstanceGroups %v not found", key),
}
- klog.V(5).Infof("MockAlphaInstances.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockInstanceGroups.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
// List all of the objects in the mock in the given zone.
-func (m *MockAlphaInstances) List(ctx context.Context, zone string, fl *filter.F) ([]*alpha.Instance, error) {
+func (m *MockInstanceGroups) List(ctx context.Context, zone string, fl *filter.F) ([]*ga.InstanceGroup, error) {
if m.ListHook != nil {
if intercept, objs, err := m.ListHook(ctx, zone, fl, m); intercept {
- klog.V(5).Infof("MockAlphaInstances.List(%v, %q, %v) = [%v items], %v", ctx, zone, fl, len(objs), err)
+ klog.V(5).Infof("MockInstanceGroups.List(%v, %q, %v) = [%v items], %v", ctx, zone, fl, len(objs), err)
return objs, err
}
}
@@ -14152,31 +14113,31 @@ func (m *MockAlphaInstances) List(ctx context.Context, zone string, fl *filter.F
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockAlphaInstances.List(%v, %q, %v) = nil, %v", ctx, zone, fl, err)
+ klog.V(5).Infof("MockInstanceGroups.List(%v, %q, %v) = nil, %v", ctx, zone, fl, err)
return nil, *m.ListError
}
- var objs []*alpha.Instance
+ var objs []*ga.InstanceGroup
for key, obj := range m.Objects {
if key.Zone != zone {
continue
}
- if !fl.Match(obj.ToAlpha()) {
+ if !fl.Match(obj.ToGA()) {
continue
}
- objs = append(objs, obj.ToAlpha())
+ objs = append(objs, obj.ToGA())
}
- klog.V(5).Infof("MockAlphaInstances.List(%v, %q, %v) = [%v items], nil", ctx, zone, fl, len(objs))
+ klog.V(5).Infof("MockInstanceGroups.List(%v, %q, %v) = [%v items], nil", ctx, zone, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockAlphaInstances) Insert(ctx context.Context, key *meta.Key, obj *alpha.Instance) error {
+func (m *MockInstanceGroups) Insert(ctx context.Context, key *meta.Key, obj *ga.InstanceGroup) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockAlphaInstances.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockInstanceGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -14188,32 +14149,32 @@ func (m *MockAlphaInstances) Insert(ctx context.Context, key *meta.Key, obj *alp
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockAlphaInstances.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockInstanceGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockAlphaInstances %v exists", key),
+ Message: fmt.Sprintf("MockInstanceGroups %v exists", key),
}
- klog.V(5).Infof("MockAlphaInstances.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockInstanceGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "instances")
- obj.SelfLink = SelfLink(meta.VersionAlpha, projectID, "instances", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "ga", "instanceGroups")
+ obj.SelfLink = SelfLink(meta.VersionGA, projectID, "instanceGroups", key)
- m.Objects[*key] = &MockInstancesObj{obj}
- klog.V(5).Infof("MockAlphaInstances.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ m.Objects[*key] = &MockInstanceGroupsObj{obj}
+ klog.V(5).Infof("MockInstanceGroups.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockAlphaInstances) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockInstanceGroups) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockAlphaInstances.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockInstanceGroups.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -14225,303 +14186,357 @@ func (m *MockAlphaInstances) Delete(ctx context.Context, key *meta.Key) error {
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockAlphaInstances.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockInstanceGroups.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockAlphaInstances %v not found", key),
+ Message: fmt.Sprintf("MockInstanceGroups %v not found", key),
}
- klog.V(5).Infof("MockAlphaInstances.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockInstanceGroups.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockAlphaInstances.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockInstanceGroups.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockAlphaInstances) Obj(o *alpha.Instance) *MockInstancesObj {
- return &MockInstancesObj{o}
+func (m *MockInstanceGroups) Obj(o *ga.InstanceGroup) *MockInstanceGroupsObj {
+ return &MockInstanceGroupsObj{o}
}
-// AttachDisk is a mock for the corresponding method.
-func (m *MockAlphaInstances) AttachDisk(ctx context.Context, key *meta.Key, arg0 *alpha.AttachedDisk) error {
- if m.AttachDiskHook != nil {
- return m.AttachDiskHook(ctx, key, arg0, m)
+// AddInstances is a mock for the corresponding method.
+func (m *MockInstanceGroups) AddInstances(ctx context.Context, key *meta.Key, arg0 *ga.InstanceGroupsAddInstancesRequest) error {
+ if m.AddInstancesHook != nil {
+ return m.AddInstancesHook(ctx, key, arg0, m)
}
return nil
}
-// DetachDisk is a mock for the corresponding method.
-func (m *MockAlphaInstances) DetachDisk(ctx context.Context, key *meta.Key, arg0 string) error {
- if m.DetachDiskHook != nil {
- return m.DetachDiskHook(ctx, key, arg0, m)
+// ListInstances is a mock for the corresponding method.
+func (m *MockInstanceGroups) ListInstances(ctx context.Context, key *meta.Key, arg0 *ga.InstanceGroupsListInstancesRequest, fl *filter.F) ([]*ga.InstanceWithNamedPorts, error) {
+ if m.ListInstancesHook != nil {
+ return m.ListInstancesHook(ctx, key, arg0, fl, m)
+ }
+ return nil, nil
+}
+
+// RemoveInstances is a mock for the corresponding method.
+func (m *MockInstanceGroups) RemoveInstances(ctx context.Context, key *meta.Key, arg0 *ga.InstanceGroupsRemoveInstancesRequest) error {
+ if m.RemoveInstancesHook != nil {
+ return m.RemoveInstancesHook(ctx, key, arg0, m)
}
return nil
}
-// UpdateNetworkInterface is a mock for the corresponding method.
-func (m *MockAlphaInstances) UpdateNetworkInterface(ctx context.Context, key *meta.Key, arg0 string, arg1 *alpha.NetworkInterface) error {
- if m.UpdateNetworkInterfaceHook != nil {
- return m.UpdateNetworkInterfaceHook(ctx, key, arg0, arg1, m)
+// SetNamedPorts is a mock for the corresponding method.
+func (m *MockInstanceGroups) SetNamedPorts(ctx context.Context, key *meta.Key, arg0 *ga.InstanceGroupsSetNamedPortsRequest) error {
+ if m.SetNamedPortsHook != nil {
+ return m.SetNamedPortsHook(ctx, key, arg0, m)
}
return nil
}
-// GCEAlphaInstances is a simplifying adapter for the GCE Instances.
-type GCEAlphaInstances struct {
+// GCEInstanceGroups is a simplifying adapter for the GCE InstanceGroups.
+type GCEInstanceGroups struct {
s *Service
}
-// Get the Instance named by key.
-func (g *GCEAlphaInstances) Get(ctx context.Context, key *meta.Key) (*alpha.Instance, error) {
- klog.V(5).Infof("GCEAlphaInstances.Get(%v, %v): called", ctx, key)
+// Get the InstanceGroup named by key.
+func (g *GCEInstanceGroups) Get(ctx context.Context, key *meta.Key) (*ga.InstanceGroup, error) {
+ klog.V(5).Infof("GCEInstanceGroups.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaInstances.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEInstanceGroups.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Instances")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "InstanceGroups")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
- Version: meta.Version("alpha"),
- Service: "Instances",
+ Version: meta.Version("ga"),
+ Service: "InstanceGroups",
}
- klog.V(5).Infof("GCEAlphaInstances.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEInstanceGroups.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaInstances.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEInstanceGroups.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.Alpha.Instances.Get(projectID, key.Zone, key.Name)
+ call := g.s.GA.InstanceGroups.Get(projectID, key.Zone, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEAlphaInstances.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEInstanceGroups.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
-// List all Instance objects.
-func (g *GCEAlphaInstances) List(ctx context.Context, zone string, fl *filter.F) ([]*alpha.Instance, error) {
- klog.V(5).Infof("GCEAlphaInstances.List(%v, %v, %v) called", ctx, zone, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Instances")
+// List all InstanceGroup objects.
+func (g *GCEInstanceGroups) List(ctx context.Context, zone string, fl *filter.F) ([]*ga.InstanceGroup, error) {
+ klog.V(5).Infof("GCEInstanceGroups.List(%v, %v, %v) called", ctx, zone, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "InstanceGroups")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
- Version: meta.Version("alpha"),
- Service: "Instances",
+ Version: meta.Version("ga"),
+ Service: "InstanceGroups",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCEAlphaInstances.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, zone, fl, projectID, rk)
- call := g.s.Alpha.Instances.List(projectID, zone)
+ klog.V(5).Infof("GCEInstanceGroups.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, zone, fl, projectID, rk)
+ call := g.s.GA.InstanceGroups.List(projectID, zone)
if fl != filter.None {
call.Filter(fl.String())
}
- var all []*alpha.Instance
- f := func(l *alpha.InstanceList) error {
- klog.V(5).Infof("GCEAlphaInstances.List(%v, ..., %v): page %+v", ctx, fl, l)
+ var all []*ga.InstanceGroup
+ f := func(l *ga.InstanceGroupList) error {
+ klog.V(5).Infof("GCEInstanceGroups.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEAlphaInstances.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEInstanceGroups.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEAlphaInstances.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEInstanceGroups.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEAlphaInstances.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEInstanceGroups.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
-// Insert Instance with key of value obj.
-func (g *GCEAlphaInstances) Insert(ctx context.Context, key *meta.Key, obj *alpha.Instance) error {
- klog.V(5).Infof("GCEAlphaInstances.Insert(%v, %v, %+v): called", ctx, key, obj)
+// Insert InstanceGroup with key of value obj.
+func (g *GCEInstanceGroups) Insert(ctx context.Context, key *meta.Key, obj *ga.InstanceGroup) error {
+ klog.V(5).Infof("GCEInstanceGroups.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaInstances.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEInstanceGroups.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Instances")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "InstanceGroups")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
- Version: meta.Version("alpha"),
- Service: "Instances",
+ Version: meta.Version("ga"),
+ Service: "InstanceGroups",
}
- klog.V(5).Infof("GCEAlphaInstances.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEInstanceGroups.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaInstances.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEInstanceGroups.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.Alpha.Instances.Insert(projectID, key.Zone, obj)
+ call := g.s.GA.InstanceGroups.Insert(projectID, key.Zone, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaInstances.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEInstanceGroups.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaInstances.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCEInstanceGroups.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
-// Delete the Instance referenced by key.
-func (g *GCEAlphaInstances) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEAlphaInstances.Delete(%v, %v): called", ctx, key)
+// Delete the InstanceGroup referenced by key.
+func (g *GCEInstanceGroups) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEInstanceGroups.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaInstances.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEInstanceGroups.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Instances")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "InstanceGroups")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
- Version: meta.Version("alpha"),
- Service: "Instances",
+ Version: meta.Version("ga"),
+ Service: "InstanceGroups",
}
- klog.V(5).Infof("GCEAlphaInstances.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEInstanceGroups.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaInstances.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEInstanceGroups.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Alpha.Instances.Delete(projectID, key.Zone, key.Name)
+ call := g.s.GA.InstanceGroups.Delete(projectID, key.Zone, key.Name)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaInstances.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEInstanceGroups.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaInstances.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEInstanceGroups.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// AttachDisk is a method on GCEAlphaInstances.
-func (g *GCEAlphaInstances) AttachDisk(ctx context.Context, key *meta.Key, arg0 *alpha.AttachedDisk) error {
- klog.V(5).Infof("GCEAlphaInstances.AttachDisk(%v, %v, ...): called", ctx, key)
+// AddInstances is a method on GCEInstanceGroups.
+func (g *GCEInstanceGroups) AddInstances(ctx context.Context, key *meta.Key, arg0 *ga.InstanceGroupsAddInstancesRequest) error {
+ klog.V(5).Infof("GCEInstanceGroups.AddInstances(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaInstances.AttachDisk(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEInstanceGroups.AddInstances(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Instances")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "InstanceGroups")
rk := &RateLimitKey{
ProjectID: projectID,
- Operation: "AttachDisk",
- Version: meta.Version("alpha"),
- Service: "Instances",
+ Operation: "AddInstances",
+ Version: meta.Version("ga"),
+ Service: "InstanceGroups",
}
- klog.V(5).Infof("GCEAlphaInstances.AttachDisk(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEInstanceGroups.AddInstances(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaInstances.AttachDisk(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEInstanceGroups.AddInstances(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Alpha.Instances.AttachDisk(projectID, key.Zone, key.Name, arg0)
+ call := g.s.GA.InstanceGroups.AddInstances(projectID, key.Zone, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaInstances.AttachDisk(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEInstanceGroups.AddInstances(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaInstances.AttachDisk(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEInstanceGroups.AddInstances(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// DetachDisk is a method on GCEAlphaInstances.
-func (g *GCEAlphaInstances) DetachDisk(ctx context.Context, key *meta.Key, arg0 string) error {
- klog.V(5).Infof("GCEAlphaInstances.DetachDisk(%v, %v, ...): called", ctx, key)
+// ListInstances is a method on GCEInstanceGroups.
+func (g *GCEInstanceGroups) ListInstances(ctx context.Context, key *meta.Key, arg0 *ga.InstanceGroupsListInstancesRequest, fl *filter.F) ([]*ga.InstanceWithNamedPorts, error) {
+ klog.V(5).Infof("GCEInstanceGroups.ListInstances(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaInstances.DetachDisk(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
- return fmt.Errorf("invalid GCE key (%+v)", key)
+ klog.V(2).Infof("GCEInstanceGroups.ListInstances(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ return nil, fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Instances")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "InstanceGroups")
rk := &RateLimitKey{
ProjectID: projectID,
- Operation: "DetachDisk",
- Version: meta.Version("alpha"),
- Service: "Instances",
+ Operation: "ListInstances",
+ Version: meta.Version("ga"),
+ Service: "InstanceGroups",
}
- klog.V(5).Infof("GCEAlphaInstances.DetachDisk(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEInstanceGroups.ListInstances(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaInstances.DetachDisk(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEInstanceGroups.ListInstances(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ return nil, err
+ }
+ call := g.s.GA.InstanceGroups.ListInstances(projectID, key.Zone, key.Name, arg0)
+ var all []*ga.InstanceWithNamedPorts
+ f := func(l *ga.InstanceGroupsListInstances) error {
+ klog.V(5).Infof("GCEInstanceGroups.ListInstances(%v, %v, ...): page %+v", ctx, key, l)
+ all = append(all, l.Items...)
+ return nil
+ }
+ if err := call.Pages(ctx, f); err != nil {
+ klog.V(4).Infof("GCEInstanceGroups.ListInstances(%v, %v, ...) = %v, %v", ctx, key, nil, err)
+ return nil, err
+ }
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEInstanceGroups.ListInstances(%v, %v, ...) = [%v items], %v", ctx, key, len(all), nil)
+ } else if klog.V(5).Enabled() {
+ var asStr []string
+ for _, o := range all {
+ asStr = append(asStr, fmt.Sprintf("%+v", o))
+ }
+ klog.V(5).Infof("GCEInstanceGroups.ListInstances(%v, %v, ...) = %v, %v", ctx, key, asStr, nil)
+ }
+ return all, nil
+}
+
+// RemoveInstances is a method on GCEInstanceGroups.
+func (g *GCEInstanceGroups) RemoveInstances(ctx context.Context, key *meta.Key, arg0 *ga.InstanceGroupsRemoveInstancesRequest) error {
+ klog.V(5).Infof("GCEInstanceGroups.RemoveInstances(%v, %v, ...): called", ctx, key)
+
+ if !key.Valid() {
+ klog.V(2).Infof("GCEInstanceGroups.RemoveInstances(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "InstanceGroups")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "RemoveInstances",
+ Version: meta.Version("ga"),
+ Service: "InstanceGroups",
+ }
+ klog.V(5).Infof("GCEInstanceGroups.RemoveInstances(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCEInstanceGroups.RemoveInstances(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Alpha.Instances.DetachDisk(projectID, key.Zone, key.Name, arg0)
+ call := g.s.GA.InstanceGroups.RemoveInstances(projectID, key.Zone, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaInstances.DetachDisk(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEInstanceGroups.RemoveInstances(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaInstances.DetachDisk(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEInstanceGroups.RemoveInstances(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// UpdateNetworkInterface is a method on GCEAlphaInstances.
-func (g *GCEAlphaInstances) UpdateNetworkInterface(ctx context.Context, key *meta.Key, arg0 string, arg1 *alpha.NetworkInterface) error {
- klog.V(5).Infof("GCEAlphaInstances.UpdateNetworkInterface(%v, %v, ...): called", ctx, key)
+// SetNamedPorts is a method on GCEInstanceGroups.
+func (g *GCEInstanceGroups) SetNamedPorts(ctx context.Context, key *meta.Key, arg0 *ga.InstanceGroupsSetNamedPortsRequest) error {
+ klog.V(5).Infof("GCEInstanceGroups.SetNamedPorts(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaInstances.UpdateNetworkInterface(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEInstanceGroups.SetNamedPorts(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Instances")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "InstanceGroups")
rk := &RateLimitKey{
ProjectID: projectID,
- Operation: "UpdateNetworkInterface",
- Version: meta.Version("alpha"),
- Service: "Instances",
+ Operation: "SetNamedPorts",
+ Version: meta.Version("ga"),
+ Service: "InstanceGroups",
}
- klog.V(5).Infof("GCEAlphaInstances.UpdateNetworkInterface(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEInstanceGroups.SetNamedPorts(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaInstances.UpdateNetworkInterface(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEInstanceGroups.SetNamedPorts(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Alpha.Instances.UpdateNetworkInterface(projectID, key.Zone, key.Name, arg0, arg1)
+ call := g.s.GA.InstanceGroups.SetNamedPorts(projectID, key.Zone, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaInstances.UpdateNetworkInterface(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEInstanceGroups.SetNamedPorts(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaInstances.UpdateNetworkInterface(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEInstanceGroups.SetNamedPorts(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// AlphaNetworks is an interface that allows for mocking of Networks.
-type AlphaNetworks interface {
- Get(ctx context.Context, key *meta.Key) (*alpha.Network, error)
- List(ctx context.Context, fl *filter.F) ([]*alpha.Network, error)
- Insert(ctx context.Context, key *meta.Key, obj *alpha.Network) error
+// Instances is an interface that allows for mocking of Instances.
+type Instances interface {
+ Get(ctx context.Context, key *meta.Key) (*ga.Instance, error)
+ List(ctx context.Context, zone string, fl *filter.F) ([]*ga.Instance, error)
+ Insert(ctx context.Context, key *meta.Key, obj *ga.Instance) error
Delete(ctx context.Context, key *meta.Key) error
+ AttachDisk(context.Context, *meta.Key, *ga.AttachedDisk) error
+ DetachDisk(context.Context, *meta.Key, string) error
}
-// NewMockAlphaNetworks returns a new mock for Networks.
-func NewMockAlphaNetworks(pr ProjectRouter, objs map[meta.Key]*MockNetworksObj) *MockAlphaNetworks {
- mock := &MockAlphaNetworks{
+// NewMockInstances returns a new mock for Instances.
+func NewMockInstances(pr ProjectRouter, objs map[meta.Key]*MockInstancesObj) *MockInstances {
+ mock := &MockInstances{
ProjectRouter: pr,
Objects: objs,
@@ -14532,14 +14547,14 @@ func NewMockAlphaNetworks(pr ProjectRouter, objs map[meta.Key]*MockNetworksObj)
return mock
}
-// MockAlphaNetworks is the mock for Networks.
-type MockAlphaNetworks struct {
+// MockInstances is the mock for Instances.
+type MockInstances struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
// Objects maintained by the mock.
- Objects map[meta.Key]*MockNetworksObj
+ Objects map[meta.Key]*MockInstancesObj
// If an entry exists for the given key and operation, then the error
// will be returned instead of the operation.
@@ -14552,10 +14567,12 @@ type MockAlphaNetworks struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaNetworks) (bool, *alpha.Network, error)
- ListHook func(ctx context.Context, fl *filter.F, m *MockAlphaNetworks) (bool, []*alpha.Network, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *alpha.Network, m *MockAlphaNetworks) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaNetworks) (bool, error)
+ GetHook func(ctx context.Context, key *meta.Key, m *MockInstances) (bool, *ga.Instance, error)
+ ListHook func(ctx context.Context, zone string, fl *filter.F, m *MockInstances) (bool, []*ga.Instance, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *ga.Instance, m *MockInstances) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockInstances) (bool, error)
+ AttachDiskHook func(context.Context, *meta.Key, *ga.AttachedDisk, *MockInstances) error
+ DetachDiskHook func(context.Context, *meta.Key, string, *MockInstances) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -14563,10 +14580,10 @@ type MockAlphaNetworks struct {
}
// Get returns the object from the mock.
-func (m *MockAlphaNetworks) Get(ctx context.Context, key *meta.Key) (*alpha.Network, error) {
+func (m *MockInstances) Get(ctx context.Context, key *meta.Key) (*ga.Instance, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockAlphaNetworks.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockInstances.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -14578,28 +14595,28 @@ func (m *MockAlphaNetworks) Get(ctx context.Context, key *meta.Key) (*alpha.Netw
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockAlphaNetworks.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockInstances.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
- typedObj := obj.ToAlpha()
- klog.V(5).Infof("MockAlphaNetworks.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ typedObj := obj.ToGA()
+ klog.V(5).Infof("MockInstances.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockAlphaNetworks %v not found", key),
+ Message: fmt.Sprintf("MockInstances %v not found", key),
}
- klog.V(5).Infof("MockAlphaNetworks.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockInstances.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
-// List all of the objects in the mock.
-func (m *MockAlphaNetworks) List(ctx context.Context, fl *filter.F) ([]*alpha.Network, error) {
+// List all of the objects in the mock in the given zone.
+func (m *MockInstances) List(ctx context.Context, zone string, fl *filter.F) ([]*ga.Instance, error) {
if m.ListHook != nil {
- if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
- klog.V(5).Infof("MockAlphaNetworks.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
+ if intercept, objs, err := m.ListHook(ctx, zone, fl, m); intercept {
+ klog.V(5).Infof("MockInstances.List(%v, %q, %v) = [%v items], %v", ctx, zone, fl, len(objs), err)
return objs, err
}
}
@@ -14609,28 +14626,31 @@ func (m *MockAlphaNetworks) List(ctx context.Context, fl *filter.F) ([]*alpha.Ne
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockAlphaNetworks.List(%v, %v) = nil, %v", ctx, fl, err)
+ klog.V(5).Infof("MockInstances.List(%v, %q, %v) = nil, %v", ctx, zone, fl, err)
return nil, *m.ListError
}
- var objs []*alpha.Network
- for _, obj := range m.Objects {
- if !fl.Match(obj.ToAlpha()) {
+ var objs []*ga.Instance
+ for key, obj := range m.Objects {
+ if key.Zone != zone {
continue
}
- objs = append(objs, obj.ToAlpha())
+ if !fl.Match(obj.ToGA()) {
+ continue
+ }
+ objs = append(objs, obj.ToGA())
}
- klog.V(5).Infof("MockAlphaNetworks.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
+ klog.V(5).Infof("MockInstances.List(%v, %q, %v) = [%v items], nil", ctx, zone, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockAlphaNetworks) Insert(ctx context.Context, key *meta.Key, obj *alpha.Network) error {
+func (m *MockInstances) Insert(ctx context.Context, key *meta.Key, obj *ga.Instance) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockAlphaNetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockInstances.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -14642,32 +14662,32 @@ func (m *MockAlphaNetworks) Insert(ctx context.Context, key *meta.Key, obj *alph
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockAlphaNetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockInstances.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockAlphaNetworks %v exists", key),
+ Message: fmt.Sprintf("MockInstances %v exists", key),
}
- klog.V(5).Infof("MockAlphaNetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockInstances.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "networks")
- obj.SelfLink = SelfLink(meta.VersionAlpha, projectID, "networks", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "ga", "instances")
+ obj.SelfLink = SelfLink(meta.VersionGA, projectID, "instances", key)
- m.Objects[*key] = &MockNetworksObj{obj}
- klog.V(5).Infof("MockAlphaNetworks.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ m.Objects[*key] = &MockInstancesObj{obj}
+ klog.V(5).Infof("MockInstances.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockAlphaNetworks) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockInstances) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockAlphaNetworks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockInstances.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -14679,181 +14699,265 @@ func (m *MockAlphaNetworks) Delete(ctx context.Context, key *meta.Key) error {
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockAlphaNetworks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockInstances.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockAlphaNetworks %v not found", key),
+ Message: fmt.Sprintf("MockInstances %v not found", key),
}
- klog.V(5).Infof("MockAlphaNetworks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockInstances.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockAlphaNetworks.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockInstances.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockAlphaNetworks) Obj(o *alpha.Network) *MockNetworksObj {
- return &MockNetworksObj{o}
+func (m *MockInstances) Obj(o *ga.Instance) *MockInstancesObj {
+ return &MockInstancesObj{o}
}
-// GCEAlphaNetworks is a simplifying adapter for the GCE Networks.
-type GCEAlphaNetworks struct {
+// AttachDisk is a mock for the corresponding method.
+func (m *MockInstances) AttachDisk(ctx context.Context, key *meta.Key, arg0 *ga.AttachedDisk) error {
+ if m.AttachDiskHook != nil {
+ return m.AttachDiskHook(ctx, key, arg0, m)
+ }
+ return nil
+}
+
+// DetachDisk is a mock for the corresponding method.
+func (m *MockInstances) DetachDisk(ctx context.Context, key *meta.Key, arg0 string) error {
+ if m.DetachDiskHook != nil {
+ return m.DetachDiskHook(ctx, key, arg0, m)
+ }
+ return nil
+}
+
+// GCEInstances is a simplifying adapter for the GCE Instances.
+type GCEInstances struct {
s *Service
}
-// Get the Network named by key.
-func (g *GCEAlphaNetworks) Get(ctx context.Context, key *meta.Key) (*alpha.Network, error) {
- klog.V(5).Infof("GCEAlphaNetworks.Get(%v, %v): called", ctx, key)
+// Get the Instance named by key.
+func (g *GCEInstances) Get(ctx context.Context, key *meta.Key) (*ga.Instance, error) {
+ klog.V(5).Infof("GCEInstances.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaNetworks.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEInstances.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Networks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Instances")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
- Version: meta.Version("alpha"),
- Service: "Networks",
+ Version: meta.Version("ga"),
+ Service: "Instances",
}
- klog.V(5).Infof("GCEAlphaNetworks.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEInstances.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaNetworks.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEInstances.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.Alpha.Networks.Get(projectID, key.Name)
+ call := g.s.GA.Instances.Get(projectID, key.Zone, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEAlphaNetworks.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEInstances.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
-// List all Network objects.
-func (g *GCEAlphaNetworks) List(ctx context.Context, fl *filter.F) ([]*alpha.Network, error) {
- klog.V(5).Infof("GCEAlphaNetworks.List(%v, %v) called", ctx, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Networks")
+// List all Instance objects.
+func (g *GCEInstances) List(ctx context.Context, zone string, fl *filter.F) ([]*ga.Instance, error) {
+ klog.V(5).Infof("GCEInstances.List(%v, %v, %v) called", ctx, zone, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Instances")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
- Version: meta.Version("alpha"),
- Service: "Networks",
+ Version: meta.Version("ga"),
+ Service: "Instances",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCEAlphaNetworks.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
- call := g.s.Alpha.Networks.List(projectID)
+ klog.V(5).Infof("GCEInstances.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, zone, fl, projectID, rk)
+ call := g.s.GA.Instances.List(projectID, zone)
if fl != filter.None {
call.Filter(fl.String())
}
- var all []*alpha.Network
- f := func(l *alpha.NetworkList) error {
- klog.V(5).Infof("GCEAlphaNetworks.List(%v, ..., %v): page %+v", ctx, fl, l)
+ var all []*ga.Instance
+ f := func(l *ga.InstanceList) error {
+ klog.V(5).Infof("GCEInstances.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEAlphaNetworks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEInstances.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEAlphaNetworks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEInstances.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEAlphaNetworks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEInstances.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
-// Insert Network with key of value obj.
-func (g *GCEAlphaNetworks) Insert(ctx context.Context, key *meta.Key, obj *alpha.Network) error {
- klog.V(5).Infof("GCEAlphaNetworks.Insert(%v, %v, %+v): called", ctx, key, obj)
- if !key.Valid() {
- klog.V(2).Infof("GCEAlphaNetworks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+// Insert Instance with key of value obj.
+func (g *GCEInstances) Insert(ctx context.Context, key *meta.Key, obj *ga.Instance) error {
+ klog.V(5).Infof("GCEInstances.Insert(%v, %v, %+v): called", ctx, key, obj)
+ if !key.Valid() {
+ klog.V(2).Infof("GCEInstances.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Networks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Instances")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
- Version: meta.Version("alpha"),
- Service: "Networks",
+ Version: meta.Version("ga"),
+ Service: "Instances",
}
- klog.V(5).Infof("GCEAlphaNetworks.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEInstances.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaNetworks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEInstances.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.Alpha.Networks.Insert(projectID, obj)
+ call := g.s.GA.Instances.Insert(projectID, key.Zone, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaNetworks.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEInstances.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaNetworks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCEInstances.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
-// Delete the Network referenced by key.
-func (g *GCEAlphaNetworks) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEAlphaNetworks.Delete(%v, %v): called", ctx, key)
+// Delete the Instance referenced by key.
+func (g *GCEInstances) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEInstances.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaNetworks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEInstances.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Networks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Instances")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
- Version: meta.Version("alpha"),
- Service: "Networks",
+ Version: meta.Version("ga"),
+ Service: "Instances",
}
- klog.V(5).Infof("GCEAlphaNetworks.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEInstances.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaNetworks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEInstances.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Alpha.Networks.Delete(projectID, key.Name)
-
+ call := g.s.GA.Instances.Delete(projectID, key.Zone, key.Name)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaNetworks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEInstances.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaNetworks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEInstances.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// BetaNetworks is an interface that allows for mocking of Networks.
-type BetaNetworks interface {
- Get(ctx context.Context, key *meta.Key) (*beta.Network, error)
- List(ctx context.Context, fl *filter.F) ([]*beta.Network, error)
- Insert(ctx context.Context, key *meta.Key, obj *beta.Network) error
+// AttachDisk is a method on GCEInstances.
+func (g *GCEInstances) AttachDisk(ctx context.Context, key *meta.Key, arg0 *ga.AttachedDisk) error {
+ klog.V(5).Infof("GCEInstances.AttachDisk(%v, %v, ...): called", ctx, key)
+
+ if !key.Valid() {
+ klog.V(2).Infof("GCEInstances.AttachDisk(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Instances")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "AttachDisk",
+ Version: meta.Version("ga"),
+ Service: "Instances",
+ }
+ klog.V(5).Infof("GCEInstances.AttachDisk(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCEInstances.AttachDisk(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ return err
+ }
+ call := g.s.GA.Instances.AttachDisk(projectID, key.Zone, key.Name, arg0)
+ call.Context(ctx)
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCEInstances.AttachDisk(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+ }
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCEInstances.AttachDisk(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+}
+
+// DetachDisk is a method on GCEInstances.
+func (g *GCEInstances) DetachDisk(ctx context.Context, key *meta.Key, arg0 string) error {
+ klog.V(5).Infof("GCEInstances.DetachDisk(%v, %v, ...): called", ctx, key)
+
+ if !key.Valid() {
+ klog.V(2).Infof("GCEInstances.DetachDisk(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Instances")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "DetachDisk",
+ Version: meta.Version("ga"),
+ Service: "Instances",
+ }
+ klog.V(5).Infof("GCEInstances.DetachDisk(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCEInstances.DetachDisk(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ return err
+ }
+ call := g.s.GA.Instances.DetachDisk(projectID, key.Zone, key.Name, arg0)
+ call.Context(ctx)
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCEInstances.DetachDisk(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+ }
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCEInstances.DetachDisk(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+}
+
+// BetaInstances is an interface that allows for mocking of Instances.
+type BetaInstances interface {
+ Get(ctx context.Context, key *meta.Key) (*beta.Instance, error)
+ List(ctx context.Context, zone string, fl *filter.F) ([]*beta.Instance, error)
+ Insert(ctx context.Context, key *meta.Key, obj *beta.Instance) error
Delete(ctx context.Context, key *meta.Key) error
+ AttachDisk(context.Context, *meta.Key, *beta.AttachedDisk) error
+ DetachDisk(context.Context, *meta.Key, string) error
+ UpdateNetworkInterface(context.Context, *meta.Key, string, *beta.NetworkInterface) error
}
-// NewMockBetaNetworks returns a new mock for Networks.
-func NewMockBetaNetworks(pr ProjectRouter, objs map[meta.Key]*MockNetworksObj) *MockBetaNetworks {
- mock := &MockBetaNetworks{
+// NewMockBetaInstances returns a new mock for Instances.
+func NewMockBetaInstances(pr ProjectRouter, objs map[meta.Key]*MockInstancesObj) *MockBetaInstances {
+ mock := &MockBetaInstances{
ProjectRouter: pr,
Objects: objs,
@@ -14864,14 +14968,14 @@ func NewMockBetaNetworks(pr ProjectRouter, objs map[meta.Key]*MockNetworksObj) *
return mock
}
-// MockBetaNetworks is the mock for Networks.
-type MockBetaNetworks struct {
+// MockBetaInstances is the mock for Instances.
+type MockBetaInstances struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
// Objects maintained by the mock.
- Objects map[meta.Key]*MockNetworksObj
+ Objects map[meta.Key]*MockInstancesObj
// If an entry exists for the given key and operation, then the error
// will be returned instead of the operation.
@@ -14884,10 +14988,13 @@ type MockBetaNetworks struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockBetaNetworks) (bool, *beta.Network, error)
- ListHook func(ctx context.Context, fl *filter.F, m *MockBetaNetworks) (bool, []*beta.Network, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *beta.Network, m *MockBetaNetworks) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaNetworks) (bool, error)
+ GetHook func(ctx context.Context, key *meta.Key, m *MockBetaInstances) (bool, *beta.Instance, error)
+ ListHook func(ctx context.Context, zone string, fl *filter.F, m *MockBetaInstances) (bool, []*beta.Instance, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *beta.Instance, m *MockBetaInstances) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaInstances) (bool, error)
+ AttachDiskHook func(context.Context, *meta.Key, *beta.AttachedDisk, *MockBetaInstances) error
+ DetachDiskHook func(context.Context, *meta.Key, string, *MockBetaInstances) error
+ UpdateNetworkInterfaceHook func(context.Context, *meta.Key, string, *beta.NetworkInterface, *MockBetaInstances) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -14895,10 +15002,10 @@ type MockBetaNetworks struct {
}
// Get returns the object from the mock.
-func (m *MockBetaNetworks) Get(ctx context.Context, key *meta.Key) (*beta.Network, error) {
+func (m *MockBetaInstances) Get(ctx context.Context, key *meta.Key) (*beta.Instance, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockBetaNetworks.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaInstances.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -14910,28 +15017,28 @@ func (m *MockBetaNetworks) Get(ctx context.Context, key *meta.Key) (*beta.Networ
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockBetaNetworks.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaInstances.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
typedObj := obj.ToBeta()
- klog.V(5).Infof("MockBetaNetworks.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ klog.V(5).Infof("MockBetaInstances.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockBetaNetworks %v not found", key),
+ Message: fmt.Sprintf("MockBetaInstances %v not found", key),
}
- klog.V(5).Infof("MockBetaNetworks.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaInstances.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
-// List all of the objects in the mock.
-func (m *MockBetaNetworks) List(ctx context.Context, fl *filter.F) ([]*beta.Network, error) {
+// List all of the objects in the mock in the given zone.
+func (m *MockBetaInstances) List(ctx context.Context, zone string, fl *filter.F) ([]*beta.Instance, error) {
if m.ListHook != nil {
- if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
- klog.V(5).Infof("MockBetaNetworks.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
+ if intercept, objs, err := m.ListHook(ctx, zone, fl, m); intercept {
+ klog.V(5).Infof("MockBetaInstances.List(%v, %q, %v) = [%v items], %v", ctx, zone, fl, len(objs), err)
return objs, err
}
}
@@ -14941,28 +15048,31 @@ func (m *MockBetaNetworks) List(ctx context.Context, fl *filter.F) ([]*beta.Netw
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockBetaNetworks.List(%v, %v) = nil, %v", ctx, fl, err)
+ klog.V(5).Infof("MockBetaInstances.List(%v, %q, %v) = nil, %v", ctx, zone, fl, err)
return nil, *m.ListError
}
- var objs []*beta.Network
- for _, obj := range m.Objects {
+ var objs []*beta.Instance
+ for key, obj := range m.Objects {
+ if key.Zone != zone {
+ continue
+ }
if !fl.Match(obj.ToBeta()) {
continue
}
objs = append(objs, obj.ToBeta())
}
- klog.V(5).Infof("MockBetaNetworks.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
+ klog.V(5).Infof("MockBetaInstances.List(%v, %q, %v) = [%v items], nil", ctx, zone, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockBetaNetworks) Insert(ctx context.Context, key *meta.Key, obj *beta.Network) error {
+func (m *MockBetaInstances) Insert(ctx context.Context, key *meta.Key, obj *beta.Instance) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockBetaNetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaInstances.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -14974,32 +15084,32 @@ func (m *MockBetaNetworks) Insert(ctx context.Context, key *meta.Key, obj *beta.
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockBetaNetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaInstances.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockBetaNetworks %v exists", key),
+ Message: fmt.Sprintf("MockBetaInstances %v exists", key),
}
- klog.V(5).Infof("MockBetaNetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaInstances.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "beta", "networks")
- obj.SelfLink = SelfLink(meta.VersionBeta, projectID, "networks", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "beta", "instances")
+ obj.SelfLink = SelfLink(meta.VersionBeta, projectID, "instances", key)
- m.Objects[*key] = &MockNetworksObj{obj}
- klog.V(5).Infof("MockBetaNetworks.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ m.Objects[*key] = &MockInstancesObj{obj}
+ klog.V(5).Infof("MockBetaInstances.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockBetaNetworks) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockBetaInstances) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockBetaNetworks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaInstances.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -15011,181 +15121,306 @@ func (m *MockBetaNetworks) Delete(ctx context.Context, key *meta.Key) error {
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockBetaNetworks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaInstances.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockBetaNetworks %v not found", key),
+ Message: fmt.Sprintf("MockBetaInstances %v not found", key),
}
- klog.V(5).Infof("MockBetaNetworks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaInstances.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockBetaNetworks.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockBetaInstances.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockBetaNetworks) Obj(o *beta.Network) *MockNetworksObj {
- return &MockNetworksObj{o}
+func (m *MockBetaInstances) Obj(o *beta.Instance) *MockInstancesObj {
+ return &MockInstancesObj{o}
}
-// GCEBetaNetworks is a simplifying adapter for the GCE Networks.
-type GCEBetaNetworks struct {
+// AttachDisk is a mock for the corresponding method.
+func (m *MockBetaInstances) AttachDisk(ctx context.Context, key *meta.Key, arg0 *beta.AttachedDisk) error {
+ if m.AttachDiskHook != nil {
+ return m.AttachDiskHook(ctx, key, arg0, m)
+ }
+ return nil
+}
+
+// DetachDisk is a mock for the corresponding method.
+func (m *MockBetaInstances) DetachDisk(ctx context.Context, key *meta.Key, arg0 string) error {
+ if m.DetachDiskHook != nil {
+ return m.DetachDiskHook(ctx, key, arg0, m)
+ }
+ return nil
+}
+
+// UpdateNetworkInterface is a mock for the corresponding method.
+func (m *MockBetaInstances) UpdateNetworkInterface(ctx context.Context, key *meta.Key, arg0 string, arg1 *beta.NetworkInterface) error {
+ if m.UpdateNetworkInterfaceHook != nil {
+ return m.UpdateNetworkInterfaceHook(ctx, key, arg0, arg1, m)
+ }
+ return nil
+}
+
+// GCEBetaInstances is a simplifying adapter for the GCE Instances.
+type GCEBetaInstances struct {
s *Service
}
-// Get the Network named by key.
-func (g *GCEBetaNetworks) Get(ctx context.Context, key *meta.Key) (*beta.Network, error) {
- klog.V(5).Infof("GCEBetaNetworks.Get(%v, %v): called", ctx, key)
+// Get the Instance named by key.
+func (g *GCEBetaInstances) Get(ctx context.Context, key *meta.Key) (*beta.Instance, error) {
+ klog.V(5).Infof("GCEBetaInstances.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaNetworks.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaInstances.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Networks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Instances")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
Version: meta.Version("beta"),
- Service: "Networks",
+ Service: "Instances",
}
- klog.V(5).Infof("GCEBetaNetworks.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaInstances.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaNetworks.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaInstances.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.Beta.Networks.Get(projectID, key.Name)
+ call := g.s.Beta.Instances.Get(projectID, key.Zone, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEBetaNetworks.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEBetaInstances.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
-// List all Network objects.
-func (g *GCEBetaNetworks) List(ctx context.Context, fl *filter.F) ([]*beta.Network, error) {
- klog.V(5).Infof("GCEBetaNetworks.List(%v, %v) called", ctx, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Networks")
+// List all Instance objects.
+func (g *GCEBetaInstances) List(ctx context.Context, zone string, fl *filter.F) ([]*beta.Instance, error) {
+ klog.V(5).Infof("GCEBetaInstances.List(%v, %v, %v) called", ctx, zone, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Instances")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
Version: meta.Version("beta"),
- Service: "Networks",
+ Service: "Instances",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCEBetaNetworks.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
- call := g.s.Beta.Networks.List(projectID)
+ klog.V(5).Infof("GCEBetaInstances.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, zone, fl, projectID, rk)
+ call := g.s.Beta.Instances.List(projectID, zone)
if fl != filter.None {
call.Filter(fl.String())
}
- var all []*beta.Network
- f := func(l *beta.NetworkList) error {
- klog.V(5).Infof("GCEBetaNetworks.List(%v, ..., %v): page %+v", ctx, fl, l)
+ var all []*beta.Instance
+ f := func(l *beta.InstanceList) error {
+ klog.V(5).Infof("GCEBetaInstances.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEBetaNetworks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEBetaInstances.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEBetaNetworks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEBetaInstances.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEBetaNetworks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEBetaInstances.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
-// Insert Network with key of value obj.
-func (g *GCEBetaNetworks) Insert(ctx context.Context, key *meta.Key, obj *beta.Network) error {
- klog.V(5).Infof("GCEBetaNetworks.Insert(%v, %v, %+v): called", ctx, key, obj)
+// Insert Instance with key of value obj.
+func (g *GCEBetaInstances) Insert(ctx context.Context, key *meta.Key, obj *beta.Instance) error {
+ klog.V(5).Infof("GCEBetaInstances.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaNetworks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaInstances.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Networks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Instances")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
Version: meta.Version("beta"),
- Service: "Networks",
+ Service: "Instances",
}
- klog.V(5).Infof("GCEBetaNetworks.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaInstances.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaNetworks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaInstances.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.Beta.Networks.Insert(projectID, obj)
+ call := g.s.Beta.Instances.Insert(projectID, key.Zone, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaNetworks.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaInstances.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaNetworks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCEBetaInstances.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
-// Delete the Network referenced by key.
-func (g *GCEBetaNetworks) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEBetaNetworks.Delete(%v, %v): called", ctx, key)
+// Delete the Instance referenced by key.
+func (g *GCEBetaInstances) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEBetaInstances.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaNetworks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaInstances.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Networks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Instances")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
Version: meta.Version("beta"),
- Service: "Networks",
+ Service: "Instances",
}
- klog.V(5).Infof("GCEBetaNetworks.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaInstances.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaNetworks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaInstances.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Beta.Networks.Delete(projectID, key.Name)
+ call := g.s.Beta.Instances.Delete(projectID, key.Zone, key.Name)
+ call.Context(ctx)
+
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCEBetaInstances.Delete(%v, %v) = %v", ctx, key, err)
+ return err
+ }
+
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCEBetaInstances.Delete(%v, %v) = %v", ctx, key, err)
+ return err
+}
+
+// AttachDisk is a method on GCEBetaInstances.
+func (g *GCEBetaInstances) AttachDisk(ctx context.Context, key *meta.Key, arg0 *beta.AttachedDisk) error {
+ klog.V(5).Infof("GCEBetaInstances.AttachDisk(%v, %v, ...): called", ctx, key)
+
+ if !key.Valid() {
+ klog.V(2).Infof("GCEBetaInstances.AttachDisk(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Instances")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "AttachDisk",
+ Version: meta.Version("beta"),
+ Service: "Instances",
+ }
+ klog.V(5).Infof("GCEBetaInstances.AttachDisk(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCEBetaInstances.AttachDisk(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ return err
+ }
+ call := g.s.Beta.Instances.AttachDisk(projectID, key.Zone, key.Name, arg0)
call.Context(ctx)
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCEBetaInstances.AttachDisk(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+ }
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCEBetaInstances.AttachDisk(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+}
+
+// DetachDisk is a method on GCEBetaInstances.
+func (g *GCEBetaInstances) DetachDisk(ctx context.Context, key *meta.Key, arg0 string) error {
+ klog.V(5).Infof("GCEBetaInstances.DetachDisk(%v, %v, ...): called", ctx, key)
+
+ if !key.Valid() {
+ klog.V(2).Infof("GCEBetaInstances.DetachDisk(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Instances")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "DetachDisk",
+ Version: meta.Version("beta"),
+ Service: "Instances",
+ }
+ klog.V(5).Infof("GCEBetaInstances.DetachDisk(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCEBetaInstances.DetachDisk(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ return err
+ }
+ call := g.s.Beta.Instances.DetachDisk(projectID, key.Zone, key.Name, arg0)
+ call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaNetworks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaInstances.DetachDisk(%v, %v, ...) = %+v", ctx, key, err)
return err
}
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCEBetaInstances.DetachDisk(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+}
+
+// UpdateNetworkInterface is a method on GCEBetaInstances.
+func (g *GCEBetaInstances) UpdateNetworkInterface(ctx context.Context, key *meta.Key, arg0 string, arg1 *beta.NetworkInterface) error {
+ klog.V(5).Infof("GCEBetaInstances.UpdateNetworkInterface(%v, %v, ...): called", ctx, key)
+
+ if !key.Valid() {
+ klog.V(2).Infof("GCEBetaInstances.UpdateNetworkInterface(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Instances")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "UpdateNetworkInterface",
+ Version: meta.Version("beta"),
+ Service: "Instances",
+ }
+ klog.V(5).Infof("GCEBetaInstances.UpdateNetworkInterface(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCEBetaInstances.UpdateNetworkInterface(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ return err
+ }
+ call := g.s.Beta.Instances.UpdateNetworkInterface(projectID, key.Zone, key.Name, arg0, arg1)
+ call.Context(ctx)
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCEBetaInstances.UpdateNetworkInterface(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+ }
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaNetworks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaInstances.UpdateNetworkInterface(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// Networks is an interface that allows for mocking of Networks.
-type Networks interface {
- Get(ctx context.Context, key *meta.Key) (*ga.Network, error)
- List(ctx context.Context, fl *filter.F) ([]*ga.Network, error)
- Insert(ctx context.Context, key *meta.Key, obj *ga.Network) error
+// AlphaInstances is an interface that allows for mocking of Instances.
+type AlphaInstances interface {
+ Get(ctx context.Context, key *meta.Key) (*alpha.Instance, error)
+ List(ctx context.Context, zone string, fl *filter.F) ([]*alpha.Instance, error)
+ Insert(ctx context.Context, key *meta.Key, obj *alpha.Instance) error
Delete(ctx context.Context, key *meta.Key) error
+ AttachDisk(context.Context, *meta.Key, *alpha.AttachedDisk) error
+ DetachDisk(context.Context, *meta.Key, string) error
+ UpdateNetworkInterface(context.Context, *meta.Key, string, *alpha.NetworkInterface) error
}
-// NewMockNetworks returns a new mock for Networks.
-func NewMockNetworks(pr ProjectRouter, objs map[meta.Key]*MockNetworksObj) *MockNetworks {
- mock := &MockNetworks{
+// NewMockAlphaInstances returns a new mock for Instances.
+func NewMockAlphaInstances(pr ProjectRouter, objs map[meta.Key]*MockInstancesObj) *MockAlphaInstances {
+ mock := &MockAlphaInstances{
ProjectRouter: pr,
Objects: objs,
@@ -15196,14 +15431,14 @@ func NewMockNetworks(pr ProjectRouter, objs map[meta.Key]*MockNetworksObj) *Mock
return mock
}
-// MockNetworks is the mock for Networks.
-type MockNetworks struct {
+// MockAlphaInstances is the mock for Instances.
+type MockAlphaInstances struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
// Objects maintained by the mock.
- Objects map[meta.Key]*MockNetworksObj
+ Objects map[meta.Key]*MockInstancesObj
// If an entry exists for the given key and operation, then the error
// will be returned instead of the operation.
@@ -15216,10 +15451,13 @@ type MockNetworks struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockNetworks) (bool, *ga.Network, error)
- ListHook func(ctx context.Context, fl *filter.F, m *MockNetworks) (bool, []*ga.Network, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *ga.Network, m *MockNetworks) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockNetworks) (bool, error)
+ GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaInstances) (bool, *alpha.Instance, error)
+ ListHook func(ctx context.Context, zone string, fl *filter.F, m *MockAlphaInstances) (bool, []*alpha.Instance, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *alpha.Instance, m *MockAlphaInstances) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaInstances) (bool, error)
+ AttachDiskHook func(context.Context, *meta.Key, *alpha.AttachedDisk, *MockAlphaInstances) error
+ DetachDiskHook func(context.Context, *meta.Key, string, *MockAlphaInstances) error
+ UpdateNetworkInterfaceHook func(context.Context, *meta.Key, string, *alpha.NetworkInterface, *MockAlphaInstances) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -15227,10 +15465,10 @@ type MockNetworks struct {
}
// Get returns the object from the mock.
-func (m *MockNetworks) Get(ctx context.Context, key *meta.Key) (*ga.Network, error) {
+func (m *MockAlphaInstances) Get(ctx context.Context, key *meta.Key) (*alpha.Instance, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockNetworks.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaInstances.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -15242,28 +15480,28 @@ func (m *MockNetworks) Get(ctx context.Context, key *meta.Key) (*ga.Network, err
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockNetworks.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaInstances.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
- typedObj := obj.ToGA()
- klog.V(5).Infof("MockNetworks.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ typedObj := obj.ToAlpha()
+ klog.V(5).Infof("MockAlphaInstances.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockNetworks %v not found", key),
+ Message: fmt.Sprintf("MockAlphaInstances %v not found", key),
}
- klog.V(5).Infof("MockNetworks.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaInstances.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
-// List all of the objects in the mock.
-func (m *MockNetworks) List(ctx context.Context, fl *filter.F) ([]*ga.Network, error) {
+// List all of the objects in the mock in the given zone.
+func (m *MockAlphaInstances) List(ctx context.Context, zone string, fl *filter.F) ([]*alpha.Instance, error) {
if m.ListHook != nil {
- if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
- klog.V(5).Infof("MockNetworks.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
+ if intercept, objs, err := m.ListHook(ctx, zone, fl, m); intercept {
+ klog.V(5).Infof("MockAlphaInstances.List(%v, %q, %v) = [%v items], %v", ctx, zone, fl, len(objs), err)
return objs, err
}
}
@@ -15273,28 +15511,31 @@ func (m *MockNetworks) List(ctx context.Context, fl *filter.F) ([]*ga.Network, e
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockNetworks.List(%v, %v) = nil, %v", ctx, fl, err)
+ klog.V(5).Infof("MockAlphaInstances.List(%v, %q, %v) = nil, %v", ctx, zone, fl, err)
return nil, *m.ListError
}
- var objs []*ga.Network
- for _, obj := range m.Objects {
- if !fl.Match(obj.ToGA()) {
+ var objs []*alpha.Instance
+ for key, obj := range m.Objects {
+ if key.Zone != zone {
continue
}
- objs = append(objs, obj.ToGA())
+ if !fl.Match(obj.ToAlpha()) {
+ continue
+ }
+ objs = append(objs, obj.ToAlpha())
}
- klog.V(5).Infof("MockNetworks.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
+ klog.V(5).Infof("MockAlphaInstances.List(%v, %q, %v) = [%v items], nil", ctx, zone, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockNetworks) Insert(ctx context.Context, key *meta.Key, obj *ga.Network) error {
+func (m *MockAlphaInstances) Insert(ctx context.Context, key *meta.Key, obj *alpha.Instance) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockNetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaInstances.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -15306,32 +15547,32 @@ func (m *MockNetworks) Insert(ctx context.Context, key *meta.Key, obj *ga.Networ
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockNetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaInstances.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockNetworks %v exists", key),
+ Message: fmt.Sprintf("MockAlphaInstances %v exists", key),
}
- klog.V(5).Infof("MockNetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaInstances.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "ga", "networks")
- obj.SelfLink = SelfLink(meta.VersionGA, projectID, "networks", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "instances")
+ obj.SelfLink = SelfLink(meta.VersionAlpha, projectID, "instances", key)
- m.Objects[*key] = &MockNetworksObj{obj}
- klog.V(5).Infof("MockNetworks.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ m.Objects[*key] = &MockInstancesObj{obj}
+ klog.V(5).Infof("MockAlphaInstances.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockNetworks) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockAlphaInstances) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockNetworks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaInstances.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -15343,268 +15584,381 @@ func (m *MockNetworks) Delete(ctx context.Context, key *meta.Key) error {
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockNetworks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaInstances.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockNetworks %v not found", key),
+ Message: fmt.Sprintf("MockAlphaInstances %v not found", key),
}
- klog.V(5).Infof("MockNetworks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaInstances.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockNetworks.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockAlphaInstances.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockNetworks) Obj(o *ga.Network) *MockNetworksObj {
- return &MockNetworksObj{o}
+func (m *MockAlphaInstances) Obj(o *alpha.Instance) *MockInstancesObj {
+ return &MockInstancesObj{o}
}
-// GCENetworks is a simplifying adapter for the GCE Networks.
-type GCENetworks struct {
+// AttachDisk is a mock for the corresponding method.
+func (m *MockAlphaInstances) AttachDisk(ctx context.Context, key *meta.Key, arg0 *alpha.AttachedDisk) error {
+ if m.AttachDiskHook != nil {
+ return m.AttachDiskHook(ctx, key, arg0, m)
+ }
+ return nil
+}
+
+// DetachDisk is a mock for the corresponding method.
+func (m *MockAlphaInstances) DetachDisk(ctx context.Context, key *meta.Key, arg0 string) error {
+ if m.DetachDiskHook != nil {
+ return m.DetachDiskHook(ctx, key, arg0, m)
+ }
+ return nil
+}
+
+// UpdateNetworkInterface is a mock for the corresponding method.
+func (m *MockAlphaInstances) UpdateNetworkInterface(ctx context.Context, key *meta.Key, arg0 string, arg1 *alpha.NetworkInterface) error {
+ if m.UpdateNetworkInterfaceHook != nil {
+ return m.UpdateNetworkInterfaceHook(ctx, key, arg0, arg1, m)
+ }
+ return nil
+}
+
+// GCEAlphaInstances is a simplifying adapter for the GCE Instances.
+type GCEAlphaInstances struct {
s *Service
}
-// Get the Network named by key.
-func (g *GCENetworks) Get(ctx context.Context, key *meta.Key) (*ga.Network, error) {
- klog.V(5).Infof("GCENetworks.Get(%v, %v): called", ctx, key)
+// Get the Instance named by key.
+func (g *GCEAlphaInstances) Get(ctx context.Context, key *meta.Key) (*alpha.Instance, error) {
+ klog.V(5).Infof("GCEAlphaInstances.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCENetworks.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaInstances.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Networks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Instances")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
- Version: meta.Version("ga"),
- Service: "Networks",
+ Version: meta.Version("alpha"),
+ Service: "Instances",
}
- klog.V(5).Infof("GCENetworks.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaInstances.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCENetworks.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaInstances.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.GA.Networks.Get(projectID, key.Name)
+ call := g.s.Alpha.Instances.Get(projectID, key.Zone, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCENetworks.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEAlphaInstances.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
-// List all Network objects.
-func (g *GCENetworks) List(ctx context.Context, fl *filter.F) ([]*ga.Network, error) {
- klog.V(5).Infof("GCENetworks.List(%v, %v) called", ctx, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Networks")
+// List all Instance objects.
+func (g *GCEAlphaInstances) List(ctx context.Context, zone string, fl *filter.F) ([]*alpha.Instance, error) {
+ klog.V(5).Infof("GCEAlphaInstances.List(%v, %v, %v) called", ctx, zone, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Instances")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
- Version: meta.Version("ga"),
- Service: "Networks",
+ Version: meta.Version("alpha"),
+ Service: "Instances",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCENetworks.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
- call := g.s.GA.Networks.List(projectID)
+ klog.V(5).Infof("GCEAlphaInstances.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, zone, fl, projectID, rk)
+ call := g.s.Alpha.Instances.List(projectID, zone)
if fl != filter.None {
call.Filter(fl.String())
}
- var all []*ga.Network
- f := func(l *ga.NetworkList) error {
- klog.V(5).Infof("GCENetworks.List(%v, ..., %v): page %+v", ctx, fl, l)
+ var all []*alpha.Instance
+ f := func(l *alpha.InstanceList) error {
+ klog.V(5).Infof("GCEAlphaInstances.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCENetworks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEAlphaInstances.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCENetworks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEAlphaInstances.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCENetworks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEAlphaInstances.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
-// Insert Network with key of value obj.
-func (g *GCENetworks) Insert(ctx context.Context, key *meta.Key, obj *ga.Network) error {
- klog.V(5).Infof("GCENetworks.Insert(%v, %v, %+v): called", ctx, key, obj)
+// Insert Instance with key of value obj.
+func (g *GCEAlphaInstances) Insert(ctx context.Context, key *meta.Key, obj *alpha.Instance) error {
+ klog.V(5).Infof("GCEAlphaInstances.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCENetworks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaInstances.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Networks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Instances")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
- Version: meta.Version("ga"),
- Service: "Networks",
+ Version: meta.Version("alpha"),
+ Service: "Instances",
}
- klog.V(5).Infof("GCENetworks.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaInstances.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCENetworks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaInstances.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.GA.Networks.Insert(projectID, obj)
+ call := g.s.Alpha.Instances.Insert(projectID, key.Zone, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCENetworks.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaInstances.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCENetworks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCEAlphaInstances.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
-// Delete the Network referenced by key.
-func (g *GCENetworks) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCENetworks.Delete(%v, %v): called", ctx, key)
+// Delete the Instance referenced by key.
+func (g *GCEAlphaInstances) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEAlphaInstances.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCENetworks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaInstances.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Networks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Instances")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
- Version: meta.Version("ga"),
- Service: "Networks",
+ Version: meta.Version("alpha"),
+ Service: "Instances",
}
- klog.V(5).Infof("GCENetworks.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaInstances.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCENetworks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaInstances.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.GA.Networks.Delete(projectID, key.Name)
-
+ call := g.s.Alpha.Instances.Delete(projectID, key.Zone, key.Name)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCENetworks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaInstances.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCENetworks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaInstances.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// AlphaNetworkEndpointGroups is an interface that allows for mocking of NetworkEndpointGroups.
-type AlphaNetworkEndpointGroups interface {
- Get(ctx context.Context, key *meta.Key) (*alpha.NetworkEndpointGroup, error)
- List(ctx context.Context, zone string, fl *filter.F) ([]*alpha.NetworkEndpointGroup, error)
- Insert(ctx context.Context, key *meta.Key, obj *alpha.NetworkEndpointGroup) error
- Delete(ctx context.Context, key *meta.Key) error
- AggregatedList(ctx context.Context, fl *filter.F) (map[string][]*alpha.NetworkEndpointGroup, error)
- AttachNetworkEndpoints(context.Context, *meta.Key, *alpha.NetworkEndpointGroupsAttachEndpointsRequest) error
- DetachNetworkEndpoints(context.Context, *meta.Key, *alpha.NetworkEndpointGroupsDetachEndpointsRequest) error
- ListNetworkEndpoints(context.Context, *meta.Key, *alpha.NetworkEndpointGroupsListEndpointsRequest, *filter.F) ([]*alpha.NetworkEndpointWithHealthStatus, error)
-}
+// AttachDisk is a method on GCEAlphaInstances.
+func (g *GCEAlphaInstances) AttachDisk(ctx context.Context, key *meta.Key, arg0 *alpha.AttachedDisk) error {
+ klog.V(5).Infof("GCEAlphaInstances.AttachDisk(%v, %v, ...): called", ctx, key)
-// NewMockAlphaNetworkEndpointGroups returns a new mock for NetworkEndpointGroups.
-func NewMockAlphaNetworkEndpointGroups(pr ProjectRouter, objs map[meta.Key]*MockNetworkEndpointGroupsObj) *MockAlphaNetworkEndpointGroups {
- mock := &MockAlphaNetworkEndpointGroups{
- ProjectRouter: pr,
+ if !key.Valid() {
+ klog.V(2).Infof("GCEAlphaInstances.AttachDisk(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Instances")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "AttachDisk",
+ Version: meta.Version("alpha"),
+ Service: "Instances",
+ }
+ klog.V(5).Infof("GCEAlphaInstances.AttachDisk(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
- Objects: objs,
- GetError: map[meta.Key]error{},
- InsertError: map[meta.Key]error{},
- DeleteError: map[meta.Key]error{},
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCEAlphaInstances.AttachDisk(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ return err
}
- return mock
+ call := g.s.Alpha.Instances.AttachDisk(projectID, key.Zone, key.Name, arg0)
+ call.Context(ctx)
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCEAlphaInstances.AttachDisk(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+ }
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCEAlphaInstances.AttachDisk(%v, %v, ...) = %+v", ctx, key, err)
+ return err
}
-// MockAlphaNetworkEndpointGroups is the mock for NetworkEndpointGroups.
-type MockAlphaNetworkEndpointGroups struct {
- Lock sync.Mutex
-
- ProjectRouter ProjectRouter
-
- // Objects maintained by the mock.
- Objects map[meta.Key]*MockNetworkEndpointGroupsObj
-
- // If an entry exists for the given key and operation, then the error
- // will be returned instead of the operation.
- GetError map[meta.Key]error
- ListError *error
- InsertError map[meta.Key]error
- DeleteError map[meta.Key]error
- AggregatedListError *error
-
- // xxxHook allow you to intercept the standard processing of the mock in
- // order to add your own logic. Return (true, _, _) to prevent the normal
- // execution flow of the mock. Return (false, nil, nil) to continue with
- // normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaNetworkEndpointGroups) (bool, *alpha.NetworkEndpointGroup, error)
- ListHook func(ctx context.Context, zone string, fl *filter.F, m *MockAlphaNetworkEndpointGroups) (bool, []*alpha.NetworkEndpointGroup, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *alpha.NetworkEndpointGroup, m *MockAlphaNetworkEndpointGroups) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaNetworkEndpointGroups) (bool, error)
- AggregatedListHook func(ctx context.Context, fl *filter.F, m *MockAlphaNetworkEndpointGroups) (bool, map[string][]*alpha.NetworkEndpointGroup, error)
- AttachNetworkEndpointsHook func(context.Context, *meta.Key, *alpha.NetworkEndpointGroupsAttachEndpointsRequest, *MockAlphaNetworkEndpointGroups) error
- DetachNetworkEndpointsHook func(context.Context, *meta.Key, *alpha.NetworkEndpointGroupsDetachEndpointsRequest, *MockAlphaNetworkEndpointGroups) error
- ListNetworkEndpointsHook func(context.Context, *meta.Key, *alpha.NetworkEndpointGroupsListEndpointsRequest, *filter.F, *MockAlphaNetworkEndpointGroups) ([]*alpha.NetworkEndpointWithHealthStatus, error)
-
- // X is extra state that can be used as part of the mock. Generated code
- // will not use this field.
- X interface{}
-}
+// DetachDisk is a method on GCEAlphaInstances.
+func (g *GCEAlphaInstances) DetachDisk(ctx context.Context, key *meta.Key, arg0 string) error {
+ klog.V(5).Infof("GCEAlphaInstances.DetachDisk(%v, %v, ...): called", ctx, key)
-// Get returns the object from the mock.
-func (m *MockAlphaNetworkEndpointGroups) Get(ctx context.Context, key *meta.Key) (*alpha.NetworkEndpointGroup, error) {
- if m.GetHook != nil {
- if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockAlphaNetworkEndpointGroups.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
- return obj, err
- }
- }
if !key.Valid() {
- return nil, fmt.Errorf("invalid GCE key (%+v)", key)
+ klog.V(2).Infof("GCEAlphaInstances.DetachDisk(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Instances")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "DetachDisk",
+ Version: meta.Version("alpha"),
+ Service: "Instances",
+ }
+ klog.V(5).Infof("GCEAlphaInstances.DetachDisk(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCEAlphaInstances.DetachDisk(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ return err
+ }
+ call := g.s.Alpha.Instances.DetachDisk(projectID, key.Zone, key.Name, arg0)
+ call.Context(ctx)
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCEAlphaInstances.DetachDisk(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+ }
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCEAlphaInstances.DetachDisk(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+}
+
+// UpdateNetworkInterface is a method on GCEAlphaInstances.
+func (g *GCEAlphaInstances) UpdateNetworkInterface(ctx context.Context, key *meta.Key, arg0 string, arg1 *alpha.NetworkInterface) error {
+ klog.V(5).Infof("GCEAlphaInstances.UpdateNetworkInterface(%v, %v, ...): called", ctx, key)
+
+ if !key.Valid() {
+ klog.V(2).Infof("GCEAlphaInstances.UpdateNetworkInterface(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Instances")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "UpdateNetworkInterface",
+ Version: meta.Version("alpha"),
+ Service: "Instances",
+ }
+ klog.V(5).Infof("GCEAlphaInstances.UpdateNetworkInterface(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCEAlphaInstances.UpdateNetworkInterface(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ return err
+ }
+ call := g.s.Alpha.Instances.UpdateNetworkInterface(projectID, key.Zone, key.Name, arg0, arg1)
+ call.Context(ctx)
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCEAlphaInstances.UpdateNetworkInterface(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+ }
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCEAlphaInstances.UpdateNetworkInterface(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+}
+
+// AlphaNetworks is an interface that allows for mocking of Networks.
+type AlphaNetworks interface {
+ Get(ctx context.Context, key *meta.Key) (*alpha.Network, error)
+ List(ctx context.Context, fl *filter.F) ([]*alpha.Network, error)
+ Insert(ctx context.Context, key *meta.Key, obj *alpha.Network) error
+ Delete(ctx context.Context, key *meta.Key) error
+}
+
+// NewMockAlphaNetworks returns a new mock for Networks.
+func NewMockAlphaNetworks(pr ProjectRouter, objs map[meta.Key]*MockNetworksObj) *MockAlphaNetworks {
+ mock := &MockAlphaNetworks{
+ ProjectRouter: pr,
+
+ Objects: objs,
+ GetError: map[meta.Key]error{},
+ InsertError: map[meta.Key]error{},
+ DeleteError: map[meta.Key]error{},
+ }
+ return mock
+}
+
+// MockAlphaNetworks is the mock for Networks.
+type MockAlphaNetworks struct {
+ Lock sync.Mutex
+
+ ProjectRouter ProjectRouter
+
+ // Objects maintained by the mock.
+ Objects map[meta.Key]*MockNetworksObj
+
+ // If an entry exists for the given key and operation, then the error
+ // will be returned instead of the operation.
+ GetError map[meta.Key]error
+ ListError *error
+ InsertError map[meta.Key]error
+ DeleteError map[meta.Key]error
+
+ // xxxHook allow you to intercept the standard processing of the mock in
+ // order to add your own logic. Return (true, _, _) to prevent the normal
+ // execution flow of the mock. Return (false, nil, nil) to continue with
+ // normal mock behavior/ after the hook function executes.
+ GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaNetworks) (bool, *alpha.Network, error)
+ ListHook func(ctx context.Context, fl *filter.F, m *MockAlphaNetworks) (bool, []*alpha.Network, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *alpha.Network, m *MockAlphaNetworks) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaNetworks) (bool, error)
+
+ // X is extra state that can be used as part of the mock. Generated code
+ // will not use this field.
+ X interface{}
+}
+
+// Get returns the object from the mock.
+func (m *MockAlphaNetworks) Get(ctx context.Context, key *meta.Key) (*alpha.Network, error) {
+ if m.GetHook != nil {
+ if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
+ klog.V(5).Infof("MockAlphaNetworks.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ return obj, err
+ }
+ }
+ if !key.Valid() {
+ return nil, fmt.Errorf("invalid GCE key (%+v)", key)
}
m.Lock.Lock()
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockAlphaNetworkEndpointGroups.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaNetworks.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
typedObj := obj.ToAlpha()
- klog.V(5).Infof("MockAlphaNetworkEndpointGroups.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ klog.V(5).Infof("MockAlphaNetworks.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockAlphaNetworkEndpointGroups %v not found", key),
+ Message: fmt.Sprintf("MockAlphaNetworks %v not found", key),
}
- klog.V(5).Infof("MockAlphaNetworkEndpointGroups.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaNetworks.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
-// List all of the objects in the mock in the given zone.
-func (m *MockAlphaNetworkEndpointGroups) List(ctx context.Context, zone string, fl *filter.F) ([]*alpha.NetworkEndpointGroup, error) {
+// List all of the objects in the mock.
+func (m *MockAlphaNetworks) List(ctx context.Context, fl *filter.F) ([]*alpha.Network, error) {
if m.ListHook != nil {
- if intercept, objs, err := m.ListHook(ctx, zone, fl, m); intercept {
- klog.V(5).Infof("MockAlphaNetworkEndpointGroups.List(%v, %q, %v) = [%v items], %v", ctx, zone, fl, len(objs), err)
+ if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
+ klog.V(5).Infof("MockAlphaNetworks.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
return objs, err
}
}
@@ -15614,31 +15968,28 @@ func (m *MockAlphaNetworkEndpointGroups) List(ctx context.Context, zone string,
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockAlphaNetworkEndpointGroups.List(%v, %q, %v) = nil, %v", ctx, zone, fl, err)
+ klog.V(5).Infof("MockAlphaNetworks.List(%v, %v) = nil, %v", ctx, fl, err)
return nil, *m.ListError
}
- var objs []*alpha.NetworkEndpointGroup
- for key, obj := range m.Objects {
- if key.Zone != zone {
- continue
- }
+ var objs []*alpha.Network
+ for _, obj := range m.Objects {
if !fl.Match(obj.ToAlpha()) {
continue
}
objs = append(objs, obj.ToAlpha())
}
- klog.V(5).Infof("MockAlphaNetworkEndpointGroups.List(%v, %q, %v) = [%v items], nil", ctx, zone, fl, len(objs))
+ klog.V(5).Infof("MockAlphaNetworks.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockAlphaNetworkEndpointGroups) Insert(ctx context.Context, key *meta.Key, obj *alpha.NetworkEndpointGroup) error {
+func (m *MockAlphaNetworks) Insert(ctx context.Context, key *meta.Key, obj *alpha.Network) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockAlphaNetworkEndpointGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaNetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -15650,32 +16001,32 @@ func (m *MockAlphaNetworkEndpointGroups) Insert(ctx context.Context, key *meta.K
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockAlphaNetworkEndpointGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaNetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockAlphaNetworkEndpointGroups %v exists", key),
+ Message: fmt.Sprintf("MockAlphaNetworks %v exists", key),
}
- klog.V(5).Infof("MockAlphaNetworkEndpointGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaNetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "networkEndpointGroups")
- obj.SelfLink = SelfLink(meta.VersionAlpha, projectID, "networkEndpointGroups", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "networks")
+ obj.SelfLink = SelfLink(meta.VersionAlpha, projectID, "networks", key)
- m.Objects[*key] = &MockNetworkEndpointGroupsObj{obj}
- klog.V(5).Infof("MockAlphaNetworkEndpointGroups.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ m.Objects[*key] = &MockNetworksObj{obj}
+ klog.V(5).Infof("MockAlphaNetworks.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockAlphaNetworkEndpointGroups) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockAlphaNetworks) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockAlphaNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaNetworks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -15687,401 +16038,513 @@ func (m *MockAlphaNetworkEndpointGroups) Delete(ctx context.Context, key *meta.K
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockAlphaNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaNetworks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockAlphaNetworkEndpointGroups %v not found", key),
+ Message: fmt.Sprintf("MockAlphaNetworks %v not found", key),
}
- klog.V(5).Infof("MockAlphaNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaNetworks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockAlphaNetworkEndpointGroups.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockAlphaNetworks.Delete(%v, %v) = nil", ctx, key)
return nil
}
-// AggregatedList is a mock for AggregatedList.
-func (m *MockAlphaNetworkEndpointGroups) AggregatedList(ctx context.Context, fl *filter.F) (map[string][]*alpha.NetworkEndpointGroup, error) {
- if m.AggregatedListHook != nil {
- if intercept, objs, err := m.AggregatedListHook(ctx, fl, m); intercept {
- klog.V(5).Infof("MockAlphaNetworkEndpointGroups.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
- return objs, err
- }
- }
-
- m.Lock.Lock()
- defer m.Lock.Unlock()
-
- if m.AggregatedListError != nil {
- err := *m.AggregatedListError
- klog.V(5).Infof("MockAlphaNetworkEndpointGroups.AggregatedList(%v, %v) = nil, %v", ctx, fl, err)
- return nil, err
- }
-
- objs := map[string][]*alpha.NetworkEndpointGroup{}
- for _, obj := range m.Objects {
- res, err := ParseResourceURL(obj.ToAlpha().SelfLink)
- location := res.Key.Zone
- if err != nil {
- klog.V(5).Infof("MockAlphaNetworkEndpointGroups.AggregatedList(%v, %v) = nil, %v", ctx, fl, err)
- return nil, err
- }
- if !fl.Match(obj.ToAlpha()) {
- continue
- }
- objs[location] = append(objs[location], obj.ToAlpha())
- }
- klog.V(5).Infof("MockAlphaNetworkEndpointGroups.AggregatedList(%v, %v) = [%v items], nil", ctx, fl, len(objs))
- return objs, nil
-}
-
// Obj wraps the object for use in the mock.
-func (m *MockAlphaNetworkEndpointGroups) Obj(o *alpha.NetworkEndpointGroup) *MockNetworkEndpointGroupsObj {
- return &MockNetworkEndpointGroupsObj{o}
-}
-
-// AttachNetworkEndpoints is a mock for the corresponding method.
-func (m *MockAlphaNetworkEndpointGroups) AttachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *alpha.NetworkEndpointGroupsAttachEndpointsRequest) error {
- if m.AttachNetworkEndpointsHook != nil {
- return m.AttachNetworkEndpointsHook(ctx, key, arg0, m)
- }
- return nil
-}
-
-// DetachNetworkEndpoints is a mock for the corresponding method.
-func (m *MockAlphaNetworkEndpointGroups) DetachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *alpha.NetworkEndpointGroupsDetachEndpointsRequest) error {
- if m.DetachNetworkEndpointsHook != nil {
- return m.DetachNetworkEndpointsHook(ctx, key, arg0, m)
- }
- return nil
-}
-
-// ListNetworkEndpoints is a mock for the corresponding method.
-func (m *MockAlphaNetworkEndpointGroups) ListNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *alpha.NetworkEndpointGroupsListEndpointsRequest, fl *filter.F) ([]*alpha.NetworkEndpointWithHealthStatus, error) {
- if m.ListNetworkEndpointsHook != nil {
- return m.ListNetworkEndpointsHook(ctx, key, arg0, fl, m)
- }
- return nil, nil
+func (m *MockAlphaNetworks) Obj(o *alpha.Network) *MockNetworksObj {
+ return &MockNetworksObj{o}
}
-// GCEAlphaNetworkEndpointGroups is a simplifying adapter for the GCE NetworkEndpointGroups.
-type GCEAlphaNetworkEndpointGroups struct {
+// GCEAlphaNetworks is a simplifying adapter for the GCE Networks.
+type GCEAlphaNetworks struct {
s *Service
}
-// Get the NetworkEndpointGroup named by key.
-func (g *GCEAlphaNetworkEndpointGroups) Get(ctx context.Context, key *meta.Key) (*alpha.NetworkEndpointGroup, error) {
- klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.Get(%v, %v): called", ctx, key)
+// Get the Network named by key.
+func (g *GCEAlphaNetworks) Get(ctx context.Context, key *meta.Key) (*alpha.Network, error) {
+ klog.V(5).Infof("GCEAlphaNetworks.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaNetworkEndpointGroups.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaNetworks.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "NetworkEndpointGroups")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Networks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
Version: meta.Version("alpha"),
- Service: "NetworkEndpointGroups",
+ Service: "Networks",
}
- klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaNetworks.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaNetworks.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.Alpha.NetworkEndpointGroups.Get(projectID, key.Zone, key.Name)
+ call := g.s.Alpha.Networks.Get(projectID, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEAlphaNetworks.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
-// List all NetworkEndpointGroup objects.
-func (g *GCEAlphaNetworkEndpointGroups) List(ctx context.Context, zone string, fl *filter.F) ([]*alpha.NetworkEndpointGroup, error) {
- klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.List(%v, %v, %v) called", ctx, zone, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "NetworkEndpointGroups")
+// List all Network objects.
+func (g *GCEAlphaNetworks) List(ctx context.Context, fl *filter.F) ([]*alpha.Network, error) {
+ klog.V(5).Infof("GCEAlphaNetworks.List(%v, %v) called", ctx, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Networks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
Version: meta.Version("alpha"),
- Service: "NetworkEndpointGroups",
+ Service: "Networks",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, zone, fl, projectID, rk)
- call := g.s.Alpha.NetworkEndpointGroups.List(projectID, zone)
+ klog.V(5).Infof("GCEAlphaNetworks.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
+ call := g.s.Alpha.Networks.List(projectID)
if fl != filter.None {
call.Filter(fl.String())
}
- var all []*alpha.NetworkEndpointGroup
- f := func(l *alpha.NetworkEndpointGroupList) error {
- klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.List(%v, ..., %v): page %+v", ctx, fl, l)
+ var all []*alpha.Network
+ f := func(l *alpha.NetworkList) error {
+ klog.V(5).Infof("GCEAlphaNetworks.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEAlphaNetworks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEAlphaNetworks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEAlphaNetworks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
-// Insert NetworkEndpointGroup with key of value obj.
-func (g *GCEAlphaNetworkEndpointGroups) Insert(ctx context.Context, key *meta.Key, obj *alpha.NetworkEndpointGroup) error {
- klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.Insert(%v, %v, %+v): called", ctx, key, obj)
+// Insert Network with key of value obj.
+func (g *GCEAlphaNetworks) Insert(ctx context.Context, key *meta.Key, obj *alpha.Network) error {
+ klog.V(5).Infof("GCEAlphaNetworks.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaNetworkEndpointGroups.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaNetworks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "NetworkEndpointGroups")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Networks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
Version: meta.Version("alpha"),
- Service: "NetworkEndpointGroups",
+ Service: "Networks",
}
- klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaNetworks.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaNetworks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.Alpha.NetworkEndpointGroups.Insert(projectID, key.Zone, obj)
+ call := g.s.Alpha.Networks.Insert(projectID, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaNetworks.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCEAlphaNetworks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
-// Delete the NetworkEndpointGroup referenced by key.
-func (g *GCEAlphaNetworkEndpointGroups) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.Delete(%v, %v): called", ctx, key)
+// Delete the Network referenced by key.
+func (g *GCEAlphaNetworks) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEAlphaNetworks.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaNetworkEndpointGroups.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaNetworks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "NetworkEndpointGroups")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Networks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
Version: meta.Version("alpha"),
- Service: "NetworkEndpointGroups",
+ Service: "Networks",
}
- klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaNetworks.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaNetworks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Alpha.NetworkEndpointGroups.Delete(projectID, key.Zone, key.Name)
+ call := g.s.Alpha.Networks.Delete(projectID, key.Name)
+
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaNetworks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaNetworks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// AggregatedList lists all resources of the given type across all locations.
-func (g *GCEAlphaNetworkEndpointGroups) AggregatedList(ctx context.Context, fl *filter.F) (map[string][]*alpha.NetworkEndpointGroup, error) {
- klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.AggregatedList(%v, %v) called", ctx, fl)
+// BetaNetworks is an interface that allows for mocking of Networks.
+type BetaNetworks interface {
+ Get(ctx context.Context, key *meta.Key) (*beta.Network, error)
+ List(ctx context.Context, fl *filter.F) ([]*beta.Network, error)
+ Insert(ctx context.Context, key *meta.Key, obj *beta.Network) error
+ Delete(ctx context.Context, key *meta.Key) error
+}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "NetworkEndpointGroups")
- rk := &RateLimitKey{
- ProjectID: projectID,
- Operation: "AggregatedList",
- Version: meta.Version("alpha"),
- Service: "NetworkEndpointGroups",
+// NewMockBetaNetworks returns a new mock for Networks.
+func NewMockBetaNetworks(pr ProjectRouter, objs map[meta.Key]*MockNetworksObj) *MockBetaNetworks {
+ mock := &MockBetaNetworks{
+ ProjectRouter: pr,
+
+ Objects: objs,
+ GetError: map[meta.Key]error{},
+ InsertError: map[meta.Key]error{},
+ DeleteError: map[meta.Key]error{},
}
+ return mock
+}
- klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.AggregatedList(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
- if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.AggregatedList(%v, %v): RateLimiter error: %v", ctx, fl, err)
+// MockBetaNetworks is the mock for Networks.
+type MockBetaNetworks struct {
+ Lock sync.Mutex
+
+ ProjectRouter ProjectRouter
+
+ // Objects maintained by the mock.
+ Objects map[meta.Key]*MockNetworksObj
+
+ // If an entry exists for the given key and operation, then the error
+ // will be returned instead of the operation.
+ GetError map[meta.Key]error
+ ListError *error
+ InsertError map[meta.Key]error
+ DeleteError map[meta.Key]error
+
+ // xxxHook allow you to intercept the standard processing of the mock in
+ // order to add your own logic. Return (true, _, _) to prevent the normal
+ // execution flow of the mock. Return (false, nil, nil) to continue with
+ // normal mock behavior/ after the hook function executes.
+ GetHook func(ctx context.Context, key *meta.Key, m *MockBetaNetworks) (bool, *beta.Network, error)
+ ListHook func(ctx context.Context, fl *filter.F, m *MockBetaNetworks) (bool, []*beta.Network, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *beta.Network, m *MockBetaNetworks) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaNetworks) (bool, error)
+
+ // X is extra state that can be used as part of the mock. Generated code
+ // will not use this field.
+ X interface{}
+}
+
+// Get returns the object from the mock.
+func (m *MockBetaNetworks) Get(ctx context.Context, key *meta.Key) (*beta.Network, error) {
+ if m.GetHook != nil {
+ if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
+ klog.V(5).Infof("MockBetaNetworks.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ return obj, err
+ }
+ }
+ if !key.Valid() {
+ return nil, fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+
+ m.Lock.Lock()
+ defer m.Lock.Unlock()
+
+ if err, ok := m.GetError[*key]; ok {
+ klog.V(5).Infof("MockBetaNetworks.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
+ if obj, ok := m.Objects[*key]; ok {
+ typedObj := obj.ToBeta()
+ klog.V(5).Infof("MockBetaNetworks.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ return typedObj, nil
+ }
- call := g.s.Alpha.NetworkEndpointGroups.AggregatedList(projectID)
- call.Context(ctx)
- if fl != filter.None {
- call.Filter(fl.String())
+ err := &googleapi.Error{
+ Code: http.StatusNotFound,
+ Message: fmt.Sprintf("MockBetaNetworks %v not found", key),
}
+ klog.V(5).Infof("MockBetaNetworks.Get(%v, %s) = nil, %v", ctx, key, err)
+ return nil, err
+}
- all := map[string][]*alpha.NetworkEndpointGroup{}
- f := func(l *alpha.NetworkEndpointGroupAggregatedList) error {
- for k, v := range l.Items {
- klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.AggregatedList(%v, %v): page[%v]%+v", ctx, fl, k, v)
- all[k] = append(all[k], v.NetworkEndpointGroups...)
+// List all of the objects in the mock.
+func (m *MockBetaNetworks) List(ctx context.Context, fl *filter.F) ([]*beta.Network, error) {
+ if m.ListHook != nil {
+ if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
+ klog.V(5).Infof("MockBetaNetworks.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
+ return objs, err
}
- return nil
}
- if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.AggregatedList(%v, %v) = %v, %v", ctx, fl, nil, err)
- return nil, err
+
+ m.Lock.Lock()
+ defer m.Lock.Unlock()
+
+ if m.ListError != nil {
+ err := *m.ListError
+ klog.V(5).Infof("MockBetaNetworks.List(%v, %v) = nil, %v", ctx, fl, err)
+
+ return nil, *m.ListError
}
- if klog.V(4) {
- klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
- var asStr []string
- for _, o := range all {
- asStr = append(asStr, fmt.Sprintf("%+v", o))
+
+ var objs []*beta.Network
+ for _, obj := range m.Objects {
+ if !fl.Match(obj.ToBeta()) {
+ continue
}
- klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.AggregatedList(%v, %v) = %v, %v", ctx, fl, asStr, nil)
+ objs = append(objs, obj.ToBeta())
}
- return all, nil
-}
-// AttachNetworkEndpoints is a method on GCEAlphaNetworkEndpointGroups.
-func (g *GCEAlphaNetworkEndpointGroups) AttachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *alpha.NetworkEndpointGroupsAttachEndpointsRequest) error {
- klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...): called", ctx, key)
+ klog.V(5).Infof("MockBetaNetworks.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
+ return objs, nil
+}
+// Insert is a mock for inserting/creating a new object.
+func (m *MockBetaNetworks) Insert(ctx context.Context, key *meta.Key, obj *beta.Network) error {
+ if m.InsertHook != nil {
+ if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
+ klog.V(5).Infof("MockBetaNetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ return err
+ }
+ }
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "NetworkEndpointGroups")
- rk := &RateLimitKey{
- ProjectID: projectID,
- Operation: "AttachNetworkEndpoints",
- Version: meta.Version("alpha"),
- Service: "NetworkEndpointGroups",
- }
- klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
- if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ m.Lock.Lock()
+ defer m.Lock.Unlock()
+
+ if err, ok := m.InsertError[*key]; ok {
+ klog.V(5).Infof("MockBetaNetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
- call := g.s.Alpha.NetworkEndpointGroups.AttachNetworkEndpoints(projectID, key.Zone, key.Name, arg0)
- call.Context(ctx)
- op, err := call.Do()
- if err != nil {
- klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err)
+ if _, ok := m.Objects[*key]; ok {
+ err := &googleapi.Error{
+ Code: http.StatusConflict,
+ Message: fmt.Sprintf("MockBetaNetworks %v exists", key),
+ }
+ klog.V(5).Infof("MockBetaNetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
- err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err)
- return err
-}
-// DetachNetworkEndpoints is a method on GCEAlphaNetworkEndpointGroups.
-func (g *GCEAlphaNetworkEndpointGroups) DetachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *alpha.NetworkEndpointGroupsDetachEndpointsRequest) error {
- klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...): called", ctx, key)
+ obj.Name = key.Name
+ projectID := m.ProjectRouter.ProjectID(ctx, "beta", "networks")
+ obj.SelfLink = SelfLink(meta.VersionBeta, projectID, "networks", key)
- if !key.Valid() {
- klog.V(2).Infof("GCEAlphaNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
- return fmt.Errorf("invalid GCE key (%+v)", key)
- }
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "NetworkEndpointGroups")
- rk := &RateLimitKey{
- ProjectID: projectID,
- Operation: "DetachNetworkEndpoints",
- Version: meta.Version("alpha"),
- Service: "NetworkEndpointGroups",
+ m.Objects[*key] = &MockNetworksObj{obj}
+ klog.V(5).Infof("MockBetaNetworks.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ return nil
+}
+
+// Delete is a mock for deleting the object.
+func (m *MockBetaNetworks) Delete(ctx context.Context, key *meta.Key) error {
+ if m.DeleteHook != nil {
+ if intercept, err := m.DeleteHook(ctx, key, m); intercept {
+ klog.V(5).Infof("MockBetaNetworks.Delete(%v, %v) = %v", ctx, key, err)
+ return err
+ }
+ }
+ if !key.Valid() {
+ return fmt.Errorf("invalid GCE key (%+v)", key)
}
- klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
- if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ m.Lock.Lock()
+ defer m.Lock.Unlock()
+
+ if err, ok := m.DeleteError[*key]; ok {
+ klog.V(5).Infof("MockBetaNetworks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
- call := g.s.Alpha.NetworkEndpointGroups.DetachNetworkEndpoints(projectID, key.Zone, key.Name, arg0)
- call.Context(ctx)
- op, err := call.Do()
- if err != nil {
- klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err)
+ if _, ok := m.Objects[*key]; !ok {
+ err := &googleapi.Error{
+ Code: http.StatusNotFound,
+ Message: fmt.Sprintf("MockBetaNetworks %v not found", key),
+ }
+ klog.V(5).Infof("MockBetaNetworks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
- err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err)
- return err
+
+ delete(m.Objects, *key)
+ klog.V(5).Infof("MockBetaNetworks.Delete(%v, %v) = nil", ctx, key)
+ return nil
}
-// ListNetworkEndpoints is a method on GCEAlphaNetworkEndpointGroups.
-func (g *GCEAlphaNetworkEndpointGroups) ListNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *alpha.NetworkEndpointGroupsListEndpointsRequest, fl *filter.F) ([]*alpha.NetworkEndpointWithHealthStatus, error) {
- klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): called", ctx, key)
+// Obj wraps the object for use in the mock.
+func (m *MockBetaNetworks) Obj(o *beta.Network) *MockNetworksObj {
+ return &MockNetworksObj{o}
+}
+
+// GCEBetaNetworks is a simplifying adapter for the GCE Networks.
+type GCEBetaNetworks struct {
+ s *Service
+}
+
+// Get the Network named by key.
+func (g *GCEBetaNetworks) Get(ctx context.Context, key *meta.Key) (*beta.Network, error) {
+ klog.V(5).Infof("GCEBetaNetworks.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
- return nil, fmt.Errorf("invalid GCE key (%+v)", key)
+ klog.V(2).Infof("GCEBetaNetworks.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "NetworkEndpointGroups")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Networks")
rk := &RateLimitKey{
ProjectID: projectID,
- Operation: "ListNetworkEndpoints",
- Version: meta.Version("alpha"),
- Service: "NetworkEndpointGroups",
+ Operation: "Get",
+ Version: meta.Version("beta"),
+ Service: "Networks",
}
- klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaNetworks.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCEBetaNetworks.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ return nil, err
+ }
+ call := g.s.Beta.Networks.Get(projectID, key.Name)
+ call.Context(ctx)
+ v, err := call.Do()
+ klog.V(4).Infof("GCEBetaNetworks.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ return v, err
+}
+// List all Network objects.
+func (g *GCEBetaNetworks) List(ctx context.Context, fl *filter.F) ([]*beta.Network, error) {
+ klog.V(5).Infof("GCEBetaNetworks.List(%v, %v) called", ctx, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Networks")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "List",
+ Version: meta.Version("beta"),
+ Service: "Networks",
+ }
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.Alpha.NetworkEndpointGroups.ListNetworkEndpoints(projectID, key.Zone, key.Name, arg0)
- var all []*alpha.NetworkEndpointWithHealthStatus
- f := func(l *alpha.NetworkEndpointGroupsListNetworkEndpoints) error {
- klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): page %+v", ctx, key, l)
+ klog.V(5).Infof("GCEBetaNetworks.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
+ call := g.s.Beta.Networks.List(projectID)
+ if fl != filter.None {
+ call.Filter(fl.String())
+ }
+ var all []*beta.Network
+ f := func(l *beta.NetworkList) error {
+ klog.V(5).Infof("GCEBetaNetworks.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = %v, %v", ctx, key, nil, err)
+ klog.V(4).Infof("GCEBetaNetworks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = [%v items], %v", ctx, key, len(all), nil)
- } else if klog.V(5) {
+
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEBetaNetworks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = %v, %v", ctx, key, asStr, nil)
+ klog.V(5).Infof("GCEBetaNetworks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
+
return all, nil
}
-// BetaNetworkEndpointGroups is an interface that allows for mocking of NetworkEndpointGroups.
-type BetaNetworkEndpointGroups interface {
- Get(ctx context.Context, key *meta.Key) (*beta.NetworkEndpointGroup, error)
- List(ctx context.Context, zone string, fl *filter.F) ([]*beta.NetworkEndpointGroup, error)
- Insert(ctx context.Context, key *meta.Key, obj *beta.NetworkEndpointGroup) error
+// Insert Network with key of value obj.
+func (g *GCEBetaNetworks) Insert(ctx context.Context, key *meta.Key, obj *beta.Network) error {
+ klog.V(5).Infof("GCEBetaNetworks.Insert(%v, %v, %+v): called", ctx, key, obj)
+ if !key.Valid() {
+ klog.V(2).Infof("GCEBetaNetworks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Networks")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "Insert",
+ Version: meta.Version("beta"),
+ Service: "Networks",
+ }
+ klog.V(5).Infof("GCEBetaNetworks.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCEBetaNetworks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ return err
+ }
+ obj.Name = key.Name
+ call := g.s.Beta.Networks.Insert(projectID, obj)
+ call.Context(ctx)
+
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCEBetaNetworks.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+ }
+
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCEBetaNetworks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ return err
+}
+
+// Delete the Network referenced by key.
+func (g *GCEBetaNetworks) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEBetaNetworks.Delete(%v, %v): called", ctx, key)
+ if !key.Valid() {
+ klog.V(2).Infof("GCEBetaNetworks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Networks")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "Delete",
+ Version: meta.Version("beta"),
+ Service: "Networks",
+ }
+ klog.V(5).Infof("GCEBetaNetworks.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCEBetaNetworks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ return err
+ }
+ call := g.s.Beta.Networks.Delete(projectID, key.Name)
+
+ call.Context(ctx)
+
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCEBetaNetworks.Delete(%v, %v) = %v", ctx, key, err)
+ return err
+ }
+
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCEBetaNetworks.Delete(%v, %v) = %v", ctx, key, err)
+ return err
+}
+
+// Networks is an interface that allows for mocking of Networks.
+type Networks interface {
+ Get(ctx context.Context, key *meta.Key) (*ga.Network, error)
+ List(ctx context.Context, fl *filter.F) ([]*ga.Network, error)
+ Insert(ctx context.Context, key *meta.Key, obj *ga.Network) error
Delete(ctx context.Context, key *meta.Key) error
- AggregatedList(ctx context.Context, fl *filter.F) (map[string][]*beta.NetworkEndpointGroup, error)
- AttachNetworkEndpoints(context.Context, *meta.Key, *beta.NetworkEndpointGroupsAttachEndpointsRequest) error
- DetachNetworkEndpoints(context.Context, *meta.Key, *beta.NetworkEndpointGroupsDetachEndpointsRequest) error
- ListNetworkEndpoints(context.Context, *meta.Key, *beta.NetworkEndpointGroupsListEndpointsRequest, *filter.F) ([]*beta.NetworkEndpointWithHealthStatus, error)
}
-// NewMockBetaNetworkEndpointGroups returns a new mock for NetworkEndpointGroups.
-func NewMockBetaNetworkEndpointGroups(pr ProjectRouter, objs map[meta.Key]*MockNetworkEndpointGroupsObj) *MockBetaNetworkEndpointGroups {
- mock := &MockBetaNetworkEndpointGroups{
+// NewMockNetworks returns a new mock for Networks.
+func NewMockNetworks(pr ProjectRouter, objs map[meta.Key]*MockNetworksObj) *MockNetworks {
+ mock := &MockNetworks{
ProjectRouter: pr,
Objects: objs,
@@ -16092,35 +16555,30 @@ func NewMockBetaNetworkEndpointGroups(pr ProjectRouter, objs map[meta.Key]*MockN
return mock
}
-// MockBetaNetworkEndpointGroups is the mock for NetworkEndpointGroups.
-type MockBetaNetworkEndpointGroups struct {
+// MockNetworks is the mock for Networks.
+type MockNetworks struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
// Objects maintained by the mock.
- Objects map[meta.Key]*MockNetworkEndpointGroupsObj
+ Objects map[meta.Key]*MockNetworksObj
// If an entry exists for the given key and operation, then the error
// will be returned instead of the operation.
- GetError map[meta.Key]error
- ListError *error
- InsertError map[meta.Key]error
- DeleteError map[meta.Key]error
- AggregatedListError *error
+ GetError map[meta.Key]error
+ ListError *error
+ InsertError map[meta.Key]error
+ DeleteError map[meta.Key]error
// xxxHook allow you to intercept the standard processing of the mock in
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockBetaNetworkEndpointGroups) (bool, *beta.NetworkEndpointGroup, error)
- ListHook func(ctx context.Context, zone string, fl *filter.F, m *MockBetaNetworkEndpointGroups) (bool, []*beta.NetworkEndpointGroup, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *beta.NetworkEndpointGroup, m *MockBetaNetworkEndpointGroups) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaNetworkEndpointGroups) (bool, error)
- AggregatedListHook func(ctx context.Context, fl *filter.F, m *MockBetaNetworkEndpointGroups) (bool, map[string][]*beta.NetworkEndpointGroup, error)
- AttachNetworkEndpointsHook func(context.Context, *meta.Key, *beta.NetworkEndpointGroupsAttachEndpointsRequest, *MockBetaNetworkEndpointGroups) error
- DetachNetworkEndpointsHook func(context.Context, *meta.Key, *beta.NetworkEndpointGroupsDetachEndpointsRequest, *MockBetaNetworkEndpointGroups) error
- ListNetworkEndpointsHook func(context.Context, *meta.Key, *beta.NetworkEndpointGroupsListEndpointsRequest, *filter.F, *MockBetaNetworkEndpointGroups) ([]*beta.NetworkEndpointWithHealthStatus, error)
+ GetHook func(ctx context.Context, key *meta.Key, m *MockNetworks) (bool, *ga.Network, error)
+ ListHook func(ctx context.Context, fl *filter.F, m *MockNetworks) (bool, []*ga.Network, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *ga.Network, m *MockNetworks) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockNetworks) (bool, error)
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -16128,10 +16586,10 @@ type MockBetaNetworkEndpointGroups struct {
}
// Get returns the object from the mock.
-func (m *MockBetaNetworkEndpointGroups) Get(ctx context.Context, key *meta.Key) (*beta.NetworkEndpointGroup, error) {
+func (m *MockNetworks) Get(ctx context.Context, key *meta.Key) (*ga.Network, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockBetaNetworkEndpointGroups.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockNetworks.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -16143,28 +16601,28 @@ func (m *MockBetaNetworkEndpointGroups) Get(ctx context.Context, key *meta.Key)
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockBetaNetworkEndpointGroups.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockNetworks.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
- typedObj := obj.ToBeta()
- klog.V(5).Infof("MockBetaNetworkEndpointGroups.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ typedObj := obj.ToGA()
+ klog.V(5).Infof("MockNetworks.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockBetaNetworkEndpointGroups %v not found", key),
+ Message: fmt.Sprintf("MockNetworks %v not found", key),
}
- klog.V(5).Infof("MockBetaNetworkEndpointGroups.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockNetworks.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
-// List all of the objects in the mock in the given zone.
-func (m *MockBetaNetworkEndpointGroups) List(ctx context.Context, zone string, fl *filter.F) ([]*beta.NetworkEndpointGroup, error) {
+// List all of the objects in the mock.
+func (m *MockNetworks) List(ctx context.Context, fl *filter.F) ([]*ga.Network, error) {
if m.ListHook != nil {
- if intercept, objs, err := m.ListHook(ctx, zone, fl, m); intercept {
- klog.V(5).Infof("MockBetaNetworkEndpointGroups.List(%v, %q, %v) = [%v items], %v", ctx, zone, fl, len(objs), err)
+ if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
+ klog.V(5).Infof("MockNetworks.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
return objs, err
}
}
@@ -16174,31 +16632,28 @@ func (m *MockBetaNetworkEndpointGroups) List(ctx context.Context, zone string, f
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockBetaNetworkEndpointGroups.List(%v, %q, %v) = nil, %v", ctx, zone, fl, err)
+ klog.V(5).Infof("MockNetworks.List(%v, %v) = nil, %v", ctx, fl, err)
return nil, *m.ListError
}
- var objs []*beta.NetworkEndpointGroup
- for key, obj := range m.Objects {
- if key.Zone != zone {
- continue
- }
- if !fl.Match(obj.ToBeta()) {
+ var objs []*ga.Network
+ for _, obj := range m.Objects {
+ if !fl.Match(obj.ToGA()) {
continue
}
- objs = append(objs, obj.ToBeta())
+ objs = append(objs, obj.ToGA())
}
- klog.V(5).Infof("MockBetaNetworkEndpointGroups.List(%v, %q, %v) = [%v items], nil", ctx, zone, fl, len(objs))
+ klog.V(5).Infof("MockNetworks.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockBetaNetworkEndpointGroups) Insert(ctx context.Context, key *meta.Key, obj *beta.NetworkEndpointGroup) error {
+func (m *MockNetworks) Insert(ctx context.Context, key *meta.Key, obj *ga.Network) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockBetaNetworkEndpointGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockNetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -16210,32 +16665,32 @@ func (m *MockBetaNetworkEndpointGroups) Insert(ctx context.Context, key *meta.Ke
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockBetaNetworkEndpointGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockNetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockBetaNetworkEndpointGroups %v exists", key),
+ Message: fmt.Sprintf("MockNetworks %v exists", key),
}
- klog.V(5).Infof("MockBetaNetworkEndpointGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockNetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "beta", "networkEndpointGroups")
- obj.SelfLink = SelfLink(meta.VersionBeta, projectID, "networkEndpointGroups", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "ga", "networks")
+ obj.SelfLink = SelfLink(meta.VersionGA, projectID, "networks", key)
- m.Objects[*key] = &MockNetworkEndpointGroupsObj{obj}
- klog.V(5).Infof("MockBetaNetworkEndpointGroups.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ m.Objects[*key] = &MockNetworksObj{obj}
+ klog.V(5).Infof("MockNetworks.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockBetaNetworkEndpointGroups) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockNetworks) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockBetaNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockNetworks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -16247,414 +16702,198 @@ func (m *MockBetaNetworkEndpointGroups) Delete(ctx context.Context, key *meta.Ke
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockBetaNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockNetworks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockBetaNetworkEndpointGroups %v not found", key),
+ Message: fmt.Sprintf("MockNetworks %v not found", key),
}
- klog.V(5).Infof("MockBetaNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockNetworks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockBetaNetworkEndpointGroups.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockNetworks.Delete(%v, %v) = nil", ctx, key)
return nil
}
-// AggregatedList is a mock for AggregatedList.
-func (m *MockBetaNetworkEndpointGroups) AggregatedList(ctx context.Context, fl *filter.F) (map[string][]*beta.NetworkEndpointGroup, error) {
- if m.AggregatedListHook != nil {
- if intercept, objs, err := m.AggregatedListHook(ctx, fl, m); intercept {
- klog.V(5).Infof("MockBetaNetworkEndpointGroups.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
- return objs, err
- }
- }
-
- m.Lock.Lock()
- defer m.Lock.Unlock()
-
- if m.AggregatedListError != nil {
- err := *m.AggregatedListError
- klog.V(5).Infof("MockBetaNetworkEndpointGroups.AggregatedList(%v, %v) = nil, %v", ctx, fl, err)
- return nil, err
- }
-
- objs := map[string][]*beta.NetworkEndpointGroup{}
- for _, obj := range m.Objects {
- res, err := ParseResourceURL(obj.ToBeta().SelfLink)
- location := res.Key.Zone
- if err != nil {
- klog.V(5).Infof("MockBetaNetworkEndpointGroups.AggregatedList(%v, %v) = nil, %v", ctx, fl, err)
- return nil, err
- }
- if !fl.Match(obj.ToBeta()) {
- continue
- }
- objs[location] = append(objs[location], obj.ToBeta())
- }
- klog.V(5).Infof("MockBetaNetworkEndpointGroups.AggregatedList(%v, %v) = [%v items], nil", ctx, fl, len(objs))
- return objs, nil
-}
-
// Obj wraps the object for use in the mock.
-func (m *MockBetaNetworkEndpointGroups) Obj(o *beta.NetworkEndpointGroup) *MockNetworkEndpointGroupsObj {
- return &MockNetworkEndpointGroupsObj{o}
-}
-
-// AttachNetworkEndpoints is a mock for the corresponding method.
-func (m *MockBetaNetworkEndpointGroups) AttachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *beta.NetworkEndpointGroupsAttachEndpointsRequest) error {
- if m.AttachNetworkEndpointsHook != nil {
- return m.AttachNetworkEndpointsHook(ctx, key, arg0, m)
- }
- return nil
-}
-
-// DetachNetworkEndpoints is a mock for the corresponding method.
-func (m *MockBetaNetworkEndpointGroups) DetachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *beta.NetworkEndpointGroupsDetachEndpointsRequest) error {
- if m.DetachNetworkEndpointsHook != nil {
- return m.DetachNetworkEndpointsHook(ctx, key, arg0, m)
- }
- return nil
-}
-
-// ListNetworkEndpoints is a mock for the corresponding method.
-func (m *MockBetaNetworkEndpointGroups) ListNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *beta.NetworkEndpointGroupsListEndpointsRequest, fl *filter.F) ([]*beta.NetworkEndpointWithHealthStatus, error) {
- if m.ListNetworkEndpointsHook != nil {
- return m.ListNetworkEndpointsHook(ctx, key, arg0, fl, m)
- }
- return nil, nil
+func (m *MockNetworks) Obj(o *ga.Network) *MockNetworksObj {
+ return &MockNetworksObj{o}
}
-// GCEBetaNetworkEndpointGroups is a simplifying adapter for the GCE NetworkEndpointGroups.
-type GCEBetaNetworkEndpointGroups struct {
+// GCENetworks is a simplifying adapter for the GCE Networks.
+type GCENetworks struct {
s *Service
}
-// Get the NetworkEndpointGroup named by key.
-func (g *GCEBetaNetworkEndpointGroups) Get(ctx context.Context, key *meta.Key) (*beta.NetworkEndpointGroup, error) {
- klog.V(5).Infof("GCEBetaNetworkEndpointGroups.Get(%v, %v): called", ctx, key)
+// Get the Network named by key.
+func (g *GCENetworks) Get(ctx context.Context, key *meta.Key) (*ga.Network, error) {
+ klog.V(5).Infof("GCENetworks.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaNetworkEndpointGroups.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCENetworks.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "NetworkEndpointGroups")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Networks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
- Version: meta.Version("beta"),
- Service: "NetworkEndpointGroups",
+ Version: meta.Version("ga"),
+ Service: "Networks",
}
- klog.V(5).Infof("GCEBetaNetworkEndpointGroups.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCENetworks.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaNetworkEndpointGroups.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCENetworks.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.Beta.NetworkEndpointGroups.Get(projectID, key.Zone, key.Name)
+ call := g.s.GA.Networks.Get(projectID, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEBetaNetworkEndpointGroups.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCENetworks.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
-// List all NetworkEndpointGroup objects.
-func (g *GCEBetaNetworkEndpointGroups) List(ctx context.Context, zone string, fl *filter.F) ([]*beta.NetworkEndpointGroup, error) {
- klog.V(5).Infof("GCEBetaNetworkEndpointGroups.List(%v, %v, %v) called", ctx, zone, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "NetworkEndpointGroups")
+// List all Network objects.
+func (g *GCENetworks) List(ctx context.Context, fl *filter.F) ([]*ga.Network, error) {
+ klog.V(5).Infof("GCENetworks.List(%v, %v) called", ctx, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Networks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
- Version: meta.Version("beta"),
- Service: "NetworkEndpointGroups",
+ Version: meta.Version("ga"),
+ Service: "Networks",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCEBetaNetworkEndpointGroups.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, zone, fl, projectID, rk)
- call := g.s.Beta.NetworkEndpointGroups.List(projectID, zone)
+ klog.V(5).Infof("GCENetworks.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
+ call := g.s.GA.Networks.List(projectID)
if fl != filter.None {
call.Filter(fl.String())
}
- var all []*beta.NetworkEndpointGroup
- f := func(l *beta.NetworkEndpointGroupList) error {
- klog.V(5).Infof("GCEBetaNetworkEndpointGroups.List(%v, ..., %v): page %+v", ctx, fl, l)
+ var all []*ga.Network
+ f := func(l *ga.NetworkList) error {
+ klog.V(5).Infof("GCENetworks.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEBetaNetworkEndpointGroups.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCENetworks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEBetaNetworkEndpointGroups.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCENetworks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEBetaNetworkEndpointGroups.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCENetworks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
-// Insert NetworkEndpointGroup with key of value obj.
-func (g *GCEBetaNetworkEndpointGroups) Insert(ctx context.Context, key *meta.Key, obj *beta.NetworkEndpointGroup) error {
- klog.V(5).Infof("GCEBetaNetworkEndpointGroups.Insert(%v, %v, %+v): called", ctx, key, obj)
+// Insert Network with key of value obj.
+func (g *GCENetworks) Insert(ctx context.Context, key *meta.Key, obj *ga.Network) error {
+ klog.V(5).Infof("GCENetworks.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaNetworkEndpointGroups.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCENetworks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "NetworkEndpointGroups")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Networks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
- Version: meta.Version("beta"),
- Service: "NetworkEndpointGroups",
+ Version: meta.Version("ga"),
+ Service: "Networks",
}
- klog.V(5).Infof("GCEBetaNetworkEndpointGroups.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCENetworks.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaNetworkEndpointGroups.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCENetworks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.Beta.NetworkEndpointGroups.Insert(projectID, key.Zone, obj)
+ call := g.s.GA.Networks.Insert(projectID, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaNetworkEndpointGroups.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCENetworks.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaNetworkEndpointGroups.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCENetworks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
-// Delete the NetworkEndpointGroup referenced by key.
-func (g *GCEBetaNetworkEndpointGroups) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEBetaNetworkEndpointGroups.Delete(%v, %v): called", ctx, key)
+// Delete the Network referenced by key.
+func (g *GCENetworks) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCENetworks.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaNetworkEndpointGroups.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCENetworks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "NetworkEndpointGroups")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Networks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
- Version: meta.Version("beta"),
- Service: "NetworkEndpointGroups",
+ Version: meta.Version("ga"),
+ Service: "Networks",
}
- klog.V(5).Infof("GCEBetaNetworkEndpointGroups.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCENetworks.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaNetworkEndpointGroups.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCENetworks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Beta.NetworkEndpointGroups.Delete(projectID, key.Zone, key.Name)
+ call := g.s.GA.Networks.Delete(projectID, key.Name)
+
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCENetworks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCENetworks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// AggregatedList lists all resources of the given type across all locations.
-func (g *GCEBetaNetworkEndpointGroups) AggregatedList(ctx context.Context, fl *filter.F) (map[string][]*beta.NetworkEndpointGroup, error) {
- klog.V(5).Infof("GCEBetaNetworkEndpointGroups.AggregatedList(%v, %v) called", ctx, fl)
+// AlphaNetworkEndpointGroups is an interface that allows for mocking of NetworkEndpointGroups.
+type AlphaNetworkEndpointGroups interface {
+ Get(ctx context.Context, key *meta.Key) (*alpha.NetworkEndpointGroup, error)
+ List(ctx context.Context, zone string, fl *filter.F) ([]*alpha.NetworkEndpointGroup, error)
+ Insert(ctx context.Context, key *meta.Key, obj *alpha.NetworkEndpointGroup) error
+ Delete(ctx context.Context, key *meta.Key) error
+ AggregatedList(ctx context.Context, fl *filter.F) (map[string][]*alpha.NetworkEndpointGroup, error)
+ AttachNetworkEndpoints(context.Context, *meta.Key, *alpha.NetworkEndpointGroupsAttachEndpointsRequest) error
+ DetachNetworkEndpoints(context.Context, *meta.Key, *alpha.NetworkEndpointGroupsDetachEndpointsRequest) error
+ ListNetworkEndpoints(context.Context, *meta.Key, *alpha.NetworkEndpointGroupsListEndpointsRequest, *filter.F) ([]*alpha.NetworkEndpointWithHealthStatus, error)
+}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "NetworkEndpointGroups")
- rk := &RateLimitKey{
- ProjectID: projectID,
- Operation: "AggregatedList",
- Version: meta.Version("beta"),
- Service: "NetworkEndpointGroups",
- }
+// NewMockAlphaNetworkEndpointGroups returns a new mock for NetworkEndpointGroups.
+func NewMockAlphaNetworkEndpointGroups(pr ProjectRouter, objs map[meta.Key]*MockNetworkEndpointGroupsObj) *MockAlphaNetworkEndpointGroups {
+ mock := &MockAlphaNetworkEndpointGroups{
+ ProjectRouter: pr,
- klog.V(5).Infof("GCEBetaNetworkEndpointGroups.AggregatedList(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
- if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(5).Infof("GCEBetaNetworkEndpointGroups.AggregatedList(%v, %v): RateLimiter error: %v", ctx, fl, err)
- return nil, err
+ Objects: objs,
+ GetError: map[meta.Key]error{},
+ InsertError: map[meta.Key]error{},
+ DeleteError: map[meta.Key]error{},
}
+ return mock
+}
- call := g.s.Beta.NetworkEndpointGroups.AggregatedList(projectID)
- call.Context(ctx)
- if fl != filter.None {
- call.Filter(fl.String())
- }
-
- all := map[string][]*beta.NetworkEndpointGroup{}
- f := func(l *beta.NetworkEndpointGroupAggregatedList) error {
- for k, v := range l.Items {
- klog.V(5).Infof("GCEBetaNetworkEndpointGroups.AggregatedList(%v, %v): page[%v]%+v", ctx, fl, k, v)
- all[k] = append(all[k], v.NetworkEndpointGroups...)
- }
- return nil
- }
- if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEBetaNetworkEndpointGroups.AggregatedList(%v, %v) = %v, %v", ctx, fl, nil, err)
- return nil, err
- }
- if klog.V(4) {
- klog.V(4).Infof("GCEBetaNetworkEndpointGroups.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
- var asStr []string
- for _, o := range all {
- asStr = append(asStr, fmt.Sprintf("%+v", o))
- }
- klog.V(5).Infof("GCEBetaNetworkEndpointGroups.AggregatedList(%v, %v) = %v, %v", ctx, fl, asStr, nil)
- }
- return all, nil
-}
-
-// AttachNetworkEndpoints is a method on GCEBetaNetworkEndpointGroups.
-func (g *GCEBetaNetworkEndpointGroups) AttachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *beta.NetworkEndpointGroupsAttachEndpointsRequest) error {
- klog.V(5).Infof("GCEBetaNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...): called", ctx, key)
-
- if !key.Valid() {
- klog.V(2).Infof("GCEBetaNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
- return fmt.Errorf("invalid GCE key (%+v)", key)
- }
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "NetworkEndpointGroups")
- rk := &RateLimitKey{
- ProjectID: projectID,
- Operation: "AttachNetworkEndpoints",
- Version: meta.Version("beta"),
- Service: "NetworkEndpointGroups",
- }
- klog.V(5).Infof("GCEBetaNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
-
- if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
- return err
- }
- call := g.s.Beta.NetworkEndpointGroups.AttachNetworkEndpoints(projectID, key.Zone, key.Name, arg0)
- call.Context(ctx)
- op, err := call.Do()
- if err != nil {
- klog.V(4).Infof("GCEBetaNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err)
- return err
- }
- err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err)
- return err
-}
-
-// DetachNetworkEndpoints is a method on GCEBetaNetworkEndpointGroups.
-func (g *GCEBetaNetworkEndpointGroups) DetachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *beta.NetworkEndpointGroupsDetachEndpointsRequest) error {
- klog.V(5).Infof("GCEBetaNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...): called", ctx, key)
-
- if !key.Valid() {
- klog.V(2).Infof("GCEBetaNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
- return fmt.Errorf("invalid GCE key (%+v)", key)
- }
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "NetworkEndpointGroups")
- rk := &RateLimitKey{
- ProjectID: projectID,
- Operation: "DetachNetworkEndpoints",
- Version: meta.Version("beta"),
- Service: "NetworkEndpointGroups",
- }
- klog.V(5).Infof("GCEBetaNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
-
- if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
- return err
- }
- call := g.s.Beta.NetworkEndpointGroups.DetachNetworkEndpoints(projectID, key.Zone, key.Name, arg0)
- call.Context(ctx)
- op, err := call.Do()
- if err != nil {
- klog.V(4).Infof("GCEBetaNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err)
- return err
- }
- err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err)
- return err
-}
-
-// ListNetworkEndpoints is a method on GCEBetaNetworkEndpointGroups.
-func (g *GCEBetaNetworkEndpointGroups) ListNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *beta.NetworkEndpointGroupsListEndpointsRequest, fl *filter.F) ([]*beta.NetworkEndpointWithHealthStatus, error) {
- klog.V(5).Infof("GCEBetaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): called", ctx, key)
-
- if !key.Valid() {
- klog.V(2).Infof("GCEBetaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
- return nil, fmt.Errorf("invalid GCE key (%+v)", key)
- }
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "NetworkEndpointGroups")
- rk := &RateLimitKey{
- ProjectID: projectID,
- Operation: "ListNetworkEndpoints",
- Version: meta.Version("beta"),
- Service: "NetworkEndpointGroups",
- }
- klog.V(5).Infof("GCEBetaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
-
- if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
- return nil, err
- }
- call := g.s.Beta.NetworkEndpointGroups.ListNetworkEndpoints(projectID, key.Zone, key.Name, arg0)
- var all []*beta.NetworkEndpointWithHealthStatus
- f := func(l *beta.NetworkEndpointGroupsListNetworkEndpoints) error {
- klog.V(5).Infof("GCEBetaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): page %+v", ctx, key, l)
- all = append(all, l.Items...)
- return nil
- }
- if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEBetaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = %v, %v", ctx, key, nil, err)
- return nil, err
- }
- if klog.V(4) {
- klog.V(4).Infof("GCEBetaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = [%v items], %v", ctx, key, len(all), nil)
- } else if klog.V(5) {
- var asStr []string
- for _, o := range all {
- asStr = append(asStr, fmt.Sprintf("%+v", o))
- }
- klog.V(5).Infof("GCEBetaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = %v, %v", ctx, key, asStr, nil)
- }
- return all, nil
-}
-
-// NetworkEndpointGroups is an interface that allows for mocking of NetworkEndpointGroups.
-type NetworkEndpointGroups interface {
- Get(ctx context.Context, key *meta.Key) (*ga.NetworkEndpointGroup, error)
- List(ctx context.Context, zone string, fl *filter.F) ([]*ga.NetworkEndpointGroup, error)
- Insert(ctx context.Context, key *meta.Key, obj *ga.NetworkEndpointGroup) error
- Delete(ctx context.Context, key *meta.Key) error
- AggregatedList(ctx context.Context, fl *filter.F) (map[string][]*ga.NetworkEndpointGroup, error)
- AttachNetworkEndpoints(context.Context, *meta.Key, *ga.NetworkEndpointGroupsAttachEndpointsRequest) error
- DetachNetworkEndpoints(context.Context, *meta.Key, *ga.NetworkEndpointGroupsDetachEndpointsRequest) error
- ListNetworkEndpoints(context.Context, *meta.Key, *ga.NetworkEndpointGroupsListEndpointsRequest, *filter.F) ([]*ga.NetworkEndpointWithHealthStatus, error)
-}
-
-// NewMockNetworkEndpointGroups returns a new mock for NetworkEndpointGroups.
-func NewMockNetworkEndpointGroups(pr ProjectRouter, objs map[meta.Key]*MockNetworkEndpointGroupsObj) *MockNetworkEndpointGroups {
- mock := &MockNetworkEndpointGroups{
- ProjectRouter: pr,
-
- Objects: objs,
- GetError: map[meta.Key]error{},
- InsertError: map[meta.Key]error{},
- DeleteError: map[meta.Key]error{},
- }
- return mock
-}
-
-// MockNetworkEndpointGroups is the mock for NetworkEndpointGroups.
-type MockNetworkEndpointGroups struct {
- Lock sync.Mutex
+// MockAlphaNetworkEndpointGroups is the mock for NetworkEndpointGroups.
+type MockAlphaNetworkEndpointGroups struct {
+ Lock sync.Mutex
ProjectRouter ProjectRouter
@@ -16673,14 +16912,14 @@ type MockNetworkEndpointGroups struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockNetworkEndpointGroups) (bool, *ga.NetworkEndpointGroup, error)
- ListHook func(ctx context.Context, zone string, fl *filter.F, m *MockNetworkEndpointGroups) (bool, []*ga.NetworkEndpointGroup, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *ga.NetworkEndpointGroup, m *MockNetworkEndpointGroups) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockNetworkEndpointGroups) (bool, error)
- AggregatedListHook func(ctx context.Context, fl *filter.F, m *MockNetworkEndpointGroups) (bool, map[string][]*ga.NetworkEndpointGroup, error)
- AttachNetworkEndpointsHook func(context.Context, *meta.Key, *ga.NetworkEndpointGroupsAttachEndpointsRequest, *MockNetworkEndpointGroups) error
- DetachNetworkEndpointsHook func(context.Context, *meta.Key, *ga.NetworkEndpointGroupsDetachEndpointsRequest, *MockNetworkEndpointGroups) error
- ListNetworkEndpointsHook func(context.Context, *meta.Key, *ga.NetworkEndpointGroupsListEndpointsRequest, *filter.F, *MockNetworkEndpointGroups) ([]*ga.NetworkEndpointWithHealthStatus, error)
+ GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaNetworkEndpointGroups) (bool, *alpha.NetworkEndpointGroup, error)
+ ListHook func(ctx context.Context, zone string, fl *filter.F, m *MockAlphaNetworkEndpointGroups) (bool, []*alpha.NetworkEndpointGroup, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *alpha.NetworkEndpointGroup, m *MockAlphaNetworkEndpointGroups) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaNetworkEndpointGroups) (bool, error)
+ AggregatedListHook func(ctx context.Context, fl *filter.F, m *MockAlphaNetworkEndpointGroups) (bool, map[string][]*alpha.NetworkEndpointGroup, error)
+ AttachNetworkEndpointsHook func(context.Context, *meta.Key, *alpha.NetworkEndpointGroupsAttachEndpointsRequest, *MockAlphaNetworkEndpointGroups) error
+ DetachNetworkEndpointsHook func(context.Context, *meta.Key, *alpha.NetworkEndpointGroupsDetachEndpointsRequest, *MockAlphaNetworkEndpointGroups) error
+ ListNetworkEndpointsHook func(context.Context, *meta.Key, *alpha.NetworkEndpointGroupsListEndpointsRequest, *filter.F, *MockAlphaNetworkEndpointGroups) ([]*alpha.NetworkEndpointWithHealthStatus, error)
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -16688,10 +16927,10 @@ type MockNetworkEndpointGroups struct {
}
// Get returns the object from the mock.
-func (m *MockNetworkEndpointGroups) Get(ctx context.Context, key *meta.Key) (*ga.NetworkEndpointGroup, error) {
+func (m *MockAlphaNetworkEndpointGroups) Get(ctx context.Context, key *meta.Key) (*alpha.NetworkEndpointGroup, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockNetworkEndpointGroups.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaNetworkEndpointGroups.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -16703,28 +16942,28 @@ func (m *MockNetworkEndpointGroups) Get(ctx context.Context, key *meta.Key) (*ga
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockNetworkEndpointGroups.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaNetworkEndpointGroups.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
- typedObj := obj.ToGA()
- klog.V(5).Infof("MockNetworkEndpointGroups.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ typedObj := obj.ToAlpha()
+ klog.V(5).Infof("MockAlphaNetworkEndpointGroups.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockNetworkEndpointGroups %v not found", key),
+ Message: fmt.Sprintf("MockAlphaNetworkEndpointGroups %v not found", key),
}
- klog.V(5).Infof("MockNetworkEndpointGroups.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaNetworkEndpointGroups.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
// List all of the objects in the mock in the given zone.
-func (m *MockNetworkEndpointGroups) List(ctx context.Context, zone string, fl *filter.F) ([]*ga.NetworkEndpointGroup, error) {
+func (m *MockAlphaNetworkEndpointGroups) List(ctx context.Context, zone string, fl *filter.F) ([]*alpha.NetworkEndpointGroup, error) {
if m.ListHook != nil {
if intercept, objs, err := m.ListHook(ctx, zone, fl, m); intercept {
- klog.V(5).Infof("MockNetworkEndpointGroups.List(%v, %q, %v) = [%v items], %v", ctx, zone, fl, len(objs), err)
+ klog.V(5).Infof("MockAlphaNetworkEndpointGroups.List(%v, %q, %v) = [%v items], %v", ctx, zone, fl, len(objs), err)
return objs, err
}
}
@@ -16734,31 +16973,31 @@ func (m *MockNetworkEndpointGroups) List(ctx context.Context, zone string, fl *f
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockNetworkEndpointGroups.List(%v, %q, %v) = nil, %v", ctx, zone, fl, err)
+ klog.V(5).Infof("MockAlphaNetworkEndpointGroups.List(%v, %q, %v) = nil, %v", ctx, zone, fl, err)
return nil, *m.ListError
}
- var objs []*ga.NetworkEndpointGroup
+ var objs []*alpha.NetworkEndpointGroup
for key, obj := range m.Objects {
if key.Zone != zone {
continue
}
- if !fl.Match(obj.ToGA()) {
+ if !fl.Match(obj.ToAlpha()) {
continue
}
- objs = append(objs, obj.ToGA())
+ objs = append(objs, obj.ToAlpha())
}
- klog.V(5).Infof("MockNetworkEndpointGroups.List(%v, %q, %v) = [%v items], nil", ctx, zone, fl, len(objs))
+ klog.V(5).Infof("MockAlphaNetworkEndpointGroups.List(%v, %q, %v) = [%v items], nil", ctx, zone, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockNetworkEndpointGroups) Insert(ctx context.Context, key *meta.Key, obj *ga.NetworkEndpointGroup) error {
+func (m *MockAlphaNetworkEndpointGroups) Insert(ctx context.Context, key *meta.Key, obj *alpha.NetworkEndpointGroup) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockNetworkEndpointGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaNetworkEndpointGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -16770,32 +17009,32 @@ func (m *MockNetworkEndpointGroups) Insert(ctx context.Context, key *meta.Key, o
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockNetworkEndpointGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaNetworkEndpointGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockNetworkEndpointGroups %v exists", key),
+ Message: fmt.Sprintf("MockAlphaNetworkEndpointGroups %v exists", key),
}
- klog.V(5).Infof("MockNetworkEndpointGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaNetworkEndpointGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "ga", "networkEndpointGroups")
- obj.SelfLink = SelfLink(meta.VersionGA, projectID, "networkEndpointGroups", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "networkEndpointGroups")
+ obj.SelfLink = SelfLink(meta.VersionAlpha, projectID, "networkEndpointGroups", key)
m.Objects[*key] = &MockNetworkEndpointGroupsObj{obj}
- klog.V(5).Infof("MockNetworkEndpointGroups.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ klog.V(5).Infof("MockAlphaNetworkEndpointGroups.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockNetworkEndpointGroups) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockAlphaNetworkEndpointGroups) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -16807,28 +17046,28 @@ func (m *MockNetworkEndpointGroups) Delete(ctx context.Context, key *meta.Key) e
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockNetworkEndpointGroups %v not found", key),
+ Message: fmt.Sprintf("MockAlphaNetworkEndpointGroups %v not found", key),
}
- klog.V(5).Infof("MockNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockNetworkEndpointGroups.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockAlphaNetworkEndpointGroups.Delete(%v, %v) = nil", ctx, key)
return nil
}
// AggregatedList is a mock for AggregatedList.
-func (m *MockNetworkEndpointGroups) AggregatedList(ctx context.Context, fl *filter.F) (map[string][]*ga.NetworkEndpointGroup, error) {
+func (m *MockAlphaNetworkEndpointGroups) AggregatedList(ctx context.Context, fl *filter.F) (map[string][]*alpha.NetworkEndpointGroup, error) {
if m.AggregatedListHook != nil {
if intercept, objs, err := m.AggregatedListHook(ctx, fl, m); intercept {
- klog.V(5).Infof("MockNetworkEndpointGroups.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
+ klog.V(5).Infof("MockAlphaNetworkEndpointGroups.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
return objs, err
}
}
@@ -16838,34 +17077,34 @@ func (m *MockNetworkEndpointGroups) AggregatedList(ctx context.Context, fl *filt
if m.AggregatedListError != nil {
err := *m.AggregatedListError
- klog.V(5).Infof("MockNetworkEndpointGroups.AggregatedList(%v, %v) = nil, %v", ctx, fl, err)
+ klog.V(5).Infof("MockAlphaNetworkEndpointGroups.AggregatedList(%v, %v) = nil, %v", ctx, fl, err)
return nil, err
}
- objs := map[string][]*ga.NetworkEndpointGroup{}
+ objs := map[string][]*alpha.NetworkEndpointGroup{}
for _, obj := range m.Objects {
- res, err := ParseResourceURL(obj.ToGA().SelfLink)
- location := res.Key.Zone
+ res, err := ParseResourceURL(obj.ToAlpha().SelfLink)
if err != nil {
- klog.V(5).Infof("MockNetworkEndpointGroups.AggregatedList(%v, %v) = nil, %v", ctx, fl, err)
+ klog.V(5).Infof("MockAlphaNetworkEndpointGroups.AggregatedList(%v, %v) = nil, %v", ctx, fl, err)
return nil, err
}
- if !fl.Match(obj.ToGA()) {
+ if !fl.Match(obj.ToAlpha()) {
continue
}
- objs[location] = append(objs[location], obj.ToGA())
+ location := aggregatedListKey(res.Key)
+ objs[location] = append(objs[location], obj.ToAlpha())
}
- klog.V(5).Infof("MockNetworkEndpointGroups.AggregatedList(%v, %v) = [%v items], nil", ctx, fl, len(objs))
+ klog.V(5).Infof("MockAlphaNetworkEndpointGroups.AggregatedList(%v, %v) = [%v items], nil", ctx, fl, len(objs))
return objs, nil
}
// Obj wraps the object for use in the mock.
-func (m *MockNetworkEndpointGroups) Obj(o *ga.NetworkEndpointGroup) *MockNetworkEndpointGroupsObj {
+func (m *MockAlphaNetworkEndpointGroups) Obj(o *alpha.NetworkEndpointGroup) *MockNetworkEndpointGroupsObj {
return &MockNetworkEndpointGroupsObj{o}
}
// AttachNetworkEndpoints is a mock for the corresponding method.
-func (m *MockNetworkEndpointGroups) AttachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *ga.NetworkEndpointGroupsAttachEndpointsRequest) error {
+func (m *MockAlphaNetworkEndpointGroups) AttachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *alpha.NetworkEndpointGroupsAttachEndpointsRequest) error {
if m.AttachNetworkEndpointsHook != nil {
return m.AttachNetworkEndpointsHook(ctx, key, arg0, m)
}
@@ -16873,7 +17112,7 @@ func (m *MockNetworkEndpointGroups) AttachNetworkEndpoints(ctx context.Context,
}
// DetachNetworkEndpoints is a mock for the corresponding method.
-func (m *MockNetworkEndpointGroups) DetachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *ga.NetworkEndpointGroupsDetachEndpointsRequest) error {
+func (m *MockAlphaNetworkEndpointGroups) DetachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *alpha.NetworkEndpointGroupsDetachEndpointsRequest) error {
if m.DetachNetworkEndpointsHook != nil {
return m.DetachNetworkEndpointsHook(ctx, key, arg0, m)
}
@@ -16881,442 +17120,514 @@ func (m *MockNetworkEndpointGroups) DetachNetworkEndpoints(ctx context.Context,
}
// ListNetworkEndpoints is a mock for the corresponding method.
-func (m *MockNetworkEndpointGroups) ListNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *ga.NetworkEndpointGroupsListEndpointsRequest, fl *filter.F) ([]*ga.NetworkEndpointWithHealthStatus, error) {
+func (m *MockAlphaNetworkEndpointGroups) ListNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *alpha.NetworkEndpointGroupsListEndpointsRequest, fl *filter.F) ([]*alpha.NetworkEndpointWithHealthStatus, error) {
if m.ListNetworkEndpointsHook != nil {
return m.ListNetworkEndpointsHook(ctx, key, arg0, fl, m)
}
return nil, nil
}
-// GCENetworkEndpointGroups is a simplifying adapter for the GCE NetworkEndpointGroups.
-type GCENetworkEndpointGroups struct {
+// GCEAlphaNetworkEndpointGroups is a simplifying adapter for the GCE NetworkEndpointGroups.
+type GCEAlphaNetworkEndpointGroups struct {
s *Service
}
// Get the NetworkEndpointGroup named by key.
-func (g *GCENetworkEndpointGroups) Get(ctx context.Context, key *meta.Key) (*ga.NetworkEndpointGroup, error) {
- klog.V(5).Infof("GCENetworkEndpointGroups.Get(%v, %v): called", ctx, key)
+func (g *GCEAlphaNetworkEndpointGroups) Get(ctx context.Context, key *meta.Key) (*alpha.NetworkEndpointGroup, error) {
+ klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCENetworkEndpointGroups.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaNetworkEndpointGroups.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "NetworkEndpointGroups")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "NetworkEndpointGroups")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
- Version: meta.Version("ga"),
+ Version: meta.Version("alpha"),
Service: "NetworkEndpointGroups",
}
- klog.V(5).Infof("GCENetworkEndpointGroups.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCENetworkEndpointGroups.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.GA.NetworkEndpointGroups.Get(projectID, key.Zone, key.Name)
+ call := g.s.Alpha.NetworkEndpointGroups.Get(projectID, key.Zone, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCENetworkEndpointGroups.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
// List all NetworkEndpointGroup objects.
-func (g *GCENetworkEndpointGroups) List(ctx context.Context, zone string, fl *filter.F) ([]*ga.NetworkEndpointGroup, error) {
- klog.V(5).Infof("GCENetworkEndpointGroups.List(%v, %v, %v) called", ctx, zone, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "NetworkEndpointGroups")
+func (g *GCEAlphaNetworkEndpointGroups) List(ctx context.Context, zone string, fl *filter.F) ([]*alpha.NetworkEndpointGroup, error) {
+ klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.List(%v, %v, %v) called", ctx, zone, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "NetworkEndpointGroups")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
- Version: meta.Version("ga"),
+ Version: meta.Version("alpha"),
Service: "NetworkEndpointGroups",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCENetworkEndpointGroups.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, zone, fl, projectID, rk)
- call := g.s.GA.NetworkEndpointGroups.List(projectID, zone)
+ klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, zone, fl, projectID, rk)
+ call := g.s.Alpha.NetworkEndpointGroups.List(projectID, zone)
if fl != filter.None {
call.Filter(fl.String())
}
- var all []*ga.NetworkEndpointGroup
- f := func(l *ga.NetworkEndpointGroupList) error {
- klog.V(5).Infof("GCENetworkEndpointGroups.List(%v, ..., %v): page %+v", ctx, fl, l)
+ var all []*alpha.NetworkEndpointGroup
+ f := func(l *alpha.NetworkEndpointGroupList) error {
+ klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCENetworkEndpointGroups.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCENetworkEndpointGroups.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCENetworkEndpointGroups.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
// Insert NetworkEndpointGroup with key of value obj.
-func (g *GCENetworkEndpointGroups) Insert(ctx context.Context, key *meta.Key, obj *ga.NetworkEndpointGroup) error {
- klog.V(5).Infof("GCENetworkEndpointGroups.Insert(%v, %v, %+v): called", ctx, key, obj)
+func (g *GCEAlphaNetworkEndpointGroups) Insert(ctx context.Context, key *meta.Key, obj *alpha.NetworkEndpointGroup) error {
+ klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCENetworkEndpointGroups.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaNetworkEndpointGroups.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "NetworkEndpointGroups")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "NetworkEndpointGroups")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
- Version: meta.Version("ga"),
+ Version: meta.Version("alpha"),
Service: "NetworkEndpointGroups",
}
- klog.V(5).Infof("GCENetworkEndpointGroups.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCENetworkEndpointGroups.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.GA.NetworkEndpointGroups.Insert(projectID, key.Zone, obj)
+ call := g.s.Alpha.NetworkEndpointGroups.Insert(projectID, key.Zone, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCENetworkEndpointGroups.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCENetworkEndpointGroups.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
// Delete the NetworkEndpointGroup referenced by key.
-func (g *GCENetworkEndpointGroups) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCENetworkEndpointGroups.Delete(%v, %v): called", ctx, key)
+func (g *GCEAlphaNetworkEndpointGroups) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCENetworkEndpointGroups.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaNetworkEndpointGroups.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "NetworkEndpointGroups")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "NetworkEndpointGroups")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
- Version: meta.Version("ga"),
+ Version: meta.Version("alpha"),
Service: "NetworkEndpointGroups",
}
- klog.V(5).Infof("GCENetworkEndpointGroups.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCENetworkEndpointGroups.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.GA.NetworkEndpointGroups.Delete(projectID, key.Zone, key.Name)
+ call := g.s.Alpha.NetworkEndpointGroups.Delete(projectID, key.Zone, key.Name)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCENetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCENetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err)
return err
}
// AggregatedList lists all resources of the given type across all locations.
-func (g *GCENetworkEndpointGroups) AggregatedList(ctx context.Context, fl *filter.F) (map[string][]*ga.NetworkEndpointGroup, error) {
- klog.V(5).Infof("GCENetworkEndpointGroups.AggregatedList(%v, %v) called", ctx, fl)
+func (g *GCEAlphaNetworkEndpointGroups) AggregatedList(ctx context.Context, fl *filter.F) (map[string][]*alpha.NetworkEndpointGroup, error) {
+ klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.AggregatedList(%v, %v) called", ctx, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "NetworkEndpointGroups")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "NetworkEndpointGroups")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "AggregatedList",
- Version: meta.Version("ga"),
+ Version: meta.Version("alpha"),
Service: "NetworkEndpointGroups",
}
- klog.V(5).Infof("GCENetworkEndpointGroups.AggregatedList(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
+ klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.AggregatedList(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(5).Infof("GCENetworkEndpointGroups.AggregatedList(%v, %v): RateLimiter error: %v", ctx, fl, err)
+ klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.AggregatedList(%v, %v): RateLimiter error: %v", ctx, fl, err)
return nil, err
}
- call := g.s.GA.NetworkEndpointGroups.AggregatedList(projectID)
+ call := g.s.Alpha.NetworkEndpointGroups.AggregatedList(projectID)
call.Context(ctx)
if fl != filter.None {
call.Filter(fl.String())
}
- all := map[string][]*ga.NetworkEndpointGroup{}
- f := func(l *ga.NetworkEndpointGroupAggregatedList) error {
+ all := map[string][]*alpha.NetworkEndpointGroup{}
+ f := func(l *alpha.NetworkEndpointGroupAggregatedList) error {
for k, v := range l.Items {
- klog.V(5).Infof("GCENetworkEndpointGroups.AggregatedList(%v, %v): page[%v]%+v", ctx, fl, k, v)
+ klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.AggregatedList(%v, %v): page[%v]%+v", ctx, fl, k, v)
all[k] = append(all[k], v.NetworkEndpointGroups...)
}
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCENetworkEndpointGroups.AggregatedList(%v, %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.AggregatedList(%v, %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCENetworkEndpointGroups.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCENetworkEndpointGroups.AggregatedList(%v, %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.AggregatedList(%v, %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
-// AttachNetworkEndpoints is a method on GCENetworkEndpointGroups.
-func (g *GCENetworkEndpointGroups) AttachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *ga.NetworkEndpointGroupsAttachEndpointsRequest) error {
- klog.V(5).Infof("GCENetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...): called", ctx, key)
+// AttachNetworkEndpoints is a method on GCEAlphaNetworkEndpointGroups.
+func (g *GCEAlphaNetworkEndpointGroups) AttachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *alpha.NetworkEndpointGroupsAttachEndpointsRequest) error {
+ klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCENetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "NetworkEndpointGroups")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "NetworkEndpointGroups")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "AttachNetworkEndpoints",
- Version: meta.Version("ga"),
+ Version: meta.Version("alpha"),
Service: "NetworkEndpointGroups",
}
- klog.V(5).Infof("GCENetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCENetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.GA.NetworkEndpointGroups.AttachNetworkEndpoints(projectID, key.Zone, key.Name, arg0)
+ call := g.s.Alpha.NetworkEndpointGroups.AttachNetworkEndpoints(projectID, key.Zone, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCENetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCENetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// DetachNetworkEndpoints is a method on GCENetworkEndpointGroups.
-func (g *GCENetworkEndpointGroups) DetachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *ga.NetworkEndpointGroupsDetachEndpointsRequest) error {
- klog.V(5).Infof("GCENetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...): called", ctx, key)
+// DetachNetworkEndpoints is a method on GCEAlphaNetworkEndpointGroups.
+func (g *GCEAlphaNetworkEndpointGroups) DetachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *alpha.NetworkEndpointGroupsDetachEndpointsRequest) error {
+ klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCENetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "NetworkEndpointGroups")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "NetworkEndpointGroups")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "DetachNetworkEndpoints",
- Version: meta.Version("ga"),
+ Version: meta.Version("alpha"),
Service: "NetworkEndpointGroups",
}
- klog.V(5).Infof("GCENetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCENetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.GA.NetworkEndpointGroups.DetachNetworkEndpoints(projectID, key.Zone, key.Name, arg0)
+ call := g.s.Alpha.NetworkEndpointGroups.DetachNetworkEndpoints(projectID, key.Zone, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCENetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCENetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// ListNetworkEndpoints is a method on GCENetworkEndpointGroups.
-func (g *GCENetworkEndpointGroups) ListNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *ga.NetworkEndpointGroupsListEndpointsRequest, fl *filter.F) ([]*ga.NetworkEndpointWithHealthStatus, error) {
- klog.V(5).Infof("GCENetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): called", ctx, key)
+// ListNetworkEndpoints is a method on GCEAlphaNetworkEndpointGroups.
+func (g *GCEAlphaNetworkEndpointGroups) ListNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *alpha.NetworkEndpointGroupsListEndpointsRequest, fl *filter.F) ([]*alpha.NetworkEndpointWithHealthStatus, error) {
+ klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCENetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "NetworkEndpointGroups")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "NetworkEndpointGroups")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "ListNetworkEndpoints",
- Version: meta.Version("ga"),
+ Version: meta.Version("alpha"),
Service: "NetworkEndpointGroups",
}
- klog.V(5).Infof("GCENetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCENetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.GA.NetworkEndpointGroups.ListNetworkEndpoints(projectID, key.Zone, key.Name, arg0)
- var all []*ga.NetworkEndpointWithHealthStatus
- f := func(l *ga.NetworkEndpointGroupsListNetworkEndpoints) error {
- klog.V(5).Infof("GCENetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): page %+v", ctx, key, l)
+ call := g.s.Alpha.NetworkEndpointGroups.ListNetworkEndpoints(projectID, key.Zone, key.Name, arg0)
+ var all []*alpha.NetworkEndpointWithHealthStatus
+ f := func(l *alpha.NetworkEndpointGroupsListNetworkEndpoints) error {
+ klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): page %+v", ctx, key, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCENetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = %v, %v", ctx, key, nil, err)
+ klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = %v, %v", ctx, key, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCENetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = [%v items], %v", ctx, key, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = [%v items], %v", ctx, key, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCENetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = %v, %v", ctx, key, asStr, nil)
+ klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = %v, %v", ctx, key, asStr, nil)
}
return all, nil
}
-// Projects is an interface that allows for mocking of Projects.
-type Projects interface {
- // ProjectsOps is an interface with additional non-CRUD type methods.
- // This interface is expected to be implemented by hand (non-autogenerated).
- ProjectsOps
+// BetaNetworkEndpointGroups is an interface that allows for mocking of NetworkEndpointGroups.
+type BetaNetworkEndpointGroups interface {
+ Get(ctx context.Context, key *meta.Key) (*beta.NetworkEndpointGroup, error)
+ List(ctx context.Context, zone string, fl *filter.F) ([]*beta.NetworkEndpointGroup, error)
+ Insert(ctx context.Context, key *meta.Key, obj *beta.NetworkEndpointGroup) error
+ Delete(ctx context.Context, key *meta.Key) error
+ AggregatedList(ctx context.Context, fl *filter.F) (map[string][]*beta.NetworkEndpointGroup, error)
+ AttachNetworkEndpoints(context.Context, *meta.Key, *beta.NetworkEndpointGroupsAttachEndpointsRequest) error
+ DetachNetworkEndpoints(context.Context, *meta.Key, *beta.NetworkEndpointGroupsDetachEndpointsRequest) error
+ ListNetworkEndpoints(context.Context, *meta.Key, *beta.NetworkEndpointGroupsListEndpointsRequest, *filter.F) ([]*beta.NetworkEndpointWithHealthStatus, error)
}
-// NewMockProjects returns a new mock for Projects.
-func NewMockProjects(pr ProjectRouter, objs map[meta.Key]*MockProjectsObj) *MockProjects {
- mock := &MockProjects{
+// NewMockBetaNetworkEndpointGroups returns a new mock for NetworkEndpointGroups.
+func NewMockBetaNetworkEndpointGroups(pr ProjectRouter, objs map[meta.Key]*MockNetworkEndpointGroupsObj) *MockBetaNetworkEndpointGroups {
+ mock := &MockBetaNetworkEndpointGroups{
ProjectRouter: pr,
- Objects: objs,
+ Objects: objs,
+ GetError: map[meta.Key]error{},
+ InsertError: map[meta.Key]error{},
+ DeleteError: map[meta.Key]error{},
}
return mock
}
-// MockProjects is the mock for Projects.
-type MockProjects struct {
+// MockBetaNetworkEndpointGroups is the mock for NetworkEndpointGroups.
+type MockBetaNetworkEndpointGroups struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
// Objects maintained by the mock.
- Objects map[meta.Key]*MockProjectsObj
+ Objects map[meta.Key]*MockNetworkEndpointGroupsObj
// If an entry exists for the given key and operation, then the error
// will be returned instead of the operation.
+ GetError map[meta.Key]error
+ ListError *error
+ InsertError map[meta.Key]error
+ DeleteError map[meta.Key]error
+ AggregatedListError *error
// xxxHook allow you to intercept the standard processing of the mock in
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
+ GetHook func(ctx context.Context, key *meta.Key, m *MockBetaNetworkEndpointGroups) (bool, *beta.NetworkEndpointGroup, error)
+ ListHook func(ctx context.Context, zone string, fl *filter.F, m *MockBetaNetworkEndpointGroups) (bool, []*beta.NetworkEndpointGroup, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *beta.NetworkEndpointGroup, m *MockBetaNetworkEndpointGroups) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaNetworkEndpointGroups) (bool, error)
+ AggregatedListHook func(ctx context.Context, fl *filter.F, m *MockBetaNetworkEndpointGroups) (bool, map[string][]*beta.NetworkEndpointGroup, error)
+ AttachNetworkEndpointsHook func(context.Context, *meta.Key, *beta.NetworkEndpointGroupsAttachEndpointsRequest, *MockBetaNetworkEndpointGroups) error
+ DetachNetworkEndpointsHook func(context.Context, *meta.Key, *beta.NetworkEndpointGroupsDetachEndpointsRequest, *MockBetaNetworkEndpointGroups) error
+ ListNetworkEndpointsHook func(context.Context, *meta.Key, *beta.NetworkEndpointGroupsListEndpointsRequest, *filter.F, *MockBetaNetworkEndpointGroups) ([]*beta.NetworkEndpointWithHealthStatus, error)
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
X interface{}
}
-// Obj wraps the object for use in the mock.
-func (m *MockProjects) Obj(o *ga.Project) *MockProjectsObj {
- return &MockProjectsObj{o}
-}
-
-// GCEProjects is a simplifying adapter for the GCE Projects.
-type GCEProjects struct {
- s *Service
-}
+// Get returns the object from the mock.
+func (m *MockBetaNetworkEndpointGroups) Get(ctx context.Context, key *meta.Key) (*beta.NetworkEndpointGroup, error) {
+ if m.GetHook != nil {
+ if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
+ klog.V(5).Infof("MockBetaNetworkEndpointGroups.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ return obj, err
+ }
+ }
+ if !key.Valid() {
+ return nil, fmt.Errorf("invalid GCE key (%+v)", key)
+ }
-// Regions is an interface that allows for mocking of Regions.
-type Regions interface {
- Get(ctx context.Context, key *meta.Key) (*ga.Region, error)
- List(ctx context.Context, fl *filter.F) ([]*ga.Region, error)
-}
+ m.Lock.Lock()
+ defer m.Lock.Unlock()
-// NewMockRegions returns a new mock for Regions.
-func NewMockRegions(pr ProjectRouter, objs map[meta.Key]*MockRegionsObj) *MockRegions {
- mock := &MockRegions{
- ProjectRouter: pr,
+ if err, ok := m.GetError[*key]; ok {
+ klog.V(5).Infof("MockBetaNetworkEndpointGroups.Get(%v, %s) = nil, %v", ctx, key, err)
+ return nil, err
+ }
+ if obj, ok := m.Objects[*key]; ok {
+ typedObj := obj.ToBeta()
+ klog.V(5).Infof("MockBetaNetworkEndpointGroups.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ return typedObj, nil
+ }
- Objects: objs,
- GetError: map[meta.Key]error{},
+ err := &googleapi.Error{
+ Code: http.StatusNotFound,
+ Message: fmt.Sprintf("MockBetaNetworkEndpointGroups %v not found", key),
}
- return mock
+ klog.V(5).Infof("MockBetaNetworkEndpointGroups.Get(%v, %s) = nil, %v", ctx, key, err)
+ return nil, err
}
-// MockRegions is the mock for Regions.
-type MockRegions struct {
- Lock sync.Mutex
+// List all of the objects in the mock in the given zone.
+func (m *MockBetaNetworkEndpointGroups) List(ctx context.Context, zone string, fl *filter.F) ([]*beta.NetworkEndpointGroup, error) {
+ if m.ListHook != nil {
+ if intercept, objs, err := m.ListHook(ctx, zone, fl, m); intercept {
+ klog.V(5).Infof("MockBetaNetworkEndpointGroups.List(%v, %q, %v) = [%v items], %v", ctx, zone, fl, len(objs), err)
+ return objs, err
+ }
+ }
- ProjectRouter ProjectRouter
+ m.Lock.Lock()
+ defer m.Lock.Unlock()
- // Objects maintained by the mock.
- Objects map[meta.Key]*MockRegionsObj
+ if m.ListError != nil {
+ err := *m.ListError
+ klog.V(5).Infof("MockBetaNetworkEndpointGroups.List(%v, %q, %v) = nil, %v", ctx, zone, fl, err)
- // If an entry exists for the given key and operation, then the error
- // will be returned instead of the operation.
- GetError map[meta.Key]error
- ListError *error
+ return nil, *m.ListError
+ }
- // xxxHook allow you to intercept the standard processing of the mock in
- // order to add your own logic. Return (true, _, _) to prevent the normal
- // execution flow of the mock. Return (false, nil, nil) to continue with
- // normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockRegions) (bool, *ga.Region, error)
- ListHook func(ctx context.Context, fl *filter.F, m *MockRegions) (bool, []*ga.Region, error)
+ var objs []*beta.NetworkEndpointGroup
+ for key, obj := range m.Objects {
+ if key.Zone != zone {
+ continue
+ }
+ if !fl.Match(obj.ToBeta()) {
+ continue
+ }
+ objs = append(objs, obj.ToBeta())
+ }
- // X is extra state that can be used as part of the mock. Generated code
- // will not use this field.
- X interface{}
+ klog.V(5).Infof("MockBetaNetworkEndpointGroups.List(%v, %q, %v) = [%v items], nil", ctx, zone, fl, len(objs))
+ return objs, nil
}
-// Get returns the object from the mock.
-func (m *MockRegions) Get(ctx context.Context, key *meta.Key) (*ga.Region, error) {
- if m.GetHook != nil {
- if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockRegions.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
- return obj, err
+// Insert is a mock for inserting/creating a new object.
+func (m *MockBetaNetworkEndpointGroups) Insert(ctx context.Context, key *meta.Key, obj *beta.NetworkEndpointGroup) error {
+ if m.InsertHook != nil {
+ if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
+ klog.V(5).Infof("MockBetaNetworkEndpointGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ return err
}
}
if !key.Valid() {
- return nil, fmt.Errorf("invalid GCE key (%+v)", key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
}
m.Lock.Lock()
defer m.Lock.Unlock()
- if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockRegions.Get(%v, %s) = nil, %v", ctx, key, err)
- return nil, err
+ if err, ok := m.InsertError[*key]; ok {
+ klog.V(5).Infof("MockBetaNetworkEndpointGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ return err
}
- if obj, ok := m.Objects[*key]; ok {
- typedObj := obj.ToGA()
- klog.V(5).Infof("MockRegions.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
- return typedObj, nil
+ if _, ok := m.Objects[*key]; ok {
+ err := &googleapi.Error{
+ Code: http.StatusConflict,
+ Message: fmt.Sprintf("MockBetaNetworkEndpointGroups %v exists", key),
+ }
+ klog.V(5).Infof("MockBetaNetworkEndpointGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ return err
}
- err := &googleapi.Error{
- Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockRegions %v not found", key),
+ obj.Name = key.Name
+ projectID := m.ProjectRouter.ProjectID(ctx, "beta", "networkEndpointGroups")
+ obj.SelfLink = SelfLink(meta.VersionBeta, projectID, "networkEndpointGroups", key)
+
+ m.Objects[*key] = &MockNetworkEndpointGroupsObj{obj}
+ klog.V(5).Infof("MockBetaNetworkEndpointGroups.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ return nil
+}
+
+// Delete is a mock for deleting the object.
+func (m *MockBetaNetworkEndpointGroups) Delete(ctx context.Context, key *meta.Key) error {
+ if m.DeleteHook != nil {
+ if intercept, err := m.DeleteHook(ctx, key, m); intercept {
+ klog.V(5).Infof("MockBetaNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err)
+ return err
+ }
}
- klog.V(5).Infof("MockRegions.Get(%v, %s) = nil, %v", ctx, key, err)
- return nil, err
+ if !key.Valid() {
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+
+ m.Lock.Lock()
+ defer m.Lock.Unlock()
+
+ if err, ok := m.DeleteError[*key]; ok {
+ klog.V(5).Infof("MockBetaNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err)
+ return err
+ }
+ if _, ok := m.Objects[*key]; !ok {
+ err := &googleapi.Error{
+ Code: http.StatusNotFound,
+ Message: fmt.Sprintf("MockBetaNetworkEndpointGroups %v not found", key),
+ }
+ klog.V(5).Infof("MockBetaNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err)
+ return err
+ }
+
+ delete(m.Objects, *key)
+ klog.V(5).Infof("MockBetaNetworkEndpointGroups.Delete(%v, %v) = nil", ctx, key)
+ return nil
}
-// List all of the objects in the mock.
-func (m *MockRegions) List(ctx context.Context, fl *filter.F) ([]*ga.Region, error) {
- if m.ListHook != nil {
- if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
- klog.V(5).Infof("MockRegions.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
+// AggregatedList is a mock for AggregatedList.
+func (m *MockBetaNetworkEndpointGroups) AggregatedList(ctx context.Context, fl *filter.F) (map[string][]*beta.NetworkEndpointGroup, error) {
+ if m.AggregatedListHook != nil {
+ if intercept, objs, err := m.AggregatedListHook(ctx, fl, m); intercept {
+ klog.V(5).Infof("MockBetaNetworkEndpointGroups.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
return objs, err
}
}
@@ -17324,115 +17635,2701 @@ func (m *MockRegions) List(ctx context.Context, fl *filter.F) ([]*ga.Region, err
m.Lock.Lock()
defer m.Lock.Unlock()
- if m.ListError != nil {
- err := *m.ListError
- klog.V(5).Infof("MockRegions.List(%v, %v) = nil, %v", ctx, fl, err)
-
- return nil, *m.ListError
+ if m.AggregatedListError != nil {
+ err := *m.AggregatedListError
+ klog.V(5).Infof("MockBetaNetworkEndpointGroups.AggregatedList(%v, %v) = nil, %v", ctx, fl, err)
+ return nil, err
}
- var objs []*ga.Region
+ objs := map[string][]*beta.NetworkEndpointGroup{}
for _, obj := range m.Objects {
- if !fl.Match(obj.ToGA()) {
+ res, err := ParseResourceURL(obj.ToBeta().SelfLink)
+ if err != nil {
+ klog.V(5).Infof("MockBetaNetworkEndpointGroups.AggregatedList(%v, %v) = nil, %v", ctx, fl, err)
+ return nil, err
+ }
+ if !fl.Match(obj.ToBeta()) {
continue
}
- objs = append(objs, obj.ToGA())
+ location := aggregatedListKey(res.Key)
+ objs[location] = append(objs[location], obj.ToBeta())
}
-
- klog.V(5).Infof("MockRegions.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
+ klog.V(5).Infof("MockBetaNetworkEndpointGroups.AggregatedList(%v, %v) = [%v items], nil", ctx, fl, len(objs))
return objs, nil
}
// Obj wraps the object for use in the mock.
-func (m *MockRegions) Obj(o *ga.Region) *MockRegionsObj {
- return &MockRegionsObj{o}
+func (m *MockBetaNetworkEndpointGroups) Obj(o *beta.NetworkEndpointGroup) *MockNetworkEndpointGroupsObj {
+ return &MockNetworkEndpointGroupsObj{o}
}
-// GCERegions is a simplifying adapter for the GCE Regions.
-type GCERegions struct {
+// AttachNetworkEndpoints is a mock for the corresponding method.
+func (m *MockBetaNetworkEndpointGroups) AttachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *beta.NetworkEndpointGroupsAttachEndpointsRequest) error {
+ if m.AttachNetworkEndpointsHook != nil {
+ return m.AttachNetworkEndpointsHook(ctx, key, arg0, m)
+ }
+ return nil
+}
+
+// DetachNetworkEndpoints is a mock for the corresponding method.
+func (m *MockBetaNetworkEndpointGroups) DetachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *beta.NetworkEndpointGroupsDetachEndpointsRequest) error {
+ if m.DetachNetworkEndpointsHook != nil {
+ return m.DetachNetworkEndpointsHook(ctx, key, arg0, m)
+ }
+ return nil
+}
+
+// ListNetworkEndpoints is a mock for the corresponding method.
+func (m *MockBetaNetworkEndpointGroups) ListNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *beta.NetworkEndpointGroupsListEndpointsRequest, fl *filter.F) ([]*beta.NetworkEndpointWithHealthStatus, error) {
+ if m.ListNetworkEndpointsHook != nil {
+ return m.ListNetworkEndpointsHook(ctx, key, arg0, fl, m)
+ }
+ return nil, nil
+}
+
+// GCEBetaNetworkEndpointGroups is a simplifying adapter for the GCE NetworkEndpointGroups.
+type GCEBetaNetworkEndpointGroups struct {
s *Service
}
-// Get the Region named by key.
-func (g *GCERegions) Get(ctx context.Context, key *meta.Key) (*ga.Region, error) {
- klog.V(5).Infof("GCERegions.Get(%v, %v): called", ctx, key)
+// Get the NetworkEndpointGroup named by key.
+func (g *GCEBetaNetworkEndpointGroups) Get(ctx context.Context, key *meta.Key) (*beta.NetworkEndpointGroup, error) {
+ klog.V(5).Infof("GCEBetaNetworkEndpointGroups.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCERegions.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaNetworkEndpointGroups.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Regions")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "NetworkEndpointGroups")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
- Version: meta.Version("ga"),
- Service: "Regions",
+ Version: meta.Version("beta"),
+ Service: "NetworkEndpointGroups",
}
- klog.V(5).Infof("GCERegions.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaNetworkEndpointGroups.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCERegions.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaNetworkEndpointGroups.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.GA.Regions.Get(projectID, key.Name)
+ call := g.s.Beta.NetworkEndpointGroups.Get(projectID, key.Zone, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCERegions.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEBetaNetworkEndpointGroups.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
-// List all Region objects.
-func (g *GCERegions) List(ctx context.Context, fl *filter.F) ([]*ga.Region, error) {
- klog.V(5).Infof("GCERegions.List(%v, %v) called", ctx, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Regions")
+// List all NetworkEndpointGroup objects.
+func (g *GCEBetaNetworkEndpointGroups) List(ctx context.Context, zone string, fl *filter.F) ([]*beta.NetworkEndpointGroup, error) {
+ klog.V(5).Infof("GCEBetaNetworkEndpointGroups.List(%v, %v, %v) called", ctx, zone, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "NetworkEndpointGroups")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
- Version: meta.Version("ga"),
- Service: "Regions",
+ Version: meta.Version("beta"),
+ Service: "NetworkEndpointGroups",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCERegions.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
- call := g.s.GA.Regions.List(projectID)
+ klog.V(5).Infof("GCEBetaNetworkEndpointGroups.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, zone, fl, projectID, rk)
+ call := g.s.Beta.NetworkEndpointGroups.List(projectID, zone)
if fl != filter.None {
call.Filter(fl.String())
}
- var all []*ga.Region
- f := func(l *ga.RegionList) error {
- klog.V(5).Infof("GCERegions.List(%v, ..., %v): page %+v", ctx, fl, l)
+ var all []*beta.NetworkEndpointGroup
+ f := func(l *beta.NetworkEndpointGroupList) error {
+ klog.V(5).Infof("GCEBetaNetworkEndpointGroups.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCERegions.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEBetaNetworkEndpointGroups.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCERegions.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEBetaNetworkEndpointGroups.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCERegions.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEBetaNetworkEndpointGroups.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
-// Routes is an interface that allows for mocking of Routes.
-type Routes interface {
+// Insert NetworkEndpointGroup with key of value obj.
+func (g *GCEBetaNetworkEndpointGroups) Insert(ctx context.Context, key *meta.Key, obj *beta.NetworkEndpointGroup) error {
+ klog.V(5).Infof("GCEBetaNetworkEndpointGroups.Insert(%v, %v, %+v): called", ctx, key, obj)
+ if !key.Valid() {
+ klog.V(2).Infof("GCEBetaNetworkEndpointGroups.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "NetworkEndpointGroups")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "Insert",
+ Version: meta.Version("beta"),
+ Service: "NetworkEndpointGroups",
+ }
+ klog.V(5).Infof("GCEBetaNetworkEndpointGroups.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCEBetaNetworkEndpointGroups.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ return err
+ }
+ obj.Name = key.Name
+ call := g.s.Beta.NetworkEndpointGroups.Insert(projectID, key.Zone, obj)
+ call.Context(ctx)
+
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCEBetaNetworkEndpointGroups.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+ }
+
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCEBetaNetworkEndpointGroups.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ return err
+}
+
+// Delete the NetworkEndpointGroup referenced by key.
+func (g *GCEBetaNetworkEndpointGroups) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEBetaNetworkEndpointGroups.Delete(%v, %v): called", ctx, key)
+ if !key.Valid() {
+ klog.V(2).Infof("GCEBetaNetworkEndpointGroups.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "NetworkEndpointGroups")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "Delete",
+ Version: meta.Version("beta"),
+ Service: "NetworkEndpointGroups",
+ }
+ klog.V(5).Infof("GCEBetaNetworkEndpointGroups.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCEBetaNetworkEndpointGroups.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ return err
+ }
+ call := g.s.Beta.NetworkEndpointGroups.Delete(projectID, key.Zone, key.Name)
+ call.Context(ctx)
+
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCEBetaNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err)
+ return err
+ }
+
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCEBetaNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err)
+ return err
+}
+
+// AggregatedList lists all resources of the given type across all locations.
+func (g *GCEBetaNetworkEndpointGroups) AggregatedList(ctx context.Context, fl *filter.F) (map[string][]*beta.NetworkEndpointGroup, error) {
+ klog.V(5).Infof("GCEBetaNetworkEndpointGroups.AggregatedList(%v, %v) called", ctx, fl)
+
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "NetworkEndpointGroups")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "AggregatedList",
+ Version: meta.Version("beta"),
+ Service: "NetworkEndpointGroups",
+ }
+
+ klog.V(5).Infof("GCEBetaNetworkEndpointGroups.AggregatedList(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(5).Infof("GCEBetaNetworkEndpointGroups.AggregatedList(%v, %v): RateLimiter error: %v", ctx, fl, err)
+ return nil, err
+ }
+
+ call := g.s.Beta.NetworkEndpointGroups.AggregatedList(projectID)
+ call.Context(ctx)
+ if fl != filter.None {
+ call.Filter(fl.String())
+ }
+
+ all := map[string][]*beta.NetworkEndpointGroup{}
+ f := func(l *beta.NetworkEndpointGroupAggregatedList) error {
+ for k, v := range l.Items {
+ klog.V(5).Infof("GCEBetaNetworkEndpointGroups.AggregatedList(%v, %v): page[%v]%+v", ctx, fl, k, v)
+ all[k] = append(all[k], v.NetworkEndpointGroups...)
+ }
+ return nil
+ }
+ if err := call.Pages(ctx, f); err != nil {
+ klog.V(4).Infof("GCEBetaNetworkEndpointGroups.AggregatedList(%v, %v) = %v, %v", ctx, fl, nil, err)
+ return nil, err
+ }
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEBetaNetworkEndpointGroups.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
+ var asStr []string
+ for _, o := range all {
+ asStr = append(asStr, fmt.Sprintf("%+v", o))
+ }
+ klog.V(5).Infof("GCEBetaNetworkEndpointGroups.AggregatedList(%v, %v) = %v, %v", ctx, fl, asStr, nil)
+ }
+ return all, nil
+}
+
+// AttachNetworkEndpoints is a method on GCEBetaNetworkEndpointGroups.
+func (g *GCEBetaNetworkEndpointGroups) AttachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *beta.NetworkEndpointGroupsAttachEndpointsRequest) error {
+ klog.V(5).Infof("GCEBetaNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...): called", ctx, key)
+
+ if !key.Valid() {
+ klog.V(2).Infof("GCEBetaNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "NetworkEndpointGroups")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "AttachNetworkEndpoints",
+ Version: meta.Version("beta"),
+ Service: "NetworkEndpointGroups",
+ }
+ klog.V(5).Infof("GCEBetaNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCEBetaNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ return err
+ }
+ call := g.s.Beta.NetworkEndpointGroups.AttachNetworkEndpoints(projectID, key.Zone, key.Name, arg0)
+ call.Context(ctx)
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCEBetaNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+ }
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCEBetaNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+}
+
+// DetachNetworkEndpoints is a method on GCEBetaNetworkEndpointGroups.
+func (g *GCEBetaNetworkEndpointGroups) DetachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *beta.NetworkEndpointGroupsDetachEndpointsRequest) error {
+ klog.V(5).Infof("GCEBetaNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...): called", ctx, key)
+
+ if !key.Valid() {
+ klog.V(2).Infof("GCEBetaNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "NetworkEndpointGroups")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "DetachNetworkEndpoints",
+ Version: meta.Version("beta"),
+ Service: "NetworkEndpointGroups",
+ }
+ klog.V(5).Infof("GCEBetaNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCEBetaNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ return err
+ }
+ call := g.s.Beta.NetworkEndpointGroups.DetachNetworkEndpoints(projectID, key.Zone, key.Name, arg0)
+ call.Context(ctx)
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCEBetaNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+ }
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCEBetaNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+}
+
+// ListNetworkEndpoints is a method on GCEBetaNetworkEndpointGroups.
+func (g *GCEBetaNetworkEndpointGroups) ListNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *beta.NetworkEndpointGroupsListEndpointsRequest, fl *filter.F) ([]*beta.NetworkEndpointWithHealthStatus, error) {
+ klog.V(5).Infof("GCEBetaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): called", ctx, key)
+
+ if !key.Valid() {
+ klog.V(2).Infof("GCEBetaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ return nil, fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "NetworkEndpointGroups")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "ListNetworkEndpoints",
+ Version: meta.Version("beta"),
+ Service: "NetworkEndpointGroups",
+ }
+ klog.V(5).Infof("GCEBetaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCEBetaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ return nil, err
+ }
+ call := g.s.Beta.NetworkEndpointGroups.ListNetworkEndpoints(projectID, key.Zone, key.Name, arg0)
+ var all []*beta.NetworkEndpointWithHealthStatus
+ f := func(l *beta.NetworkEndpointGroupsListNetworkEndpoints) error {
+ klog.V(5).Infof("GCEBetaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): page %+v", ctx, key, l)
+ all = append(all, l.Items...)
+ return nil
+ }
+ if err := call.Pages(ctx, f); err != nil {
+ klog.V(4).Infof("GCEBetaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = %v, %v", ctx, key, nil, err)
+ return nil, err
+ }
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEBetaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = [%v items], %v", ctx, key, len(all), nil)
+ } else if klog.V(5).Enabled() {
+ var asStr []string
+ for _, o := range all {
+ asStr = append(asStr, fmt.Sprintf("%+v", o))
+ }
+ klog.V(5).Infof("GCEBetaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = %v, %v", ctx, key, asStr, nil)
+ }
+ return all, nil
+}
+
+// NetworkEndpointGroups is an interface that allows for mocking of NetworkEndpointGroups.
+type NetworkEndpointGroups interface {
+ Get(ctx context.Context, key *meta.Key) (*ga.NetworkEndpointGroup, error)
+ List(ctx context.Context, zone string, fl *filter.F) ([]*ga.NetworkEndpointGroup, error)
+ Insert(ctx context.Context, key *meta.Key, obj *ga.NetworkEndpointGroup) error
+ Delete(ctx context.Context, key *meta.Key) error
+ AggregatedList(ctx context.Context, fl *filter.F) (map[string][]*ga.NetworkEndpointGroup, error)
+ AttachNetworkEndpoints(context.Context, *meta.Key, *ga.NetworkEndpointGroupsAttachEndpointsRequest) error
+ DetachNetworkEndpoints(context.Context, *meta.Key, *ga.NetworkEndpointGroupsDetachEndpointsRequest) error
+ ListNetworkEndpoints(context.Context, *meta.Key, *ga.NetworkEndpointGroupsListEndpointsRequest, *filter.F) ([]*ga.NetworkEndpointWithHealthStatus, error)
+}
+
+// NewMockNetworkEndpointGroups returns a new mock for NetworkEndpointGroups.
+func NewMockNetworkEndpointGroups(pr ProjectRouter, objs map[meta.Key]*MockNetworkEndpointGroupsObj) *MockNetworkEndpointGroups {
+ mock := &MockNetworkEndpointGroups{
+ ProjectRouter: pr,
+
+ Objects: objs,
+ GetError: map[meta.Key]error{},
+ InsertError: map[meta.Key]error{},
+ DeleteError: map[meta.Key]error{},
+ }
+ return mock
+}
+
+// MockNetworkEndpointGroups is the mock for NetworkEndpointGroups.
+type MockNetworkEndpointGroups struct {
+ Lock sync.Mutex
+
+ ProjectRouter ProjectRouter
+
+ // Objects maintained by the mock.
+ Objects map[meta.Key]*MockNetworkEndpointGroupsObj
+
+ // If an entry exists for the given key and operation, then the error
+ // will be returned instead of the operation.
+ GetError map[meta.Key]error
+ ListError *error
+ InsertError map[meta.Key]error
+ DeleteError map[meta.Key]error
+ AggregatedListError *error
+
+ // xxxHook allow you to intercept the standard processing of the mock in
+ // order to add your own logic. Return (true, _, _) to prevent the normal
+ // execution flow of the mock. Return (false, nil, nil) to continue with
+ // normal mock behavior/ after the hook function executes.
+ GetHook func(ctx context.Context, key *meta.Key, m *MockNetworkEndpointGroups) (bool, *ga.NetworkEndpointGroup, error)
+ ListHook func(ctx context.Context, zone string, fl *filter.F, m *MockNetworkEndpointGroups) (bool, []*ga.NetworkEndpointGroup, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *ga.NetworkEndpointGroup, m *MockNetworkEndpointGroups) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockNetworkEndpointGroups) (bool, error)
+ AggregatedListHook func(ctx context.Context, fl *filter.F, m *MockNetworkEndpointGroups) (bool, map[string][]*ga.NetworkEndpointGroup, error)
+ AttachNetworkEndpointsHook func(context.Context, *meta.Key, *ga.NetworkEndpointGroupsAttachEndpointsRequest, *MockNetworkEndpointGroups) error
+ DetachNetworkEndpointsHook func(context.Context, *meta.Key, *ga.NetworkEndpointGroupsDetachEndpointsRequest, *MockNetworkEndpointGroups) error
+ ListNetworkEndpointsHook func(context.Context, *meta.Key, *ga.NetworkEndpointGroupsListEndpointsRequest, *filter.F, *MockNetworkEndpointGroups) ([]*ga.NetworkEndpointWithHealthStatus, error)
+
+ // X is extra state that can be used as part of the mock. Generated code
+ // will not use this field.
+ X interface{}
+}
+
+// Get returns the object from the mock.
+func (m *MockNetworkEndpointGroups) Get(ctx context.Context, key *meta.Key) (*ga.NetworkEndpointGroup, error) {
+ if m.GetHook != nil {
+ if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
+ klog.V(5).Infof("MockNetworkEndpointGroups.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ return obj, err
+ }
+ }
+ if !key.Valid() {
+ return nil, fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+
+ m.Lock.Lock()
+ defer m.Lock.Unlock()
+
+ if err, ok := m.GetError[*key]; ok {
+ klog.V(5).Infof("MockNetworkEndpointGroups.Get(%v, %s) = nil, %v", ctx, key, err)
+ return nil, err
+ }
+ if obj, ok := m.Objects[*key]; ok {
+ typedObj := obj.ToGA()
+ klog.V(5).Infof("MockNetworkEndpointGroups.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ return typedObj, nil
+ }
+
+ err := &googleapi.Error{
+ Code: http.StatusNotFound,
+ Message: fmt.Sprintf("MockNetworkEndpointGroups %v not found", key),
+ }
+ klog.V(5).Infof("MockNetworkEndpointGroups.Get(%v, %s) = nil, %v", ctx, key, err)
+ return nil, err
+}
+
+// List all of the objects in the mock in the given zone.
+func (m *MockNetworkEndpointGroups) List(ctx context.Context, zone string, fl *filter.F) ([]*ga.NetworkEndpointGroup, error) {
+ if m.ListHook != nil {
+ if intercept, objs, err := m.ListHook(ctx, zone, fl, m); intercept {
+ klog.V(5).Infof("MockNetworkEndpointGroups.List(%v, %q, %v) = [%v items], %v", ctx, zone, fl, len(objs), err)
+ return objs, err
+ }
+ }
+
+ m.Lock.Lock()
+ defer m.Lock.Unlock()
+
+ if m.ListError != nil {
+ err := *m.ListError
+ klog.V(5).Infof("MockNetworkEndpointGroups.List(%v, %q, %v) = nil, %v", ctx, zone, fl, err)
+
+ return nil, *m.ListError
+ }
+
+ var objs []*ga.NetworkEndpointGroup
+ for key, obj := range m.Objects {
+ if key.Zone != zone {
+ continue
+ }
+ if !fl.Match(obj.ToGA()) {
+ continue
+ }
+ objs = append(objs, obj.ToGA())
+ }
+
+ klog.V(5).Infof("MockNetworkEndpointGroups.List(%v, %q, %v) = [%v items], nil", ctx, zone, fl, len(objs))
+ return objs, nil
+}
+
+// Insert is a mock for inserting/creating a new object.
+func (m *MockNetworkEndpointGroups) Insert(ctx context.Context, key *meta.Key, obj *ga.NetworkEndpointGroup) error {
+ if m.InsertHook != nil {
+ if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
+ klog.V(5).Infof("MockNetworkEndpointGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ return err
+ }
+ }
+ if !key.Valid() {
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+
+ m.Lock.Lock()
+ defer m.Lock.Unlock()
+
+ if err, ok := m.InsertError[*key]; ok {
+ klog.V(5).Infof("MockNetworkEndpointGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ return err
+ }
+ if _, ok := m.Objects[*key]; ok {
+ err := &googleapi.Error{
+ Code: http.StatusConflict,
+ Message: fmt.Sprintf("MockNetworkEndpointGroups %v exists", key),
+ }
+ klog.V(5).Infof("MockNetworkEndpointGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ return err
+ }
+
+ obj.Name = key.Name
+ projectID := m.ProjectRouter.ProjectID(ctx, "ga", "networkEndpointGroups")
+ obj.SelfLink = SelfLink(meta.VersionGA, projectID, "networkEndpointGroups", key)
+
+ m.Objects[*key] = &MockNetworkEndpointGroupsObj{obj}
+ klog.V(5).Infof("MockNetworkEndpointGroups.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ return nil
+}
+
+// Delete is a mock for deleting the object.
+func (m *MockNetworkEndpointGroups) Delete(ctx context.Context, key *meta.Key) error {
+ if m.DeleteHook != nil {
+ if intercept, err := m.DeleteHook(ctx, key, m); intercept {
+ klog.V(5).Infof("MockNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err)
+ return err
+ }
+ }
+ if !key.Valid() {
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+
+ m.Lock.Lock()
+ defer m.Lock.Unlock()
+
+ if err, ok := m.DeleteError[*key]; ok {
+ klog.V(5).Infof("MockNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err)
+ return err
+ }
+ if _, ok := m.Objects[*key]; !ok {
+ err := &googleapi.Error{
+ Code: http.StatusNotFound,
+ Message: fmt.Sprintf("MockNetworkEndpointGroups %v not found", key),
+ }
+ klog.V(5).Infof("MockNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err)
+ return err
+ }
+
+ delete(m.Objects, *key)
+ klog.V(5).Infof("MockNetworkEndpointGroups.Delete(%v, %v) = nil", ctx, key)
+ return nil
+}
+
+// AggregatedList is a mock for AggregatedList.
+func (m *MockNetworkEndpointGroups) AggregatedList(ctx context.Context, fl *filter.F) (map[string][]*ga.NetworkEndpointGroup, error) {
+ if m.AggregatedListHook != nil {
+ if intercept, objs, err := m.AggregatedListHook(ctx, fl, m); intercept {
+ klog.V(5).Infof("MockNetworkEndpointGroups.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
+ return objs, err
+ }
+ }
+
+ m.Lock.Lock()
+ defer m.Lock.Unlock()
+
+ if m.AggregatedListError != nil {
+ err := *m.AggregatedListError
+ klog.V(5).Infof("MockNetworkEndpointGroups.AggregatedList(%v, %v) = nil, %v", ctx, fl, err)
+ return nil, err
+ }
+
+ objs := map[string][]*ga.NetworkEndpointGroup{}
+ for _, obj := range m.Objects {
+ res, err := ParseResourceURL(obj.ToGA().SelfLink)
+ if err != nil {
+ klog.V(5).Infof("MockNetworkEndpointGroups.AggregatedList(%v, %v) = nil, %v", ctx, fl, err)
+ return nil, err
+ }
+ if !fl.Match(obj.ToGA()) {
+ continue
+ }
+ location := aggregatedListKey(res.Key)
+ objs[location] = append(objs[location], obj.ToGA())
+ }
+ klog.V(5).Infof("MockNetworkEndpointGroups.AggregatedList(%v, %v) = [%v items], nil", ctx, fl, len(objs))
+ return objs, nil
+}
+
+// Obj wraps the object for use in the mock.
+func (m *MockNetworkEndpointGroups) Obj(o *ga.NetworkEndpointGroup) *MockNetworkEndpointGroupsObj {
+ return &MockNetworkEndpointGroupsObj{o}
+}
+
+// AttachNetworkEndpoints is a mock for the corresponding method.
+func (m *MockNetworkEndpointGroups) AttachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *ga.NetworkEndpointGroupsAttachEndpointsRequest) error {
+ if m.AttachNetworkEndpointsHook != nil {
+ return m.AttachNetworkEndpointsHook(ctx, key, arg0, m)
+ }
+ return nil
+}
+
+// DetachNetworkEndpoints is a mock for the corresponding method.
+func (m *MockNetworkEndpointGroups) DetachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *ga.NetworkEndpointGroupsDetachEndpointsRequest) error {
+ if m.DetachNetworkEndpointsHook != nil {
+ return m.DetachNetworkEndpointsHook(ctx, key, arg0, m)
+ }
+ return nil
+}
+
+// ListNetworkEndpoints is a mock for the corresponding method.
+func (m *MockNetworkEndpointGroups) ListNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *ga.NetworkEndpointGroupsListEndpointsRequest, fl *filter.F) ([]*ga.NetworkEndpointWithHealthStatus, error) {
+ if m.ListNetworkEndpointsHook != nil {
+ return m.ListNetworkEndpointsHook(ctx, key, arg0, fl, m)
+ }
+ return nil, nil
+}
+
+// GCENetworkEndpointGroups is a simplifying adapter for the GCE NetworkEndpointGroups.
+type GCENetworkEndpointGroups struct {
+ s *Service
+}
+
+// Get the NetworkEndpointGroup named by key.
+func (g *GCENetworkEndpointGroups) Get(ctx context.Context, key *meta.Key) (*ga.NetworkEndpointGroup, error) {
+ klog.V(5).Infof("GCENetworkEndpointGroups.Get(%v, %v): called", ctx, key)
+
+ if !key.Valid() {
+ klog.V(2).Infof("GCENetworkEndpointGroups.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ return nil, fmt.Errorf("invalid GCE key (%#v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "NetworkEndpointGroups")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "Get",
+ Version: meta.Version("ga"),
+ Service: "NetworkEndpointGroups",
+ }
+ klog.V(5).Infof("GCENetworkEndpointGroups.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCENetworkEndpointGroups.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ return nil, err
+ }
+ call := g.s.GA.NetworkEndpointGroups.Get(projectID, key.Zone, key.Name)
+ call.Context(ctx)
+ v, err := call.Do()
+ klog.V(4).Infof("GCENetworkEndpointGroups.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ return v, err
+}
+
+// List all NetworkEndpointGroup objects.
+func (g *GCENetworkEndpointGroups) List(ctx context.Context, zone string, fl *filter.F) ([]*ga.NetworkEndpointGroup, error) {
+ klog.V(5).Infof("GCENetworkEndpointGroups.List(%v, %v, %v) called", ctx, zone, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "NetworkEndpointGroups")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "List",
+ Version: meta.Version("ga"),
+ Service: "NetworkEndpointGroups",
+ }
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ return nil, err
+ }
+ klog.V(5).Infof("GCENetworkEndpointGroups.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, zone, fl, projectID, rk)
+ call := g.s.GA.NetworkEndpointGroups.List(projectID, zone)
+ if fl != filter.None {
+ call.Filter(fl.String())
+ }
+ var all []*ga.NetworkEndpointGroup
+ f := func(l *ga.NetworkEndpointGroupList) error {
+ klog.V(5).Infof("GCENetworkEndpointGroups.List(%v, ..., %v): page %+v", ctx, fl, l)
+ all = append(all, l.Items...)
+ return nil
+ }
+ if err := call.Pages(ctx, f); err != nil {
+ klog.V(4).Infof("GCENetworkEndpointGroups.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ return nil, err
+ }
+
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCENetworkEndpointGroups.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
+ var asStr []string
+ for _, o := range all {
+ asStr = append(asStr, fmt.Sprintf("%+v", o))
+ }
+ klog.V(5).Infof("GCENetworkEndpointGroups.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ }
+
+ return all, nil
+}
+
+// Insert NetworkEndpointGroup with key of value obj.
+func (g *GCENetworkEndpointGroups) Insert(ctx context.Context, key *meta.Key, obj *ga.NetworkEndpointGroup) error {
+ klog.V(5).Infof("GCENetworkEndpointGroups.Insert(%v, %v, %+v): called", ctx, key, obj)
+ if !key.Valid() {
+ klog.V(2).Infof("GCENetworkEndpointGroups.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "NetworkEndpointGroups")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "Insert",
+ Version: meta.Version("ga"),
+ Service: "NetworkEndpointGroups",
+ }
+ klog.V(5).Infof("GCENetworkEndpointGroups.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCENetworkEndpointGroups.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ return err
+ }
+ obj.Name = key.Name
+ call := g.s.GA.NetworkEndpointGroups.Insert(projectID, key.Zone, obj)
+ call.Context(ctx)
+
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCENetworkEndpointGroups.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+ }
+
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCENetworkEndpointGroups.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ return err
+}
+
+// Delete the NetworkEndpointGroup referenced by key.
+func (g *GCENetworkEndpointGroups) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCENetworkEndpointGroups.Delete(%v, %v): called", ctx, key)
+ if !key.Valid() {
+ klog.V(2).Infof("GCENetworkEndpointGroups.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "NetworkEndpointGroups")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "Delete",
+ Version: meta.Version("ga"),
+ Service: "NetworkEndpointGroups",
+ }
+ klog.V(5).Infof("GCENetworkEndpointGroups.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCENetworkEndpointGroups.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ return err
+ }
+ call := g.s.GA.NetworkEndpointGroups.Delete(projectID, key.Zone, key.Name)
+ call.Context(ctx)
+
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCENetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err)
+ return err
+ }
+
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCENetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err)
+ return err
+}
+
+// AggregatedList lists all resources of the given type across all locations.
+func (g *GCENetworkEndpointGroups) AggregatedList(ctx context.Context, fl *filter.F) (map[string][]*ga.NetworkEndpointGroup, error) {
+ klog.V(5).Infof("GCENetworkEndpointGroups.AggregatedList(%v, %v) called", ctx, fl)
+
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "NetworkEndpointGroups")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "AggregatedList",
+ Version: meta.Version("ga"),
+ Service: "NetworkEndpointGroups",
+ }
+
+ klog.V(5).Infof("GCENetworkEndpointGroups.AggregatedList(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(5).Infof("GCENetworkEndpointGroups.AggregatedList(%v, %v): RateLimiter error: %v", ctx, fl, err)
+ return nil, err
+ }
+
+ call := g.s.GA.NetworkEndpointGroups.AggregatedList(projectID)
+ call.Context(ctx)
+ if fl != filter.None {
+ call.Filter(fl.String())
+ }
+
+ all := map[string][]*ga.NetworkEndpointGroup{}
+ f := func(l *ga.NetworkEndpointGroupAggregatedList) error {
+ for k, v := range l.Items {
+ klog.V(5).Infof("GCENetworkEndpointGroups.AggregatedList(%v, %v): page[%v]%+v", ctx, fl, k, v)
+ all[k] = append(all[k], v.NetworkEndpointGroups...)
+ }
+ return nil
+ }
+ if err := call.Pages(ctx, f); err != nil {
+ klog.V(4).Infof("GCENetworkEndpointGroups.AggregatedList(%v, %v) = %v, %v", ctx, fl, nil, err)
+ return nil, err
+ }
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCENetworkEndpointGroups.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
+ var asStr []string
+ for _, o := range all {
+ asStr = append(asStr, fmt.Sprintf("%+v", o))
+ }
+ klog.V(5).Infof("GCENetworkEndpointGroups.AggregatedList(%v, %v) = %v, %v", ctx, fl, asStr, nil)
+ }
+ return all, nil
+}
+
+// AttachNetworkEndpoints is a method on GCENetworkEndpointGroups.
+func (g *GCENetworkEndpointGroups) AttachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *ga.NetworkEndpointGroupsAttachEndpointsRequest) error {
+ klog.V(5).Infof("GCENetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...): called", ctx, key)
+
+ if !key.Valid() {
+ klog.V(2).Infof("GCENetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "NetworkEndpointGroups")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "AttachNetworkEndpoints",
+ Version: meta.Version("ga"),
+ Service: "NetworkEndpointGroups",
+ }
+ klog.V(5).Infof("GCENetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCENetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ return err
+ }
+ call := g.s.GA.NetworkEndpointGroups.AttachNetworkEndpoints(projectID, key.Zone, key.Name, arg0)
+ call.Context(ctx)
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCENetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+ }
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCENetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+}
+
+// DetachNetworkEndpoints is a method on GCENetworkEndpointGroups.
+func (g *GCENetworkEndpointGroups) DetachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *ga.NetworkEndpointGroupsDetachEndpointsRequest) error {
+ klog.V(5).Infof("GCENetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...): called", ctx, key)
+
+ if !key.Valid() {
+ klog.V(2).Infof("GCENetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "NetworkEndpointGroups")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "DetachNetworkEndpoints",
+ Version: meta.Version("ga"),
+ Service: "NetworkEndpointGroups",
+ }
+ klog.V(5).Infof("GCENetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCENetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ return err
+ }
+ call := g.s.GA.NetworkEndpointGroups.DetachNetworkEndpoints(projectID, key.Zone, key.Name, arg0)
+ call.Context(ctx)
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCENetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+ }
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCENetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+}
+
+// ListNetworkEndpoints is a method on GCENetworkEndpointGroups.
+func (g *GCENetworkEndpointGroups) ListNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *ga.NetworkEndpointGroupsListEndpointsRequest, fl *filter.F) ([]*ga.NetworkEndpointWithHealthStatus, error) {
+ klog.V(5).Infof("GCENetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): called", ctx, key)
+
+ if !key.Valid() {
+ klog.V(2).Infof("GCENetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ return nil, fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "NetworkEndpointGroups")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "ListNetworkEndpoints",
+ Version: meta.Version("ga"),
+ Service: "NetworkEndpointGroups",
+ }
+ klog.V(5).Infof("GCENetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCENetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ return nil, err
+ }
+ call := g.s.GA.NetworkEndpointGroups.ListNetworkEndpoints(projectID, key.Zone, key.Name, arg0)
+ var all []*ga.NetworkEndpointWithHealthStatus
+ f := func(l *ga.NetworkEndpointGroupsListNetworkEndpoints) error {
+ klog.V(5).Infof("GCENetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): page %+v", ctx, key, l)
+ all = append(all, l.Items...)
+ return nil
+ }
+ if err := call.Pages(ctx, f); err != nil {
+ klog.V(4).Infof("GCENetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = %v, %v", ctx, key, nil, err)
+ return nil, err
+ }
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCENetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = [%v items], %v", ctx, key, len(all), nil)
+ } else if klog.V(5).Enabled() {
+ var asStr []string
+ for _, o := range all {
+ asStr = append(asStr, fmt.Sprintf("%+v", o))
+ }
+ klog.V(5).Infof("GCENetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = %v, %v", ctx, key, asStr, nil)
+ }
+ return all, nil
+}
+
+// Projects is an interface that allows for mocking of Projects.
+type Projects interface {
+ // ProjectsOps is an interface with additional non-CRUD type methods.
+ // This interface is expected to be implemented by hand (non-autogenerated).
+ ProjectsOps
+}
+
+// NewMockProjects returns a new mock for Projects.
+func NewMockProjects(pr ProjectRouter, objs map[meta.Key]*MockProjectsObj) *MockProjects {
+ mock := &MockProjects{
+ ProjectRouter: pr,
+
+ Objects: objs,
+ }
+ return mock
+}
+
+// MockProjects is the mock for Projects.
+type MockProjects struct {
+ Lock sync.Mutex
+
+ ProjectRouter ProjectRouter
+
+ // Objects maintained by the mock.
+ Objects map[meta.Key]*MockProjectsObj
+
+ // If an entry exists for the given key and operation, then the error
+ // will be returned instead of the operation.
+
+ // xxxHook allow you to intercept the standard processing of the mock in
+ // order to add your own logic. Return (true, _, _) to prevent the normal
+ // execution flow of the mock. Return (false, nil, nil) to continue with
+ // normal mock behavior/ after the hook function executes.
+
+ // X is extra state that can be used as part of the mock. Generated code
+ // will not use this field.
+ X interface{}
+}
+
+// Obj wraps the object for use in the mock.
+func (m *MockProjects) Obj(o *ga.Project) *MockProjectsObj {
+ return &MockProjectsObj{o}
+}
+
+// GCEProjects is a simplifying adapter for the GCE Projects.
+type GCEProjects struct {
+ s *Service
+}
+
+// Regions is an interface that allows for mocking of Regions.
+type Regions interface {
+ Get(ctx context.Context, key *meta.Key) (*ga.Region, error)
+ List(ctx context.Context, fl *filter.F) ([]*ga.Region, error)
+}
+
+// NewMockRegions returns a new mock for Regions.
+func NewMockRegions(pr ProjectRouter, objs map[meta.Key]*MockRegionsObj) *MockRegions {
+ mock := &MockRegions{
+ ProjectRouter: pr,
+
+ Objects: objs,
+ GetError: map[meta.Key]error{},
+ }
+ return mock
+}
+
+// MockRegions is the mock for Regions.
+type MockRegions struct {
+ Lock sync.Mutex
+
+ ProjectRouter ProjectRouter
+
+ // Objects maintained by the mock.
+ Objects map[meta.Key]*MockRegionsObj
+
+ // If an entry exists for the given key and operation, then the error
+ // will be returned instead of the operation.
+ GetError map[meta.Key]error
+ ListError *error
+
+ // xxxHook allow you to intercept the standard processing of the mock in
+ // order to add your own logic. Return (true, _, _) to prevent the normal
+ // execution flow of the mock. Return (false, nil, nil) to continue with
+ // normal mock behavior/ after the hook function executes.
+ GetHook func(ctx context.Context, key *meta.Key, m *MockRegions) (bool, *ga.Region, error)
+ ListHook func(ctx context.Context, fl *filter.F, m *MockRegions) (bool, []*ga.Region, error)
+
+ // X is extra state that can be used as part of the mock. Generated code
+ // will not use this field.
+ X interface{}
+}
+
+// Get returns the object from the mock.
+func (m *MockRegions) Get(ctx context.Context, key *meta.Key) (*ga.Region, error) {
+ if m.GetHook != nil {
+ if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
+ klog.V(5).Infof("MockRegions.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ return obj, err
+ }
+ }
+ if !key.Valid() {
+ return nil, fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+
+ m.Lock.Lock()
+ defer m.Lock.Unlock()
+
+ if err, ok := m.GetError[*key]; ok {
+ klog.V(5).Infof("MockRegions.Get(%v, %s) = nil, %v", ctx, key, err)
+ return nil, err
+ }
+ if obj, ok := m.Objects[*key]; ok {
+ typedObj := obj.ToGA()
+ klog.V(5).Infof("MockRegions.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ return typedObj, nil
+ }
+
+ err := &googleapi.Error{
+ Code: http.StatusNotFound,
+ Message: fmt.Sprintf("MockRegions %v not found", key),
+ }
+ klog.V(5).Infof("MockRegions.Get(%v, %s) = nil, %v", ctx, key, err)
+ return nil, err
+}
+
+// List all of the objects in the mock.
+func (m *MockRegions) List(ctx context.Context, fl *filter.F) ([]*ga.Region, error) {
+ if m.ListHook != nil {
+ if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
+ klog.V(5).Infof("MockRegions.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
+ return objs, err
+ }
+ }
+
+ m.Lock.Lock()
+ defer m.Lock.Unlock()
+
+ if m.ListError != nil {
+ err := *m.ListError
+ klog.V(5).Infof("MockRegions.List(%v, %v) = nil, %v", ctx, fl, err)
+
+ return nil, *m.ListError
+ }
+
+ var objs []*ga.Region
+ for _, obj := range m.Objects {
+ if !fl.Match(obj.ToGA()) {
+ continue
+ }
+ objs = append(objs, obj.ToGA())
+ }
+
+ klog.V(5).Infof("MockRegions.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
+ return objs, nil
+}
+
+// Obj wraps the object for use in the mock.
+func (m *MockRegions) Obj(o *ga.Region) *MockRegionsObj {
+ return &MockRegionsObj{o}
+}
+
+// GCERegions is a simplifying adapter for the GCE Regions.
+type GCERegions struct {
+ s *Service
+}
+
+// Get the Region named by key.
+func (g *GCERegions) Get(ctx context.Context, key *meta.Key) (*ga.Region, error) {
+ klog.V(5).Infof("GCERegions.Get(%v, %v): called", ctx, key)
+
+ if !key.Valid() {
+ klog.V(2).Infof("GCERegions.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ return nil, fmt.Errorf("invalid GCE key (%#v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Regions")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "Get",
+ Version: meta.Version("ga"),
+ Service: "Regions",
+ }
+ klog.V(5).Infof("GCERegions.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCERegions.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ return nil, err
+ }
+ call := g.s.GA.Regions.Get(projectID, key.Name)
+ call.Context(ctx)
+ v, err := call.Do()
+ klog.V(4).Infof("GCERegions.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ return v, err
+}
+
+// List all Region objects.
+func (g *GCERegions) List(ctx context.Context, fl *filter.F) ([]*ga.Region, error) {
+ klog.V(5).Infof("GCERegions.List(%v, %v) called", ctx, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Regions")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "List",
+ Version: meta.Version("ga"),
+ Service: "Regions",
+ }
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ return nil, err
+ }
+ klog.V(5).Infof("GCERegions.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
+ call := g.s.GA.Regions.List(projectID)
+ if fl != filter.None {
+ call.Filter(fl.String())
+ }
+ var all []*ga.Region
+ f := func(l *ga.RegionList) error {
+ klog.V(5).Infof("GCERegions.List(%v, ..., %v): page %+v", ctx, fl, l)
+ all = append(all, l.Items...)
+ return nil
+ }
+ if err := call.Pages(ctx, f); err != nil {
+ klog.V(4).Infof("GCERegions.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ return nil, err
+ }
+
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCERegions.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
+ var asStr []string
+ for _, o := range all {
+ asStr = append(asStr, fmt.Sprintf("%+v", o))
+ }
+ klog.V(5).Infof("GCERegions.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ }
+
+ return all, nil
+}
+
+// Routes is an interface that allows for mocking of Routes.
+type Routes interface {
Get(ctx context.Context, key *meta.Key) (*ga.Route, error)
List(ctx context.Context, fl *filter.F) ([]*ga.Route, error)
Insert(ctx context.Context, key *meta.Key, obj *ga.Route) error
Delete(ctx context.Context, key *meta.Key) error
}
-// NewMockRoutes returns a new mock for Routes.
-func NewMockRoutes(pr ProjectRouter, objs map[meta.Key]*MockRoutesObj) *MockRoutes {
- mock := &MockRoutes{
+// NewMockRoutes returns a new mock for Routes.
+func NewMockRoutes(pr ProjectRouter, objs map[meta.Key]*MockRoutesObj) *MockRoutes {
+ mock := &MockRoutes{
+ ProjectRouter: pr,
+
+ Objects: objs,
+ GetError: map[meta.Key]error{},
+ InsertError: map[meta.Key]error{},
+ DeleteError: map[meta.Key]error{},
+ }
+ return mock
+}
+
+// MockRoutes is the mock for Routes.
+type MockRoutes struct {
+ Lock sync.Mutex
+
+ ProjectRouter ProjectRouter
+
+ // Objects maintained by the mock.
+ Objects map[meta.Key]*MockRoutesObj
+
+ // If an entry exists for the given key and operation, then the error
+ // will be returned instead of the operation.
+ GetError map[meta.Key]error
+ ListError *error
+ InsertError map[meta.Key]error
+ DeleteError map[meta.Key]error
+
+ // xxxHook allow you to intercept the standard processing of the mock in
+ // order to add your own logic. Return (true, _, _) to prevent the normal
+ // execution flow of the mock. Return (false, nil, nil) to continue with
+ // normal mock behavior/ after the hook function executes.
+ GetHook func(ctx context.Context, key *meta.Key, m *MockRoutes) (bool, *ga.Route, error)
+ ListHook func(ctx context.Context, fl *filter.F, m *MockRoutes) (bool, []*ga.Route, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *ga.Route, m *MockRoutes) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockRoutes) (bool, error)
+
+ // X is extra state that can be used as part of the mock. Generated code
+ // will not use this field.
+ X interface{}
+}
+
+// Get returns the object from the mock.
+func (m *MockRoutes) Get(ctx context.Context, key *meta.Key) (*ga.Route, error) {
+ if m.GetHook != nil {
+ if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
+ klog.V(5).Infof("MockRoutes.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ return obj, err
+ }
+ }
+ if !key.Valid() {
+ return nil, fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+
+ m.Lock.Lock()
+ defer m.Lock.Unlock()
+
+ if err, ok := m.GetError[*key]; ok {
+ klog.V(5).Infof("MockRoutes.Get(%v, %s) = nil, %v", ctx, key, err)
+ return nil, err
+ }
+ if obj, ok := m.Objects[*key]; ok {
+ typedObj := obj.ToGA()
+ klog.V(5).Infof("MockRoutes.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ return typedObj, nil
+ }
+
+ err := &googleapi.Error{
+ Code: http.StatusNotFound,
+ Message: fmt.Sprintf("MockRoutes %v not found", key),
+ }
+ klog.V(5).Infof("MockRoutes.Get(%v, %s) = nil, %v", ctx, key, err)
+ return nil, err
+}
+
+// List all of the objects in the mock.
+func (m *MockRoutes) List(ctx context.Context, fl *filter.F) ([]*ga.Route, error) {
+ if m.ListHook != nil {
+ if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
+ klog.V(5).Infof("MockRoutes.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
+ return objs, err
+ }
+ }
+
+ m.Lock.Lock()
+ defer m.Lock.Unlock()
+
+ if m.ListError != nil {
+ err := *m.ListError
+ klog.V(5).Infof("MockRoutes.List(%v, %v) = nil, %v", ctx, fl, err)
+
+ return nil, *m.ListError
+ }
+
+ var objs []*ga.Route
+ for _, obj := range m.Objects {
+ if !fl.Match(obj.ToGA()) {
+ continue
+ }
+ objs = append(objs, obj.ToGA())
+ }
+
+ klog.V(5).Infof("MockRoutes.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
+ return objs, nil
+}
+
+// Insert is a mock for inserting/creating a new object.
+func (m *MockRoutes) Insert(ctx context.Context, key *meta.Key, obj *ga.Route) error {
+ if m.InsertHook != nil {
+ if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
+ klog.V(5).Infof("MockRoutes.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ return err
+ }
+ }
+ if !key.Valid() {
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+
+ m.Lock.Lock()
+ defer m.Lock.Unlock()
+
+ if err, ok := m.InsertError[*key]; ok {
+ klog.V(5).Infof("MockRoutes.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ return err
+ }
+ if _, ok := m.Objects[*key]; ok {
+ err := &googleapi.Error{
+ Code: http.StatusConflict,
+ Message: fmt.Sprintf("MockRoutes %v exists", key),
+ }
+ klog.V(5).Infof("MockRoutes.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ return err
+ }
+
+ obj.Name = key.Name
+ projectID := m.ProjectRouter.ProjectID(ctx, "ga", "routes")
+ obj.SelfLink = SelfLink(meta.VersionGA, projectID, "routes", key)
+
+ m.Objects[*key] = &MockRoutesObj{obj}
+ klog.V(5).Infof("MockRoutes.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ return nil
+}
+
+// Delete is a mock for deleting the object.
+func (m *MockRoutes) Delete(ctx context.Context, key *meta.Key) error {
+ if m.DeleteHook != nil {
+ if intercept, err := m.DeleteHook(ctx, key, m); intercept {
+ klog.V(5).Infof("MockRoutes.Delete(%v, %v) = %v", ctx, key, err)
+ return err
+ }
+ }
+ if !key.Valid() {
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+
+ m.Lock.Lock()
+ defer m.Lock.Unlock()
+
+ if err, ok := m.DeleteError[*key]; ok {
+ klog.V(5).Infof("MockRoutes.Delete(%v, %v) = %v", ctx, key, err)
+ return err
+ }
+ if _, ok := m.Objects[*key]; !ok {
+ err := &googleapi.Error{
+ Code: http.StatusNotFound,
+ Message: fmt.Sprintf("MockRoutes %v not found", key),
+ }
+ klog.V(5).Infof("MockRoutes.Delete(%v, %v) = %v", ctx, key, err)
+ return err
+ }
+
+ delete(m.Objects, *key)
+ klog.V(5).Infof("MockRoutes.Delete(%v, %v) = nil", ctx, key)
+ return nil
+}
+
+// Obj wraps the object for use in the mock.
+func (m *MockRoutes) Obj(o *ga.Route) *MockRoutesObj {
+ return &MockRoutesObj{o}
+}
+
+// GCERoutes is a simplifying adapter for the GCE Routes.
+type GCERoutes struct {
+ s *Service
+}
+
+// Get the Route named by key.
+func (g *GCERoutes) Get(ctx context.Context, key *meta.Key) (*ga.Route, error) {
+ klog.V(5).Infof("GCERoutes.Get(%v, %v): called", ctx, key)
+
+ if !key.Valid() {
+ klog.V(2).Infof("GCERoutes.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ return nil, fmt.Errorf("invalid GCE key (%#v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Routes")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "Get",
+ Version: meta.Version("ga"),
+ Service: "Routes",
+ }
+ klog.V(5).Infof("GCERoutes.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCERoutes.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ return nil, err
+ }
+ call := g.s.GA.Routes.Get(projectID, key.Name)
+ call.Context(ctx)
+ v, err := call.Do()
+ klog.V(4).Infof("GCERoutes.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ return v, err
+}
+
+// List all Route objects.
+func (g *GCERoutes) List(ctx context.Context, fl *filter.F) ([]*ga.Route, error) {
+ klog.V(5).Infof("GCERoutes.List(%v, %v) called", ctx, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Routes")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "List",
+ Version: meta.Version("ga"),
+ Service: "Routes",
+ }
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ return nil, err
+ }
+ klog.V(5).Infof("GCERoutes.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
+ call := g.s.GA.Routes.List(projectID)
+ if fl != filter.None {
+ call.Filter(fl.String())
+ }
+ var all []*ga.Route
+ f := func(l *ga.RouteList) error {
+ klog.V(5).Infof("GCERoutes.List(%v, ..., %v): page %+v", ctx, fl, l)
+ all = append(all, l.Items...)
+ return nil
+ }
+ if err := call.Pages(ctx, f); err != nil {
+ klog.V(4).Infof("GCERoutes.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ return nil, err
+ }
+
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCERoutes.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
+ var asStr []string
+ for _, o := range all {
+ asStr = append(asStr, fmt.Sprintf("%+v", o))
+ }
+ klog.V(5).Infof("GCERoutes.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ }
+
+ return all, nil
+}
+
+// Insert Route with key of value obj.
+func (g *GCERoutes) Insert(ctx context.Context, key *meta.Key, obj *ga.Route) error {
+ klog.V(5).Infof("GCERoutes.Insert(%v, %v, %+v): called", ctx, key, obj)
+ if !key.Valid() {
+ klog.V(2).Infof("GCERoutes.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Routes")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "Insert",
+ Version: meta.Version("ga"),
+ Service: "Routes",
+ }
+ klog.V(5).Infof("GCERoutes.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCERoutes.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ return err
+ }
+ obj.Name = key.Name
+ call := g.s.GA.Routes.Insert(projectID, obj)
+ call.Context(ctx)
+
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCERoutes.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+ }
+
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCERoutes.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ return err
+}
+
+// Delete the Route referenced by key.
+func (g *GCERoutes) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCERoutes.Delete(%v, %v): called", ctx, key)
+ if !key.Valid() {
+ klog.V(2).Infof("GCERoutes.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Routes")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "Delete",
+ Version: meta.Version("ga"),
+ Service: "Routes",
+ }
+ klog.V(5).Infof("GCERoutes.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCERoutes.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ return err
+ }
+ call := g.s.GA.Routes.Delete(projectID, key.Name)
+
+ call.Context(ctx)
+
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCERoutes.Delete(%v, %v) = %v", ctx, key, err)
+ return err
+ }
+
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCERoutes.Delete(%v, %v) = %v", ctx, key, err)
+ return err
+}
+
+// BetaSecurityPolicies is an interface that allows for mocking of SecurityPolicies.
+type BetaSecurityPolicies interface {
+ Get(ctx context.Context, key *meta.Key) (*beta.SecurityPolicy, error)
+ List(ctx context.Context, fl *filter.F) ([]*beta.SecurityPolicy, error)
+ Insert(ctx context.Context, key *meta.Key, obj *beta.SecurityPolicy) error
+ Delete(ctx context.Context, key *meta.Key) error
+ AddRule(context.Context, *meta.Key, *beta.SecurityPolicyRule) error
+ GetRule(context.Context, *meta.Key) (*beta.SecurityPolicyRule, error)
+ Patch(context.Context, *meta.Key, *beta.SecurityPolicy) error
+ PatchRule(context.Context, *meta.Key, *beta.SecurityPolicyRule) error
+ RemoveRule(context.Context, *meta.Key) error
+}
+
+// NewMockBetaSecurityPolicies returns a new mock for SecurityPolicies.
+func NewMockBetaSecurityPolicies(pr ProjectRouter, objs map[meta.Key]*MockSecurityPoliciesObj) *MockBetaSecurityPolicies {
+ mock := &MockBetaSecurityPolicies{
+ ProjectRouter: pr,
+
+ Objects: objs,
+ GetError: map[meta.Key]error{},
+ InsertError: map[meta.Key]error{},
+ DeleteError: map[meta.Key]error{},
+ }
+ return mock
+}
+
+// MockBetaSecurityPolicies is the mock for SecurityPolicies.
+type MockBetaSecurityPolicies struct {
+ Lock sync.Mutex
+
+ ProjectRouter ProjectRouter
+
+ // Objects maintained by the mock.
+ Objects map[meta.Key]*MockSecurityPoliciesObj
+
+ // If an entry exists for the given key and operation, then the error
+ // will be returned instead of the operation.
+ GetError map[meta.Key]error
+ ListError *error
+ InsertError map[meta.Key]error
+ DeleteError map[meta.Key]error
+
+ // xxxHook allow you to intercept the standard processing of the mock in
+ // order to add your own logic. Return (true, _, _) to prevent the normal
+ // execution flow of the mock. Return (false, nil, nil) to continue with
+ // normal mock behavior/ after the hook function executes.
+ GetHook func(ctx context.Context, key *meta.Key, m *MockBetaSecurityPolicies) (bool, *beta.SecurityPolicy, error)
+ ListHook func(ctx context.Context, fl *filter.F, m *MockBetaSecurityPolicies) (bool, []*beta.SecurityPolicy, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *beta.SecurityPolicy, m *MockBetaSecurityPolicies) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaSecurityPolicies) (bool, error)
+ AddRuleHook func(context.Context, *meta.Key, *beta.SecurityPolicyRule, *MockBetaSecurityPolicies) error
+ GetRuleHook func(context.Context, *meta.Key, *MockBetaSecurityPolicies) (*beta.SecurityPolicyRule, error)
+ PatchHook func(context.Context, *meta.Key, *beta.SecurityPolicy, *MockBetaSecurityPolicies) error
+ PatchRuleHook func(context.Context, *meta.Key, *beta.SecurityPolicyRule, *MockBetaSecurityPolicies) error
+ RemoveRuleHook func(context.Context, *meta.Key, *MockBetaSecurityPolicies) error
+
+ // X is extra state that can be used as part of the mock. Generated code
+ // will not use this field.
+ X interface{}
+}
+
+// Get returns the object from the mock.
+func (m *MockBetaSecurityPolicies) Get(ctx context.Context, key *meta.Key) (*beta.SecurityPolicy, error) {
+ if m.GetHook != nil {
+ if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
+ klog.V(5).Infof("MockBetaSecurityPolicies.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ return obj, err
+ }
+ }
+ if !key.Valid() {
+ return nil, fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+
+ m.Lock.Lock()
+ defer m.Lock.Unlock()
+
+ if err, ok := m.GetError[*key]; ok {
+ klog.V(5).Infof("MockBetaSecurityPolicies.Get(%v, %s) = nil, %v", ctx, key, err)
+ return nil, err
+ }
+ if obj, ok := m.Objects[*key]; ok {
+ typedObj := obj.ToBeta()
+ klog.V(5).Infof("MockBetaSecurityPolicies.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ return typedObj, nil
+ }
+
+ err := &googleapi.Error{
+ Code: http.StatusNotFound,
+ Message: fmt.Sprintf("MockBetaSecurityPolicies %v not found", key),
+ }
+ klog.V(5).Infof("MockBetaSecurityPolicies.Get(%v, %s) = nil, %v", ctx, key, err)
+ return nil, err
+}
+
+// List all of the objects in the mock.
+func (m *MockBetaSecurityPolicies) List(ctx context.Context, fl *filter.F) ([]*beta.SecurityPolicy, error) {
+ if m.ListHook != nil {
+ if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
+ klog.V(5).Infof("MockBetaSecurityPolicies.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
+ return objs, err
+ }
+ }
+
+ m.Lock.Lock()
+ defer m.Lock.Unlock()
+
+ if m.ListError != nil {
+ err := *m.ListError
+ klog.V(5).Infof("MockBetaSecurityPolicies.List(%v, %v) = nil, %v", ctx, fl, err)
+
+ return nil, *m.ListError
+ }
+
+ var objs []*beta.SecurityPolicy
+ for _, obj := range m.Objects {
+ if !fl.Match(obj.ToBeta()) {
+ continue
+ }
+ objs = append(objs, obj.ToBeta())
+ }
+
+ klog.V(5).Infof("MockBetaSecurityPolicies.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
+ return objs, nil
+}
+
+// Insert is a mock for inserting/creating a new object.
+func (m *MockBetaSecurityPolicies) Insert(ctx context.Context, key *meta.Key, obj *beta.SecurityPolicy) error {
+ if m.InsertHook != nil {
+ if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
+ klog.V(5).Infof("MockBetaSecurityPolicies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ return err
+ }
+ }
+ if !key.Valid() {
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+
+ m.Lock.Lock()
+ defer m.Lock.Unlock()
+
+ if err, ok := m.InsertError[*key]; ok {
+ klog.V(5).Infof("MockBetaSecurityPolicies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ return err
+ }
+ if _, ok := m.Objects[*key]; ok {
+ err := &googleapi.Error{
+ Code: http.StatusConflict,
+ Message: fmt.Sprintf("MockBetaSecurityPolicies %v exists", key),
+ }
+ klog.V(5).Infof("MockBetaSecurityPolicies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ return err
+ }
+
+ obj.Name = key.Name
+ projectID := m.ProjectRouter.ProjectID(ctx, "beta", "securityPolicies")
+ obj.SelfLink = SelfLink(meta.VersionBeta, projectID, "securityPolicies", key)
+
+ m.Objects[*key] = &MockSecurityPoliciesObj{obj}
+ klog.V(5).Infof("MockBetaSecurityPolicies.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ return nil
+}
+
+// Delete is a mock for deleting the object.
+func (m *MockBetaSecurityPolicies) Delete(ctx context.Context, key *meta.Key) error {
+ if m.DeleteHook != nil {
+ if intercept, err := m.DeleteHook(ctx, key, m); intercept {
+ klog.V(5).Infof("MockBetaSecurityPolicies.Delete(%v, %v) = %v", ctx, key, err)
+ return err
+ }
+ }
+ if !key.Valid() {
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+
+ m.Lock.Lock()
+ defer m.Lock.Unlock()
+
+ if err, ok := m.DeleteError[*key]; ok {
+ klog.V(5).Infof("MockBetaSecurityPolicies.Delete(%v, %v) = %v", ctx, key, err)
+ return err
+ }
+ if _, ok := m.Objects[*key]; !ok {
+ err := &googleapi.Error{
+ Code: http.StatusNotFound,
+ Message: fmt.Sprintf("MockBetaSecurityPolicies %v not found", key),
+ }
+ klog.V(5).Infof("MockBetaSecurityPolicies.Delete(%v, %v) = %v", ctx, key, err)
+ return err
+ }
+
+ delete(m.Objects, *key)
+ klog.V(5).Infof("MockBetaSecurityPolicies.Delete(%v, %v) = nil", ctx, key)
+ return nil
+}
+
+// Obj wraps the object for use in the mock.
+func (m *MockBetaSecurityPolicies) Obj(o *beta.SecurityPolicy) *MockSecurityPoliciesObj {
+ return &MockSecurityPoliciesObj{o}
+}
+
+// AddRule is a mock for the corresponding method.
+func (m *MockBetaSecurityPolicies) AddRule(ctx context.Context, key *meta.Key, arg0 *beta.SecurityPolicyRule) error {
+ if m.AddRuleHook != nil {
+ return m.AddRuleHook(ctx, key, arg0, m)
+ }
+ return nil
+}
+
+// GetRule is a mock for the corresponding method.
+func (m *MockBetaSecurityPolicies) GetRule(ctx context.Context, key *meta.Key) (*beta.SecurityPolicyRule, error) {
+ if m.GetRuleHook != nil {
+ return m.GetRuleHook(ctx, key, m)
+ }
+ return nil, fmt.Errorf("GetRuleHook must be set")
+}
+
+// Patch is a mock for the corresponding method.
+func (m *MockBetaSecurityPolicies) Patch(ctx context.Context, key *meta.Key, arg0 *beta.SecurityPolicy) error {
+ if m.PatchHook != nil {
+ return m.PatchHook(ctx, key, arg0, m)
+ }
+ return nil
+}
+
+// PatchRule is a mock for the corresponding method.
+func (m *MockBetaSecurityPolicies) PatchRule(ctx context.Context, key *meta.Key, arg0 *beta.SecurityPolicyRule) error {
+ if m.PatchRuleHook != nil {
+ return m.PatchRuleHook(ctx, key, arg0, m)
+ }
+ return nil
+}
+
+// RemoveRule is a mock for the corresponding method.
+func (m *MockBetaSecurityPolicies) RemoveRule(ctx context.Context, key *meta.Key) error {
+ if m.RemoveRuleHook != nil {
+ return m.RemoveRuleHook(ctx, key, m)
+ }
+ return nil
+}
+
+// GCEBetaSecurityPolicies is a simplifying adapter for the GCE SecurityPolicies.
+type GCEBetaSecurityPolicies struct {
+ s *Service
+}
+
+// Get the SecurityPolicy named by key.
+func (g *GCEBetaSecurityPolicies) Get(ctx context.Context, key *meta.Key) (*beta.SecurityPolicy, error) {
+ klog.V(5).Infof("GCEBetaSecurityPolicies.Get(%v, %v): called", ctx, key)
+
+ if !key.Valid() {
+ klog.V(2).Infof("GCEBetaSecurityPolicies.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ return nil, fmt.Errorf("invalid GCE key (%#v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "SecurityPolicies")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "Get",
+ Version: meta.Version("beta"),
+ Service: "SecurityPolicies",
+ }
+ klog.V(5).Infof("GCEBetaSecurityPolicies.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCEBetaSecurityPolicies.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ return nil, err
+ }
+ call := g.s.Beta.SecurityPolicies.Get(projectID, key.Name)
+ call.Context(ctx)
+ v, err := call.Do()
+ klog.V(4).Infof("GCEBetaSecurityPolicies.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ return v, err
+}
+
+// List all SecurityPolicy objects.
+func (g *GCEBetaSecurityPolicies) List(ctx context.Context, fl *filter.F) ([]*beta.SecurityPolicy, error) {
+ klog.V(5).Infof("GCEBetaSecurityPolicies.List(%v, %v) called", ctx, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "SecurityPolicies")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "List",
+ Version: meta.Version("beta"),
+ Service: "SecurityPolicies",
+ }
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ return nil, err
+ }
+ klog.V(5).Infof("GCEBetaSecurityPolicies.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
+ call := g.s.Beta.SecurityPolicies.List(projectID)
+ if fl != filter.None {
+ call.Filter(fl.String())
+ }
+ var all []*beta.SecurityPolicy
+ f := func(l *beta.SecurityPolicyList) error {
+ klog.V(5).Infof("GCEBetaSecurityPolicies.List(%v, ..., %v): page %+v", ctx, fl, l)
+ all = append(all, l.Items...)
+ return nil
+ }
+ if err := call.Pages(ctx, f); err != nil {
+ klog.V(4).Infof("GCEBetaSecurityPolicies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ return nil, err
+ }
+
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEBetaSecurityPolicies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
+ var asStr []string
+ for _, o := range all {
+ asStr = append(asStr, fmt.Sprintf("%+v", o))
+ }
+ klog.V(5).Infof("GCEBetaSecurityPolicies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ }
+
+ return all, nil
+}
+
+// Insert SecurityPolicy with key of value obj.
+func (g *GCEBetaSecurityPolicies) Insert(ctx context.Context, key *meta.Key, obj *beta.SecurityPolicy) error {
+ klog.V(5).Infof("GCEBetaSecurityPolicies.Insert(%v, %v, %+v): called", ctx, key, obj)
+ if !key.Valid() {
+ klog.V(2).Infof("GCEBetaSecurityPolicies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "SecurityPolicies")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "Insert",
+ Version: meta.Version("beta"),
+ Service: "SecurityPolicies",
+ }
+ klog.V(5).Infof("GCEBetaSecurityPolicies.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCEBetaSecurityPolicies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ return err
+ }
+ obj.Name = key.Name
+ call := g.s.Beta.SecurityPolicies.Insert(projectID, obj)
+ call.Context(ctx)
+
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCEBetaSecurityPolicies.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+ }
+
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCEBetaSecurityPolicies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ return err
+}
+
+// Delete the SecurityPolicy referenced by key.
+func (g *GCEBetaSecurityPolicies) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEBetaSecurityPolicies.Delete(%v, %v): called", ctx, key)
+ if !key.Valid() {
+ klog.V(2).Infof("GCEBetaSecurityPolicies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "SecurityPolicies")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "Delete",
+ Version: meta.Version("beta"),
+ Service: "SecurityPolicies",
+ }
+ klog.V(5).Infof("GCEBetaSecurityPolicies.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCEBetaSecurityPolicies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ return err
+ }
+ call := g.s.Beta.SecurityPolicies.Delete(projectID, key.Name)
+
+ call.Context(ctx)
+
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCEBetaSecurityPolicies.Delete(%v, %v) = %v", ctx, key, err)
+ return err
+ }
+
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCEBetaSecurityPolicies.Delete(%v, %v) = %v", ctx, key, err)
+ return err
+}
+
+// AddRule is a method on GCEBetaSecurityPolicies.
+func (g *GCEBetaSecurityPolicies) AddRule(ctx context.Context, key *meta.Key, arg0 *beta.SecurityPolicyRule) error {
+ klog.V(5).Infof("GCEBetaSecurityPolicies.AddRule(%v, %v, ...): called", ctx, key)
+
+ if !key.Valid() {
+ klog.V(2).Infof("GCEBetaSecurityPolicies.AddRule(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "SecurityPolicies")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "AddRule",
+ Version: meta.Version("beta"),
+ Service: "SecurityPolicies",
+ }
+ klog.V(5).Infof("GCEBetaSecurityPolicies.AddRule(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCEBetaSecurityPolicies.AddRule(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ return err
+ }
+ call := g.s.Beta.SecurityPolicies.AddRule(projectID, key.Name, arg0)
+ call.Context(ctx)
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCEBetaSecurityPolicies.AddRule(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+ }
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCEBetaSecurityPolicies.AddRule(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+}
+
+// GetRule is a method on GCEBetaSecurityPolicies.
+func (g *GCEBetaSecurityPolicies) GetRule(ctx context.Context, key *meta.Key) (*beta.SecurityPolicyRule, error) {
+ klog.V(5).Infof("GCEBetaSecurityPolicies.GetRule(%v, %v, ...): called", ctx, key)
+
+ if !key.Valid() {
+ klog.V(2).Infof("GCEBetaSecurityPolicies.GetRule(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ return nil, fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "SecurityPolicies")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "GetRule",
+ Version: meta.Version("beta"),
+ Service: "SecurityPolicies",
+ }
+ klog.V(5).Infof("GCEBetaSecurityPolicies.GetRule(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCEBetaSecurityPolicies.GetRule(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ return nil, err
+ }
+ call := g.s.Beta.SecurityPolicies.GetRule(projectID, key.Name)
+ call.Context(ctx)
+ v, err := call.Do()
+ klog.V(4).Infof("GCEBetaSecurityPolicies.GetRule(%v, %v, ...) = %+v, %v", ctx, key, v, err)
+ return v, err
+}
+
+// Patch is a method on GCEBetaSecurityPolicies.
+func (g *GCEBetaSecurityPolicies) Patch(ctx context.Context, key *meta.Key, arg0 *beta.SecurityPolicy) error {
+ klog.V(5).Infof("GCEBetaSecurityPolicies.Patch(%v, %v, ...): called", ctx, key)
+
+ if !key.Valid() {
+ klog.V(2).Infof("GCEBetaSecurityPolicies.Patch(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "SecurityPolicies")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "Patch",
+ Version: meta.Version("beta"),
+ Service: "SecurityPolicies",
+ }
+ klog.V(5).Infof("GCEBetaSecurityPolicies.Patch(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCEBetaSecurityPolicies.Patch(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ return err
+ }
+ call := g.s.Beta.SecurityPolicies.Patch(projectID, key.Name, arg0)
+ call.Context(ctx)
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCEBetaSecurityPolicies.Patch(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+ }
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCEBetaSecurityPolicies.Patch(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+}
+
+// PatchRule is a method on GCEBetaSecurityPolicies.
+func (g *GCEBetaSecurityPolicies) PatchRule(ctx context.Context, key *meta.Key, arg0 *beta.SecurityPolicyRule) error {
+ klog.V(5).Infof("GCEBetaSecurityPolicies.PatchRule(%v, %v, ...): called", ctx, key)
+
+ if !key.Valid() {
+ klog.V(2).Infof("GCEBetaSecurityPolicies.PatchRule(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "SecurityPolicies")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "PatchRule",
+ Version: meta.Version("beta"),
+ Service: "SecurityPolicies",
+ }
+ klog.V(5).Infof("GCEBetaSecurityPolicies.PatchRule(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCEBetaSecurityPolicies.PatchRule(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ return err
+ }
+ call := g.s.Beta.SecurityPolicies.PatchRule(projectID, key.Name, arg0)
+ call.Context(ctx)
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCEBetaSecurityPolicies.PatchRule(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+ }
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCEBetaSecurityPolicies.PatchRule(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+}
+
+// RemoveRule is a method on GCEBetaSecurityPolicies.
+func (g *GCEBetaSecurityPolicies) RemoveRule(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEBetaSecurityPolicies.RemoveRule(%v, %v, ...): called", ctx, key)
+
+ if !key.Valid() {
+ klog.V(2).Infof("GCEBetaSecurityPolicies.RemoveRule(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "SecurityPolicies")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "RemoveRule",
+ Version: meta.Version("beta"),
+ Service: "SecurityPolicies",
+ }
+ klog.V(5).Infof("GCEBetaSecurityPolicies.RemoveRule(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCEBetaSecurityPolicies.RemoveRule(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ return err
+ }
+ call := g.s.Beta.SecurityPolicies.RemoveRule(projectID, key.Name)
+ call.Context(ctx)
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCEBetaSecurityPolicies.RemoveRule(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+ }
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCEBetaSecurityPolicies.RemoveRule(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+}
+
+// SslCertificates is an interface that allows for mocking of SslCertificates.
+type SslCertificates interface {
+ Get(ctx context.Context, key *meta.Key) (*ga.SslCertificate, error)
+ List(ctx context.Context, fl *filter.F) ([]*ga.SslCertificate, error)
+ Insert(ctx context.Context, key *meta.Key, obj *ga.SslCertificate) error
+ Delete(ctx context.Context, key *meta.Key) error
+}
+
+// NewMockSslCertificates returns a new mock for SslCertificates.
+func NewMockSslCertificates(pr ProjectRouter, objs map[meta.Key]*MockSslCertificatesObj) *MockSslCertificates {
+ mock := &MockSslCertificates{
+ ProjectRouter: pr,
+
+ Objects: objs,
+ GetError: map[meta.Key]error{},
+ InsertError: map[meta.Key]error{},
+ DeleteError: map[meta.Key]error{},
+ }
+ return mock
+}
+
+// MockSslCertificates is the mock for SslCertificates.
+type MockSslCertificates struct {
+ Lock sync.Mutex
+
+ ProjectRouter ProjectRouter
+
+ // Objects maintained by the mock.
+ Objects map[meta.Key]*MockSslCertificatesObj
+
+ // If an entry exists for the given key and operation, then the error
+ // will be returned instead of the operation.
+ GetError map[meta.Key]error
+ ListError *error
+ InsertError map[meta.Key]error
+ DeleteError map[meta.Key]error
+
+ // xxxHook allow you to intercept the standard processing of the mock in
+ // order to add your own logic. Return (true, _, _) to prevent the normal
+ // execution flow of the mock. Return (false, nil, nil) to continue with
+ // normal mock behavior/ after the hook function executes.
+ GetHook func(ctx context.Context, key *meta.Key, m *MockSslCertificates) (bool, *ga.SslCertificate, error)
+ ListHook func(ctx context.Context, fl *filter.F, m *MockSslCertificates) (bool, []*ga.SslCertificate, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *ga.SslCertificate, m *MockSslCertificates) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockSslCertificates) (bool, error)
+
+ // X is extra state that can be used as part of the mock. Generated code
+ // will not use this field.
+ X interface{}
+}
+
+// Get returns the object from the mock.
+func (m *MockSslCertificates) Get(ctx context.Context, key *meta.Key) (*ga.SslCertificate, error) {
+ if m.GetHook != nil {
+ if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
+ klog.V(5).Infof("MockSslCertificates.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ return obj, err
+ }
+ }
+ if !key.Valid() {
+ return nil, fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+
+ m.Lock.Lock()
+ defer m.Lock.Unlock()
+
+ if err, ok := m.GetError[*key]; ok {
+ klog.V(5).Infof("MockSslCertificates.Get(%v, %s) = nil, %v", ctx, key, err)
+ return nil, err
+ }
+ if obj, ok := m.Objects[*key]; ok {
+ typedObj := obj.ToGA()
+ klog.V(5).Infof("MockSslCertificates.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ return typedObj, nil
+ }
+
+ err := &googleapi.Error{
+ Code: http.StatusNotFound,
+ Message: fmt.Sprintf("MockSslCertificates %v not found", key),
+ }
+ klog.V(5).Infof("MockSslCertificates.Get(%v, %s) = nil, %v", ctx, key, err)
+ return nil, err
+}
+
+// List all of the objects in the mock.
+func (m *MockSslCertificates) List(ctx context.Context, fl *filter.F) ([]*ga.SslCertificate, error) {
+ if m.ListHook != nil {
+ if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
+ klog.V(5).Infof("MockSslCertificates.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
+ return objs, err
+ }
+ }
+
+ m.Lock.Lock()
+ defer m.Lock.Unlock()
+
+ if m.ListError != nil {
+ err := *m.ListError
+ klog.V(5).Infof("MockSslCertificates.List(%v, %v) = nil, %v", ctx, fl, err)
+
+ return nil, *m.ListError
+ }
+
+ var objs []*ga.SslCertificate
+ for _, obj := range m.Objects {
+ if !fl.Match(obj.ToGA()) {
+ continue
+ }
+ objs = append(objs, obj.ToGA())
+ }
+
+ klog.V(5).Infof("MockSslCertificates.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
+ return objs, nil
+}
+
+// Insert is a mock for inserting/creating a new object.
+func (m *MockSslCertificates) Insert(ctx context.Context, key *meta.Key, obj *ga.SslCertificate) error {
+ if m.InsertHook != nil {
+ if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
+ klog.V(5).Infof("MockSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ return err
+ }
+ }
+ if !key.Valid() {
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+
+ m.Lock.Lock()
+ defer m.Lock.Unlock()
+
+ if err, ok := m.InsertError[*key]; ok {
+ klog.V(5).Infof("MockSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ return err
+ }
+ if _, ok := m.Objects[*key]; ok {
+ err := &googleapi.Error{
+ Code: http.StatusConflict,
+ Message: fmt.Sprintf("MockSslCertificates %v exists", key),
+ }
+ klog.V(5).Infof("MockSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ return err
+ }
+
+ obj.Name = key.Name
+ projectID := m.ProjectRouter.ProjectID(ctx, "ga", "sslCertificates")
+ obj.SelfLink = SelfLink(meta.VersionGA, projectID, "sslCertificates", key)
+
+ m.Objects[*key] = &MockSslCertificatesObj{obj}
+ klog.V(5).Infof("MockSslCertificates.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ return nil
+}
+
+// Delete is a mock for deleting the object.
+func (m *MockSslCertificates) Delete(ctx context.Context, key *meta.Key) error {
+ if m.DeleteHook != nil {
+ if intercept, err := m.DeleteHook(ctx, key, m); intercept {
+ klog.V(5).Infof("MockSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
+ return err
+ }
+ }
+ if !key.Valid() {
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+
+ m.Lock.Lock()
+ defer m.Lock.Unlock()
+
+ if err, ok := m.DeleteError[*key]; ok {
+ klog.V(5).Infof("MockSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
+ return err
+ }
+ if _, ok := m.Objects[*key]; !ok {
+ err := &googleapi.Error{
+ Code: http.StatusNotFound,
+ Message: fmt.Sprintf("MockSslCertificates %v not found", key),
+ }
+ klog.V(5).Infof("MockSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
+ return err
+ }
+
+ delete(m.Objects, *key)
+ klog.V(5).Infof("MockSslCertificates.Delete(%v, %v) = nil", ctx, key)
+ return nil
+}
+
+// Obj wraps the object for use in the mock.
+func (m *MockSslCertificates) Obj(o *ga.SslCertificate) *MockSslCertificatesObj {
+ return &MockSslCertificatesObj{o}
+}
+
+// GCESslCertificates is a simplifying adapter for the GCE SslCertificates.
+type GCESslCertificates struct {
+ s *Service
+}
+
+// Get the SslCertificate named by key.
+func (g *GCESslCertificates) Get(ctx context.Context, key *meta.Key) (*ga.SslCertificate, error) {
+ klog.V(5).Infof("GCESslCertificates.Get(%v, %v): called", ctx, key)
+
+ if !key.Valid() {
+ klog.V(2).Infof("GCESslCertificates.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ return nil, fmt.Errorf("invalid GCE key (%#v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "SslCertificates")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "Get",
+ Version: meta.Version("ga"),
+ Service: "SslCertificates",
+ }
+ klog.V(5).Infof("GCESslCertificates.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCESslCertificates.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ return nil, err
+ }
+ call := g.s.GA.SslCertificates.Get(projectID, key.Name)
+ call.Context(ctx)
+ v, err := call.Do()
+ klog.V(4).Infof("GCESslCertificates.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ return v, err
+}
+
+// List all SslCertificate objects.
+func (g *GCESslCertificates) List(ctx context.Context, fl *filter.F) ([]*ga.SslCertificate, error) {
+ klog.V(5).Infof("GCESslCertificates.List(%v, %v) called", ctx, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "SslCertificates")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "List",
+ Version: meta.Version("ga"),
+ Service: "SslCertificates",
+ }
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ return nil, err
+ }
+ klog.V(5).Infof("GCESslCertificates.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
+ call := g.s.GA.SslCertificates.List(projectID)
+ if fl != filter.None {
+ call.Filter(fl.String())
+ }
+ var all []*ga.SslCertificate
+ f := func(l *ga.SslCertificateList) error {
+ klog.V(5).Infof("GCESslCertificates.List(%v, ..., %v): page %+v", ctx, fl, l)
+ all = append(all, l.Items...)
+ return nil
+ }
+ if err := call.Pages(ctx, f); err != nil {
+ klog.V(4).Infof("GCESslCertificates.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ return nil, err
+ }
+
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCESslCertificates.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
+ var asStr []string
+ for _, o := range all {
+ asStr = append(asStr, fmt.Sprintf("%+v", o))
+ }
+ klog.V(5).Infof("GCESslCertificates.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ }
+
+ return all, nil
+}
+
+// Insert SslCertificate with key of value obj.
+func (g *GCESslCertificates) Insert(ctx context.Context, key *meta.Key, obj *ga.SslCertificate) error {
+ klog.V(5).Infof("GCESslCertificates.Insert(%v, %v, %+v): called", ctx, key, obj)
+ if !key.Valid() {
+ klog.V(2).Infof("GCESslCertificates.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "SslCertificates")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "Insert",
+ Version: meta.Version("ga"),
+ Service: "SslCertificates",
+ }
+ klog.V(5).Infof("GCESslCertificates.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCESslCertificates.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ return err
+ }
+ obj.Name = key.Name
+ call := g.s.GA.SslCertificates.Insert(projectID, obj)
+ call.Context(ctx)
+
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCESslCertificates.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+ }
+
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCESslCertificates.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ return err
+}
+
+// Delete the SslCertificate referenced by key.
+func (g *GCESslCertificates) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCESslCertificates.Delete(%v, %v): called", ctx, key)
+ if !key.Valid() {
+ klog.V(2).Infof("GCESslCertificates.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "SslCertificates")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "Delete",
+ Version: meta.Version("ga"),
+ Service: "SslCertificates",
+ }
+ klog.V(5).Infof("GCESslCertificates.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCESslCertificates.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ return err
+ }
+ call := g.s.GA.SslCertificates.Delete(projectID, key.Name)
+
+ call.Context(ctx)
+
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCESslCertificates.Delete(%v, %v) = %v", ctx, key, err)
+ return err
+ }
+
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCESslCertificates.Delete(%v, %v) = %v", ctx, key, err)
+ return err
+}
+
+// BetaSslCertificates is an interface that allows for mocking of SslCertificates.
+type BetaSslCertificates interface {
+ Get(ctx context.Context, key *meta.Key) (*beta.SslCertificate, error)
+ List(ctx context.Context, fl *filter.F) ([]*beta.SslCertificate, error)
+ Insert(ctx context.Context, key *meta.Key, obj *beta.SslCertificate) error
+ Delete(ctx context.Context, key *meta.Key) error
+}
+
+// NewMockBetaSslCertificates returns a new mock for SslCertificates.
+func NewMockBetaSslCertificates(pr ProjectRouter, objs map[meta.Key]*MockSslCertificatesObj) *MockBetaSslCertificates {
+ mock := &MockBetaSslCertificates{
+ ProjectRouter: pr,
+
+ Objects: objs,
+ GetError: map[meta.Key]error{},
+ InsertError: map[meta.Key]error{},
+ DeleteError: map[meta.Key]error{},
+ }
+ return mock
+}
+
+// MockBetaSslCertificates is the mock for SslCertificates.
+type MockBetaSslCertificates struct {
+ Lock sync.Mutex
+
+ ProjectRouter ProjectRouter
+
+ // Objects maintained by the mock.
+ Objects map[meta.Key]*MockSslCertificatesObj
+
+ // If an entry exists for the given key and operation, then the error
+ // will be returned instead of the operation.
+ GetError map[meta.Key]error
+ ListError *error
+ InsertError map[meta.Key]error
+ DeleteError map[meta.Key]error
+
+ // xxxHook allow you to intercept the standard processing of the mock in
+ // order to add your own logic. Return (true, _, _) to prevent the normal
+ // execution flow of the mock. Return (false, nil, nil) to continue with
+ // normal mock behavior/ after the hook function executes.
+ GetHook func(ctx context.Context, key *meta.Key, m *MockBetaSslCertificates) (bool, *beta.SslCertificate, error)
+ ListHook func(ctx context.Context, fl *filter.F, m *MockBetaSslCertificates) (bool, []*beta.SslCertificate, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *beta.SslCertificate, m *MockBetaSslCertificates) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaSslCertificates) (bool, error)
+
+ // X is extra state that can be used as part of the mock. Generated code
+ // will not use this field.
+ X interface{}
+}
+
+// Get returns the object from the mock.
+func (m *MockBetaSslCertificates) Get(ctx context.Context, key *meta.Key) (*beta.SslCertificate, error) {
+ if m.GetHook != nil {
+ if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
+ klog.V(5).Infof("MockBetaSslCertificates.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ return obj, err
+ }
+ }
+ if !key.Valid() {
+ return nil, fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+
+ m.Lock.Lock()
+ defer m.Lock.Unlock()
+
+ if err, ok := m.GetError[*key]; ok {
+ klog.V(5).Infof("MockBetaSslCertificates.Get(%v, %s) = nil, %v", ctx, key, err)
+ return nil, err
+ }
+ if obj, ok := m.Objects[*key]; ok {
+ typedObj := obj.ToBeta()
+ klog.V(5).Infof("MockBetaSslCertificates.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ return typedObj, nil
+ }
+
+ err := &googleapi.Error{
+ Code: http.StatusNotFound,
+ Message: fmt.Sprintf("MockBetaSslCertificates %v not found", key),
+ }
+ klog.V(5).Infof("MockBetaSslCertificates.Get(%v, %s) = nil, %v", ctx, key, err)
+ return nil, err
+}
+
+// List all of the objects in the mock.
+func (m *MockBetaSslCertificates) List(ctx context.Context, fl *filter.F) ([]*beta.SslCertificate, error) {
+ if m.ListHook != nil {
+ if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
+ klog.V(5).Infof("MockBetaSslCertificates.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
+ return objs, err
+ }
+ }
+
+ m.Lock.Lock()
+ defer m.Lock.Unlock()
+
+ if m.ListError != nil {
+ err := *m.ListError
+ klog.V(5).Infof("MockBetaSslCertificates.List(%v, %v) = nil, %v", ctx, fl, err)
+
+ return nil, *m.ListError
+ }
+
+ var objs []*beta.SslCertificate
+ for _, obj := range m.Objects {
+ if !fl.Match(obj.ToBeta()) {
+ continue
+ }
+ objs = append(objs, obj.ToBeta())
+ }
+
+ klog.V(5).Infof("MockBetaSslCertificates.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
+ return objs, nil
+}
+
+// Insert is a mock for inserting/creating a new object.
+func (m *MockBetaSslCertificates) Insert(ctx context.Context, key *meta.Key, obj *beta.SslCertificate) error {
+ if m.InsertHook != nil {
+ if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
+ klog.V(5).Infof("MockBetaSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ return err
+ }
+ }
+ if !key.Valid() {
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+
+ m.Lock.Lock()
+ defer m.Lock.Unlock()
+
+ if err, ok := m.InsertError[*key]; ok {
+ klog.V(5).Infof("MockBetaSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ return err
+ }
+ if _, ok := m.Objects[*key]; ok {
+ err := &googleapi.Error{
+ Code: http.StatusConflict,
+ Message: fmt.Sprintf("MockBetaSslCertificates %v exists", key),
+ }
+ klog.V(5).Infof("MockBetaSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ return err
+ }
+
+ obj.Name = key.Name
+ projectID := m.ProjectRouter.ProjectID(ctx, "beta", "sslCertificates")
+ obj.SelfLink = SelfLink(meta.VersionBeta, projectID, "sslCertificates", key)
+
+ m.Objects[*key] = &MockSslCertificatesObj{obj}
+ klog.V(5).Infof("MockBetaSslCertificates.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ return nil
+}
+
+// Delete is a mock for deleting the object.
+func (m *MockBetaSslCertificates) Delete(ctx context.Context, key *meta.Key) error {
+ if m.DeleteHook != nil {
+ if intercept, err := m.DeleteHook(ctx, key, m); intercept {
+ klog.V(5).Infof("MockBetaSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
+ return err
+ }
+ }
+ if !key.Valid() {
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+
+ m.Lock.Lock()
+ defer m.Lock.Unlock()
+
+ if err, ok := m.DeleteError[*key]; ok {
+ klog.V(5).Infof("MockBetaSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
+ return err
+ }
+ if _, ok := m.Objects[*key]; !ok {
+ err := &googleapi.Error{
+ Code: http.StatusNotFound,
+ Message: fmt.Sprintf("MockBetaSslCertificates %v not found", key),
+ }
+ klog.V(5).Infof("MockBetaSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
+ return err
+ }
+
+ delete(m.Objects, *key)
+ klog.V(5).Infof("MockBetaSslCertificates.Delete(%v, %v) = nil", ctx, key)
+ return nil
+}
+
+// Obj wraps the object for use in the mock.
+func (m *MockBetaSslCertificates) Obj(o *beta.SslCertificate) *MockSslCertificatesObj {
+ return &MockSslCertificatesObj{o}
+}
+
+// GCEBetaSslCertificates is a simplifying adapter for the GCE SslCertificates.
+type GCEBetaSslCertificates struct {
+ s *Service
+}
+
+// Get the SslCertificate named by key.
+func (g *GCEBetaSslCertificates) Get(ctx context.Context, key *meta.Key) (*beta.SslCertificate, error) {
+ klog.V(5).Infof("GCEBetaSslCertificates.Get(%v, %v): called", ctx, key)
+
+ if !key.Valid() {
+ klog.V(2).Infof("GCEBetaSslCertificates.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ return nil, fmt.Errorf("invalid GCE key (%#v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "SslCertificates")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "Get",
+ Version: meta.Version("beta"),
+ Service: "SslCertificates",
+ }
+ klog.V(5).Infof("GCEBetaSslCertificates.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCEBetaSslCertificates.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ return nil, err
+ }
+ call := g.s.Beta.SslCertificates.Get(projectID, key.Name)
+ call.Context(ctx)
+ v, err := call.Do()
+ klog.V(4).Infof("GCEBetaSslCertificates.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ return v, err
+}
+
+// List all SslCertificate objects.
+func (g *GCEBetaSslCertificates) List(ctx context.Context, fl *filter.F) ([]*beta.SslCertificate, error) {
+ klog.V(5).Infof("GCEBetaSslCertificates.List(%v, %v) called", ctx, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "SslCertificates")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "List",
+ Version: meta.Version("beta"),
+ Service: "SslCertificates",
+ }
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ return nil, err
+ }
+ klog.V(5).Infof("GCEBetaSslCertificates.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
+ call := g.s.Beta.SslCertificates.List(projectID)
+ if fl != filter.None {
+ call.Filter(fl.String())
+ }
+ var all []*beta.SslCertificate
+ f := func(l *beta.SslCertificateList) error {
+ klog.V(5).Infof("GCEBetaSslCertificates.List(%v, ..., %v): page %+v", ctx, fl, l)
+ all = append(all, l.Items...)
+ return nil
+ }
+ if err := call.Pages(ctx, f); err != nil {
+ klog.V(4).Infof("GCEBetaSslCertificates.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ return nil, err
+ }
+
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEBetaSslCertificates.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
+ var asStr []string
+ for _, o := range all {
+ asStr = append(asStr, fmt.Sprintf("%+v", o))
+ }
+ klog.V(5).Infof("GCEBetaSslCertificates.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ }
+
+ return all, nil
+}
+
+// Insert SslCertificate with key of value obj.
+func (g *GCEBetaSslCertificates) Insert(ctx context.Context, key *meta.Key, obj *beta.SslCertificate) error {
+ klog.V(5).Infof("GCEBetaSslCertificates.Insert(%v, %v, %+v): called", ctx, key, obj)
+ if !key.Valid() {
+ klog.V(2).Infof("GCEBetaSslCertificates.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "SslCertificates")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "Insert",
+ Version: meta.Version("beta"),
+ Service: "SslCertificates",
+ }
+ klog.V(5).Infof("GCEBetaSslCertificates.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCEBetaSslCertificates.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ return err
+ }
+ obj.Name = key.Name
+ call := g.s.Beta.SslCertificates.Insert(projectID, obj)
+ call.Context(ctx)
+
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCEBetaSslCertificates.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+ }
+
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCEBetaSslCertificates.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ return err
+}
+
+// Delete the SslCertificate referenced by key.
+func (g *GCEBetaSslCertificates) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEBetaSslCertificates.Delete(%v, %v): called", ctx, key)
+ if !key.Valid() {
+ klog.V(2).Infof("GCEBetaSslCertificates.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "SslCertificates")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "Delete",
+ Version: meta.Version("beta"),
+ Service: "SslCertificates",
+ }
+ klog.V(5).Infof("GCEBetaSslCertificates.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCEBetaSslCertificates.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ return err
+ }
+ call := g.s.Beta.SslCertificates.Delete(projectID, key.Name)
+
+ call.Context(ctx)
+
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCEBetaSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
+ return err
+ }
+
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCEBetaSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
+ return err
+}
+
+// AlphaSslCertificates is an interface that allows for mocking of SslCertificates.
+type AlphaSslCertificates interface {
+ Get(ctx context.Context, key *meta.Key) (*alpha.SslCertificate, error)
+ List(ctx context.Context, fl *filter.F) ([]*alpha.SslCertificate, error)
+ Insert(ctx context.Context, key *meta.Key, obj *alpha.SslCertificate) error
+ Delete(ctx context.Context, key *meta.Key) error
+}
+
+// NewMockAlphaSslCertificates returns a new mock for SslCertificates.
+func NewMockAlphaSslCertificates(pr ProjectRouter, objs map[meta.Key]*MockSslCertificatesObj) *MockAlphaSslCertificates {
+ mock := &MockAlphaSslCertificates{
ProjectRouter: pr,
Objects: objs,
@@ -17443,14 +20340,14 @@ func NewMockRoutes(pr ProjectRouter, objs map[meta.Key]*MockRoutesObj) *MockRout
return mock
}
-// MockRoutes is the mock for Routes.
-type MockRoutes struct {
+// MockAlphaSslCertificates is the mock for SslCertificates.
+type MockAlphaSslCertificates struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
// Objects maintained by the mock.
- Objects map[meta.Key]*MockRoutesObj
+ Objects map[meta.Key]*MockSslCertificatesObj
// If an entry exists for the given key and operation, then the error
// will be returned instead of the operation.
@@ -17463,10 +20360,10 @@ type MockRoutes struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockRoutes) (bool, *ga.Route, error)
- ListHook func(ctx context.Context, fl *filter.F, m *MockRoutes) (bool, []*ga.Route, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *ga.Route, m *MockRoutes) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockRoutes) (bool, error)
+ GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaSslCertificates) (bool, *alpha.SslCertificate, error)
+ ListHook func(ctx context.Context, fl *filter.F, m *MockAlphaSslCertificates) (bool, []*alpha.SslCertificate, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *alpha.SslCertificate, m *MockAlphaSslCertificates) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaSslCertificates) (bool, error)
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -17474,10 +20371,10 @@ type MockRoutes struct {
}
// Get returns the object from the mock.
-func (m *MockRoutes) Get(ctx context.Context, key *meta.Key) (*ga.Route, error) {
+func (m *MockAlphaSslCertificates) Get(ctx context.Context, key *meta.Key) (*alpha.SslCertificate, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockRoutes.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaSslCertificates.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -17489,28 +20386,28 @@ func (m *MockRoutes) Get(ctx context.Context, key *meta.Key) (*ga.Route, error)
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockRoutes.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaSslCertificates.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
- typedObj := obj.ToGA()
- klog.V(5).Infof("MockRoutes.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ typedObj := obj.ToAlpha()
+ klog.V(5).Infof("MockAlphaSslCertificates.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockRoutes %v not found", key),
+ Message: fmt.Sprintf("MockAlphaSslCertificates %v not found", key),
}
- klog.V(5).Infof("MockRoutes.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaSslCertificates.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
// List all of the objects in the mock.
-func (m *MockRoutes) List(ctx context.Context, fl *filter.F) ([]*ga.Route, error) {
+func (m *MockAlphaSslCertificates) List(ctx context.Context, fl *filter.F) ([]*alpha.SslCertificate, error) {
if m.ListHook != nil {
if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
- klog.V(5).Infof("MockRoutes.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
+ klog.V(5).Infof("MockAlphaSslCertificates.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
return objs, err
}
}
@@ -17520,28 +20417,28 @@ func (m *MockRoutes) List(ctx context.Context, fl *filter.F) ([]*ga.Route, error
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockRoutes.List(%v, %v) = nil, %v", ctx, fl, err)
+ klog.V(5).Infof("MockAlphaSslCertificates.List(%v, %v) = nil, %v", ctx, fl, err)
return nil, *m.ListError
}
- var objs []*ga.Route
+ var objs []*alpha.SslCertificate
for _, obj := range m.Objects {
- if !fl.Match(obj.ToGA()) {
+ if !fl.Match(obj.ToAlpha()) {
continue
}
- objs = append(objs, obj.ToGA())
+ objs = append(objs, obj.ToAlpha())
}
- klog.V(5).Infof("MockRoutes.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
+ klog.V(5).Infof("MockAlphaSslCertificates.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockRoutes) Insert(ctx context.Context, key *meta.Key, obj *ga.Route) error {
+func (m *MockAlphaSslCertificates) Insert(ctx context.Context, key *meta.Key, obj *alpha.SslCertificate) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockRoutes.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -17553,32 +20450,32 @@ func (m *MockRoutes) Insert(ctx context.Context, key *meta.Key, obj *ga.Route) e
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockRoutes.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockRoutes %v exists", key),
+ Message: fmt.Sprintf("MockAlphaSslCertificates %v exists", key),
}
- klog.V(5).Infof("MockRoutes.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "ga", "routes")
- obj.SelfLink = SelfLink(meta.VersionGA, projectID, "routes", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "sslCertificates")
+ obj.SelfLink = SelfLink(meta.VersionAlpha, projectID, "sslCertificates", key)
- m.Objects[*key] = &MockRoutesObj{obj}
- klog.V(5).Infof("MockRoutes.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ m.Objects[*key] = &MockSslCertificatesObj{obj}
+ klog.V(5).Infof("MockAlphaSslCertificates.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockRoutes) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockAlphaSslCertificates) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockRoutes.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -17590,186 +20487,181 @@ func (m *MockRoutes) Delete(ctx context.Context, key *meta.Key) error {
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockRoutes.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockRoutes %v not found", key),
+ Message: fmt.Sprintf("MockAlphaSslCertificates %v not found", key),
}
- klog.V(5).Infof("MockRoutes.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockRoutes.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockAlphaSslCertificates.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockRoutes) Obj(o *ga.Route) *MockRoutesObj {
- return &MockRoutesObj{o}
+func (m *MockAlphaSslCertificates) Obj(o *alpha.SslCertificate) *MockSslCertificatesObj {
+ return &MockSslCertificatesObj{o}
}
-// GCERoutes is a simplifying adapter for the GCE Routes.
-type GCERoutes struct {
+// GCEAlphaSslCertificates is a simplifying adapter for the GCE SslCertificates.
+type GCEAlphaSslCertificates struct {
s *Service
}
-// Get the Route named by key.
-func (g *GCERoutes) Get(ctx context.Context, key *meta.Key) (*ga.Route, error) {
- klog.V(5).Infof("GCERoutes.Get(%v, %v): called", ctx, key)
+// Get the SslCertificate named by key.
+func (g *GCEAlphaSslCertificates) Get(ctx context.Context, key *meta.Key) (*alpha.SslCertificate, error) {
+ klog.V(5).Infof("GCEAlphaSslCertificates.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCERoutes.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaSslCertificates.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Routes")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "SslCertificates")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
- Version: meta.Version("ga"),
- Service: "Routes",
+ Version: meta.Version("alpha"),
+ Service: "SslCertificates",
}
- klog.V(5).Infof("GCERoutes.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaSslCertificates.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCERoutes.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaSslCertificates.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.GA.Routes.Get(projectID, key.Name)
+ call := g.s.Alpha.SslCertificates.Get(projectID, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCERoutes.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEAlphaSslCertificates.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
-// List all Route objects.
-func (g *GCERoutes) List(ctx context.Context, fl *filter.F) ([]*ga.Route, error) {
- klog.V(5).Infof("GCERoutes.List(%v, %v) called", ctx, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Routes")
+// List all SslCertificate objects.
+func (g *GCEAlphaSslCertificates) List(ctx context.Context, fl *filter.F) ([]*alpha.SslCertificate, error) {
+ klog.V(5).Infof("GCEAlphaSslCertificates.List(%v, %v) called", ctx, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "SslCertificates")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
- Version: meta.Version("ga"),
- Service: "Routes",
+ Version: meta.Version("alpha"),
+ Service: "SslCertificates",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCERoutes.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
- call := g.s.GA.Routes.List(projectID)
+ klog.V(5).Infof("GCEAlphaSslCertificates.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
+ call := g.s.Alpha.SslCertificates.List(projectID)
if fl != filter.None {
call.Filter(fl.String())
}
- var all []*ga.Route
- f := func(l *ga.RouteList) error {
- klog.V(5).Infof("GCERoutes.List(%v, ..., %v): page %+v", ctx, fl, l)
+ var all []*alpha.SslCertificate
+ f := func(l *alpha.SslCertificateList) error {
+ klog.V(5).Infof("GCEAlphaSslCertificates.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCERoutes.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEAlphaSslCertificates.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCERoutes.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEAlphaSslCertificates.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCERoutes.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEAlphaSslCertificates.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
-// Insert Route with key of value obj.
-func (g *GCERoutes) Insert(ctx context.Context, key *meta.Key, obj *ga.Route) error {
- klog.V(5).Infof("GCERoutes.Insert(%v, %v, %+v): called", ctx, key, obj)
+// Insert SslCertificate with key of value obj.
+func (g *GCEAlphaSslCertificates) Insert(ctx context.Context, key *meta.Key, obj *alpha.SslCertificate) error {
+ klog.V(5).Infof("GCEAlphaSslCertificates.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCERoutes.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaSslCertificates.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Routes")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "SslCertificates")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
- Version: meta.Version("ga"),
- Service: "Routes",
+ Version: meta.Version("alpha"),
+ Service: "SslCertificates",
}
- klog.V(5).Infof("GCERoutes.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaSslCertificates.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCERoutes.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaSslCertificates.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.GA.Routes.Insert(projectID, obj)
+ call := g.s.Alpha.SslCertificates.Insert(projectID, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCERoutes.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaSslCertificates.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCERoutes.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCEAlphaSslCertificates.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
-// Delete the Route referenced by key.
-func (g *GCERoutes) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCERoutes.Delete(%v, %v): called", ctx, key)
+// Delete the SslCertificate referenced by key.
+func (g *GCEAlphaSslCertificates) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEAlphaSslCertificates.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCERoutes.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaSslCertificates.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Routes")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "SslCertificates")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
- Version: meta.Version("ga"),
- Service: "Routes",
+ Version: meta.Version("alpha"),
+ Service: "SslCertificates",
}
- klog.V(5).Infof("GCERoutes.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaSslCertificates.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCERoutes.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaSslCertificates.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.GA.Routes.Delete(projectID, key.Name)
+ call := g.s.Alpha.SslCertificates.Delete(projectID, key.Name)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCERoutes.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCERoutes.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// BetaSecurityPolicies is an interface that allows for mocking of SecurityPolicies.
-type BetaSecurityPolicies interface {
- Get(ctx context.Context, key *meta.Key) (*beta.SecurityPolicy, error)
- List(ctx context.Context, fl *filter.F) ([]*beta.SecurityPolicy, error)
- Insert(ctx context.Context, key *meta.Key, obj *beta.SecurityPolicy) error
+// AlphaRegionSslCertificates is an interface that allows for mocking of RegionSslCertificates.
+type AlphaRegionSslCertificates interface {
+ Get(ctx context.Context, key *meta.Key) (*alpha.SslCertificate, error)
+ List(ctx context.Context, region string, fl *filter.F) ([]*alpha.SslCertificate, error)
+ Insert(ctx context.Context, key *meta.Key, obj *alpha.SslCertificate) error
Delete(ctx context.Context, key *meta.Key) error
- AddRule(context.Context, *meta.Key, *beta.SecurityPolicyRule) error
- GetRule(context.Context, *meta.Key) (*beta.SecurityPolicyRule, error)
- Patch(context.Context, *meta.Key, *beta.SecurityPolicy) error
- PatchRule(context.Context, *meta.Key, *beta.SecurityPolicyRule) error
- RemoveRule(context.Context, *meta.Key) error
}
-// NewMockBetaSecurityPolicies returns a new mock for SecurityPolicies.
-func NewMockBetaSecurityPolicies(pr ProjectRouter, objs map[meta.Key]*MockSecurityPoliciesObj) *MockBetaSecurityPolicies {
- mock := &MockBetaSecurityPolicies{
+// NewMockAlphaRegionSslCertificates returns a new mock for RegionSslCertificates.
+func NewMockAlphaRegionSslCertificates(pr ProjectRouter, objs map[meta.Key]*MockRegionSslCertificatesObj) *MockAlphaRegionSslCertificates {
+ mock := &MockAlphaRegionSslCertificates{
ProjectRouter: pr,
Objects: objs,
@@ -17780,14 +20672,14 @@ func NewMockBetaSecurityPolicies(pr ProjectRouter, objs map[meta.Key]*MockSecuri
return mock
}
-// MockBetaSecurityPolicies is the mock for SecurityPolicies.
-type MockBetaSecurityPolicies struct {
+// MockAlphaRegionSslCertificates is the mock for RegionSslCertificates.
+type MockAlphaRegionSslCertificates struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
// Objects maintained by the mock.
- Objects map[meta.Key]*MockSecurityPoliciesObj
+ Objects map[meta.Key]*MockRegionSslCertificatesObj
// If an entry exists for the given key and operation, then the error
// will be returned instead of the operation.
@@ -17800,15 +20692,10 @@ type MockBetaSecurityPolicies struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockBetaSecurityPolicies) (bool, *beta.SecurityPolicy, error)
- ListHook func(ctx context.Context, fl *filter.F, m *MockBetaSecurityPolicies) (bool, []*beta.SecurityPolicy, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *beta.SecurityPolicy, m *MockBetaSecurityPolicies) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaSecurityPolicies) (bool, error)
- AddRuleHook func(context.Context, *meta.Key, *beta.SecurityPolicyRule, *MockBetaSecurityPolicies) error
- GetRuleHook func(context.Context, *meta.Key, *MockBetaSecurityPolicies) (*beta.SecurityPolicyRule, error)
- PatchHook func(context.Context, *meta.Key, *beta.SecurityPolicy, *MockBetaSecurityPolicies) error
- PatchRuleHook func(context.Context, *meta.Key, *beta.SecurityPolicyRule, *MockBetaSecurityPolicies) error
- RemoveRuleHook func(context.Context, *meta.Key, *MockBetaSecurityPolicies) error
+ GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaRegionSslCertificates) (bool, *alpha.SslCertificate, error)
+ ListHook func(ctx context.Context, region string, fl *filter.F, m *MockAlphaRegionSslCertificates) (bool, []*alpha.SslCertificate, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *alpha.SslCertificate, m *MockAlphaRegionSslCertificates) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaRegionSslCertificates) (bool, error)
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -17816,10 +20703,10 @@ type MockBetaSecurityPolicies struct {
}
// Get returns the object from the mock.
-func (m *MockBetaSecurityPolicies) Get(ctx context.Context, key *meta.Key) (*beta.SecurityPolicy, error) {
+func (m *MockAlphaRegionSslCertificates) Get(ctx context.Context, key *meta.Key) (*alpha.SslCertificate, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockBetaSecurityPolicies.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaRegionSslCertificates.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -17831,28 +20718,28 @@ func (m *MockBetaSecurityPolicies) Get(ctx context.Context, key *meta.Key) (*bet
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockBetaSecurityPolicies.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaRegionSslCertificates.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
- typedObj := obj.ToBeta()
- klog.V(5).Infof("MockBetaSecurityPolicies.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ typedObj := obj.ToAlpha()
+ klog.V(5).Infof("MockAlphaRegionSslCertificates.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockBetaSecurityPolicies %v not found", key),
+ Message: fmt.Sprintf("MockAlphaRegionSslCertificates %v not found", key),
}
- klog.V(5).Infof("MockBetaSecurityPolicies.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaRegionSslCertificates.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
-// List all of the objects in the mock.
-func (m *MockBetaSecurityPolicies) List(ctx context.Context, fl *filter.F) ([]*beta.SecurityPolicy, error) {
+// List all of the objects in the mock in the given region.
+func (m *MockAlphaRegionSslCertificates) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.SslCertificate, error) {
if m.ListHook != nil {
- if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
- klog.V(5).Infof("MockBetaSecurityPolicies.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
+ if intercept, objs, err := m.ListHook(ctx, region, fl, m); intercept {
+ klog.V(5).Infof("MockAlphaRegionSslCertificates.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err)
return objs, err
}
}
@@ -17862,28 +20749,31 @@ func (m *MockBetaSecurityPolicies) List(ctx context.Context, fl *filter.F) ([]*b
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockBetaSecurityPolicies.List(%v, %v) = nil, %v", ctx, fl, err)
+ klog.V(5).Infof("MockAlphaRegionSslCertificates.List(%v, %q, %v) = nil, %v", ctx, region, fl, err)
return nil, *m.ListError
- }
-
- var objs []*beta.SecurityPolicy
- for _, obj := range m.Objects {
- if !fl.Match(obj.ToBeta()) {
+ }
+
+ var objs []*alpha.SslCertificate
+ for key, obj := range m.Objects {
+ if key.Region != region {
continue
}
- objs = append(objs, obj.ToBeta())
+ if !fl.Match(obj.ToAlpha()) {
+ continue
+ }
+ objs = append(objs, obj.ToAlpha())
}
- klog.V(5).Infof("MockBetaSecurityPolicies.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
+ klog.V(5).Infof("MockAlphaRegionSslCertificates.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockBetaSecurityPolicies) Insert(ctx context.Context, key *meta.Key, obj *beta.SecurityPolicy) error {
+func (m *MockAlphaRegionSslCertificates) Insert(ctx context.Context, key *meta.Key, obj *alpha.SslCertificate) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockBetaSecurityPolicies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaRegionSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -17895,32 +20785,32 @@ func (m *MockBetaSecurityPolicies) Insert(ctx context.Context, key *meta.Key, ob
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockBetaSecurityPolicies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaRegionSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockBetaSecurityPolicies %v exists", key),
+ Message: fmt.Sprintf("MockAlphaRegionSslCertificates %v exists", key),
}
- klog.V(5).Infof("MockBetaSecurityPolicies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaRegionSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "beta", "securityPolicies")
- obj.SelfLink = SelfLink(meta.VersionBeta, projectID, "securityPolicies", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "sslCertificates")
+ obj.SelfLink = SelfLink(meta.VersionAlpha, projectID, "sslCertificates", key)
- m.Objects[*key] = &MockSecurityPoliciesObj{obj}
- klog.V(5).Infof("MockBetaSecurityPolicies.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ m.Objects[*key] = &MockRegionSslCertificatesObj{obj}
+ klog.V(5).Infof("MockAlphaRegionSslCertificates.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockBetaSecurityPolicies) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockAlphaRegionSslCertificates) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockBetaSecurityPolicies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaRegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -17932,381 +20822,514 @@ func (m *MockBetaSecurityPolicies) Delete(ctx context.Context, key *meta.Key) er
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockBetaSecurityPolicies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaRegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockBetaSecurityPolicies %v not found", key),
+ Message: fmt.Sprintf("MockAlphaRegionSslCertificates %v not found", key),
}
- klog.V(5).Infof("MockBetaSecurityPolicies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaRegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockBetaSecurityPolicies.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockAlphaRegionSslCertificates.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockBetaSecurityPolicies) Obj(o *beta.SecurityPolicy) *MockSecurityPoliciesObj {
- return &MockSecurityPoliciesObj{o}
+func (m *MockAlphaRegionSslCertificates) Obj(o *alpha.SslCertificate) *MockRegionSslCertificatesObj {
+ return &MockRegionSslCertificatesObj{o}
}
-// AddRule is a mock for the corresponding method.
-func (m *MockBetaSecurityPolicies) AddRule(ctx context.Context, key *meta.Key, arg0 *beta.SecurityPolicyRule) error {
- if m.AddRuleHook != nil {
- return m.AddRuleHook(ctx, key, arg0, m)
- }
- return nil
+// GCEAlphaRegionSslCertificates is a simplifying adapter for the GCE RegionSslCertificates.
+type GCEAlphaRegionSslCertificates struct {
+ s *Service
}
-// GetRule is a mock for the corresponding method.
-func (m *MockBetaSecurityPolicies) GetRule(ctx context.Context, key *meta.Key) (*beta.SecurityPolicyRule, error) {
- if m.GetRuleHook != nil {
- return m.GetRuleHook(ctx, key, m)
+// Get the SslCertificate named by key.
+func (g *GCEAlphaRegionSslCertificates) Get(ctx context.Context, key *meta.Key) (*alpha.SslCertificate, error) {
+ klog.V(5).Infof("GCEAlphaRegionSslCertificates.Get(%v, %v): called", ctx, key)
+
+ if !key.Valid() {
+ klog.V(2).Infof("GCEAlphaRegionSslCertificates.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- return nil, fmt.Errorf("GetRuleHook must be set")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionSslCertificates")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "Get",
+ Version: meta.Version("alpha"),
+ Service: "RegionSslCertificates",
+ }
+ klog.V(5).Infof("GCEAlphaRegionSslCertificates.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCEAlphaRegionSslCertificates.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ return nil, err
+ }
+ call := g.s.Alpha.RegionSslCertificates.Get(projectID, key.Region, key.Name)
+ call.Context(ctx)
+ v, err := call.Do()
+ klog.V(4).Infof("GCEAlphaRegionSslCertificates.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ return v, err
}
-// Patch is a mock for the corresponding method.
-func (m *MockBetaSecurityPolicies) Patch(ctx context.Context, key *meta.Key, arg0 *beta.SecurityPolicy) error {
- if m.PatchHook != nil {
- return m.PatchHook(ctx, key, arg0, m)
+// List all SslCertificate objects.
+func (g *GCEAlphaRegionSslCertificates) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.SslCertificate, error) {
+ klog.V(5).Infof("GCEAlphaRegionSslCertificates.List(%v, %v, %v) called", ctx, region, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionSslCertificates")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "List",
+ Version: meta.Version("alpha"),
+ Service: "RegionSslCertificates",
+ }
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ return nil, err
+ }
+ klog.V(5).Infof("GCEAlphaRegionSslCertificates.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk)
+ call := g.s.Alpha.RegionSslCertificates.List(projectID, region)
+ if fl != filter.None {
+ call.Filter(fl.String())
+ }
+ var all []*alpha.SslCertificate
+ f := func(l *alpha.SslCertificateList) error {
+ klog.V(5).Infof("GCEAlphaRegionSslCertificates.List(%v, ..., %v): page %+v", ctx, fl, l)
+ all = append(all, l.Items...)
+ return nil
+ }
+ if err := call.Pages(ctx, f); err != nil {
+ klog.V(4).Infof("GCEAlphaRegionSslCertificates.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ return nil, err
}
- return nil
-}
-// PatchRule is a mock for the corresponding method.
-func (m *MockBetaSecurityPolicies) PatchRule(ctx context.Context, key *meta.Key, arg0 *beta.SecurityPolicyRule) error {
- if m.PatchRuleHook != nil {
- return m.PatchRuleHook(ctx, key, arg0, m)
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEAlphaRegionSslCertificates.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
+ var asStr []string
+ for _, o := range all {
+ asStr = append(asStr, fmt.Sprintf("%+v", o))
+ }
+ klog.V(5).Infof("GCEAlphaRegionSslCertificates.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
- return nil
+
+ return all, nil
}
-// RemoveRule is a mock for the corresponding method.
-func (m *MockBetaSecurityPolicies) RemoveRule(ctx context.Context, key *meta.Key) error {
- if m.RemoveRuleHook != nil {
- return m.RemoveRuleHook(ctx, key, m)
+// Insert SslCertificate with key of value obj.
+func (g *GCEAlphaRegionSslCertificates) Insert(ctx context.Context, key *meta.Key, obj *alpha.SslCertificate) error {
+ klog.V(5).Infof("GCEAlphaRegionSslCertificates.Insert(%v, %v, %+v): called", ctx, key, obj)
+ if !key.Valid() {
+ klog.V(2).Infof("GCEAlphaRegionSslCertificates.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
}
- return nil
-}
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionSslCertificates")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "Insert",
+ Version: meta.Version("alpha"),
+ Service: "RegionSslCertificates",
+ }
+ klog.V(5).Infof("GCEAlphaRegionSslCertificates.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCEAlphaRegionSslCertificates.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ return err
+ }
+ obj.Name = key.Name
+ call := g.s.Alpha.RegionSslCertificates.Insert(projectID, key.Region, obj)
+ call.Context(ctx)
-// GCEBetaSecurityPolicies is a simplifying adapter for the GCE SecurityPolicies.
-type GCEBetaSecurityPolicies struct {
- s *Service
-}
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCEAlphaRegionSslCertificates.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+ }
-// Get the SecurityPolicy named by key.
-func (g *GCEBetaSecurityPolicies) Get(ctx context.Context, key *meta.Key) (*beta.SecurityPolicy, error) {
- klog.V(5).Infof("GCEBetaSecurityPolicies.Get(%v, %v): called", ctx, key)
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCEAlphaRegionSslCertificates.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ return err
+}
+// Delete the SslCertificate referenced by key.
+func (g *GCEAlphaRegionSslCertificates) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEAlphaRegionSslCertificates.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaSecurityPolicies.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
- return nil, fmt.Errorf("invalid GCE key (%#v)", key)
+ klog.V(2).Infof("GCEAlphaRegionSslCertificates.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "SecurityPolicies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionSslCertificates")
rk := &RateLimitKey{
ProjectID: projectID,
- Operation: "Get",
- Version: meta.Version("beta"),
- Service: "SecurityPolicies",
+ Operation: "Delete",
+ Version: meta.Version("alpha"),
+ Service: "RegionSslCertificates",
}
- klog.V(5).Infof("GCEBetaSecurityPolicies.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaRegionSslCertificates.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaSecurityPolicies.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
- return nil, err
+ klog.V(4).Infof("GCEAlphaRegionSslCertificates.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ return err
}
- call := g.s.Beta.SecurityPolicies.Get(projectID, key.Name)
+ call := g.s.Alpha.RegionSslCertificates.Delete(projectID, key.Region, key.Name)
call.Context(ctx)
- v, err := call.Do()
- klog.V(4).Infof("GCEBetaSecurityPolicies.Get(%v, %v) = %+v, %v", ctx, key, v, err)
- return v, err
+
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCEAlphaRegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
+ return err
+ }
+
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCEAlphaRegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
+ return err
+}
+
+// BetaRegionSslCertificates is an interface that allows for mocking of RegionSslCertificates.
+type BetaRegionSslCertificates interface {
+ Get(ctx context.Context, key *meta.Key) (*beta.SslCertificate, error)
+ List(ctx context.Context, region string, fl *filter.F) ([]*beta.SslCertificate, error)
+ Insert(ctx context.Context, key *meta.Key, obj *beta.SslCertificate) error
+ Delete(ctx context.Context, key *meta.Key) error
+}
+
+// NewMockBetaRegionSslCertificates returns a new mock for RegionSslCertificates.
+func NewMockBetaRegionSslCertificates(pr ProjectRouter, objs map[meta.Key]*MockRegionSslCertificatesObj) *MockBetaRegionSslCertificates {
+ mock := &MockBetaRegionSslCertificates{
+ ProjectRouter: pr,
+
+ Objects: objs,
+ GetError: map[meta.Key]error{},
+ InsertError: map[meta.Key]error{},
+ DeleteError: map[meta.Key]error{},
+ }
+ return mock
+}
+
+// MockBetaRegionSslCertificates is the mock for RegionSslCertificates.
+type MockBetaRegionSslCertificates struct {
+ Lock sync.Mutex
+
+ ProjectRouter ProjectRouter
+
+ // Objects maintained by the mock.
+ Objects map[meta.Key]*MockRegionSslCertificatesObj
+
+ // If an entry exists for the given key and operation, then the error
+ // will be returned instead of the operation.
+ GetError map[meta.Key]error
+ ListError *error
+ InsertError map[meta.Key]error
+ DeleteError map[meta.Key]error
+
+ // xxxHook allow you to intercept the standard processing of the mock in
+ // order to add your own logic. Return (true, _, _) to prevent the normal
+ // execution flow of the mock. Return (false, nil, nil) to continue with
+ // normal mock behavior/ after the hook function executes.
+ GetHook func(ctx context.Context, key *meta.Key, m *MockBetaRegionSslCertificates) (bool, *beta.SslCertificate, error)
+ ListHook func(ctx context.Context, region string, fl *filter.F, m *MockBetaRegionSslCertificates) (bool, []*beta.SslCertificate, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *beta.SslCertificate, m *MockBetaRegionSslCertificates) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaRegionSslCertificates) (bool, error)
+
+ // X is extra state that can be used as part of the mock. Generated code
+ // will not use this field.
+ X interface{}
}
-// List all SecurityPolicy objects.
-func (g *GCEBetaSecurityPolicies) List(ctx context.Context, fl *filter.F) ([]*beta.SecurityPolicy, error) {
- klog.V(5).Infof("GCEBetaSecurityPolicies.List(%v, %v) called", ctx, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "SecurityPolicies")
- rk := &RateLimitKey{
- ProjectID: projectID,
- Operation: "List",
- Version: meta.Version("beta"),
- Service: "SecurityPolicies",
+// Get returns the object from the mock.
+func (m *MockBetaRegionSslCertificates) Get(ctx context.Context, key *meta.Key) (*beta.SslCertificate, error) {
+ if m.GetHook != nil {
+ if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
+ klog.V(5).Infof("MockBetaRegionSslCertificates.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ return obj, err
+ }
}
- if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- return nil, err
+ if !key.Valid() {
+ return nil, fmt.Errorf("invalid GCE key (%+v)", key)
}
- klog.V(5).Infof("GCEBetaSecurityPolicies.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
- call := g.s.Beta.SecurityPolicies.List(projectID)
- if fl != filter.None {
- call.Filter(fl.String())
+
+ m.Lock.Lock()
+ defer m.Lock.Unlock()
+
+ if err, ok := m.GetError[*key]; ok {
+ klog.V(5).Infof("MockBetaRegionSslCertificates.Get(%v, %s) = nil, %v", ctx, key, err)
+ return nil, err
}
- var all []*beta.SecurityPolicy
- f := func(l *beta.SecurityPolicyList) error {
- klog.V(5).Infof("GCEBetaSecurityPolicies.List(%v, ..., %v): page %+v", ctx, fl, l)
- all = append(all, l.Items...)
- return nil
+ if obj, ok := m.Objects[*key]; ok {
+ typedObj := obj.ToBeta()
+ klog.V(5).Infof("MockBetaRegionSslCertificates.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ return typedObj, nil
}
- if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEBetaSecurityPolicies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
- return nil, err
+
+ err := &googleapi.Error{
+ Code: http.StatusNotFound,
+ Message: fmt.Sprintf("MockBetaRegionSslCertificates %v not found", key),
}
+ klog.V(5).Infof("MockBetaRegionSslCertificates.Get(%v, %s) = nil, %v", ctx, key, err)
+ return nil, err
+}
- if klog.V(4) {
- klog.V(4).Infof("GCEBetaSecurityPolicies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
- var asStr []string
- for _, o := range all {
- asStr = append(asStr, fmt.Sprintf("%+v", o))
+// List all of the objects in the mock in the given region.
+func (m *MockBetaRegionSslCertificates) List(ctx context.Context, region string, fl *filter.F) ([]*beta.SslCertificate, error) {
+ if m.ListHook != nil {
+ if intercept, objs, err := m.ListHook(ctx, region, fl, m); intercept {
+ klog.V(5).Infof("MockBetaRegionSslCertificates.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err)
+ return objs, err
}
- klog.V(5).Infof("GCEBetaSecurityPolicies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
- return all, nil
-}
+ m.Lock.Lock()
+ defer m.Lock.Unlock()
-// Insert SecurityPolicy with key of value obj.
-func (g *GCEBetaSecurityPolicies) Insert(ctx context.Context, key *meta.Key, obj *beta.SecurityPolicy) error {
- klog.V(5).Infof("GCEBetaSecurityPolicies.Insert(%v, %v, %+v): called", ctx, key, obj)
- if !key.Valid() {
- klog.V(2).Infof("GCEBetaSecurityPolicies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
- return fmt.Errorf("invalid GCE key (%+v)", key)
- }
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "SecurityPolicies")
- rk := &RateLimitKey{
- ProjectID: projectID,
- Operation: "Insert",
- Version: meta.Version("beta"),
- Service: "SecurityPolicies",
- }
- klog.V(5).Infof("GCEBetaSecurityPolicies.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
- if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaSecurityPolicies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
- return err
+ if m.ListError != nil {
+ err := *m.ListError
+ klog.V(5).Infof("MockBetaRegionSslCertificates.List(%v, %q, %v) = nil, %v", ctx, region, fl, err)
+
+ return nil, *m.ListError
}
- obj.Name = key.Name
- call := g.s.Beta.SecurityPolicies.Insert(projectID, obj)
- call.Context(ctx)
- op, err := call.Do()
- if err != nil {
- klog.V(4).Infof("GCEBetaSecurityPolicies.Insert(%v, %v, ...) = %+v", ctx, key, err)
- return err
+ var objs []*beta.SslCertificate
+ for key, obj := range m.Objects {
+ if key.Region != region {
+ continue
+ }
+ if !fl.Match(obj.ToBeta()) {
+ continue
+ }
+ objs = append(objs, obj.ToBeta())
}
- err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaSecurityPolicies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
- return err
+ klog.V(5).Infof("MockBetaRegionSslCertificates.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs))
+ return objs, nil
}
-// Delete the SecurityPolicy referenced by key.
-func (g *GCEBetaSecurityPolicies) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEBetaSecurityPolicies.Delete(%v, %v): called", ctx, key)
+// Insert is a mock for inserting/creating a new object.
+func (m *MockBetaRegionSslCertificates) Insert(ctx context.Context, key *meta.Key, obj *beta.SslCertificate) error {
+ if m.InsertHook != nil {
+ if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
+ klog.V(5).Infof("MockBetaRegionSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ return err
+ }
+ }
if !key.Valid() {
- klog.V(2).Infof("GCEBetaSecurityPolicies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "SecurityPolicies")
- rk := &RateLimitKey{
- ProjectID: projectID,
- Operation: "Delete",
- Version: meta.Version("beta"),
- Service: "SecurityPolicies",
- }
- klog.V(5).Infof("GCEBetaSecurityPolicies.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
- if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaSecurityPolicies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
- return err
- }
- call := g.s.Beta.SecurityPolicies.Delete(projectID, key.Name)
- call.Context(ctx)
+ m.Lock.Lock()
+ defer m.Lock.Unlock()
- op, err := call.Do()
- if err != nil {
- klog.V(4).Infof("GCEBetaSecurityPolicies.Delete(%v, %v) = %v", ctx, key, err)
+ if err, ok := m.InsertError[*key]; ok {
+ klog.V(5).Infof("MockBetaRegionSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ return err
+ }
+ if _, ok := m.Objects[*key]; ok {
+ err := &googleapi.Error{
+ Code: http.StatusConflict,
+ Message: fmt.Sprintf("MockBetaRegionSslCertificates %v exists", key),
+ }
+ klog.V(5).Infof("MockBetaRegionSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
- err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaSecurityPolicies.Delete(%v, %v) = %v", ctx, key, err)
- return err
-}
+ obj.Name = key.Name
+ projectID := m.ProjectRouter.ProjectID(ctx, "beta", "sslCertificates")
+ obj.SelfLink = SelfLink(meta.VersionBeta, projectID, "sslCertificates", key)
-// AddRule is a method on GCEBetaSecurityPolicies.
-func (g *GCEBetaSecurityPolicies) AddRule(ctx context.Context, key *meta.Key, arg0 *beta.SecurityPolicyRule) error {
- klog.V(5).Infof("GCEBetaSecurityPolicies.AddRule(%v, %v, ...): called", ctx, key)
+ m.Objects[*key] = &MockRegionSslCertificatesObj{obj}
+ klog.V(5).Infof("MockBetaRegionSslCertificates.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ return nil
+}
+// Delete is a mock for deleting the object.
+func (m *MockBetaRegionSslCertificates) Delete(ctx context.Context, key *meta.Key) error {
+ if m.DeleteHook != nil {
+ if intercept, err := m.DeleteHook(ctx, key, m); intercept {
+ klog.V(5).Infof("MockBetaRegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
+ return err
+ }
+ }
if !key.Valid() {
- klog.V(2).Infof("GCEBetaSecurityPolicies.AddRule(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "SecurityPolicies")
- rk := &RateLimitKey{
- ProjectID: projectID,
- Operation: "AddRule",
- Version: meta.Version("beta"),
- Service: "SecurityPolicies",
- }
- klog.V(5).Infof("GCEBetaSecurityPolicies.AddRule(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
- if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaSecurityPolicies.AddRule(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ m.Lock.Lock()
+ defer m.Lock.Unlock()
+
+ if err, ok := m.DeleteError[*key]; ok {
+ klog.V(5).Infof("MockBetaRegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
return err
}
- call := g.s.Beta.SecurityPolicies.AddRule(projectID, key.Name, arg0)
- call.Context(ctx)
- op, err := call.Do()
- if err != nil {
- klog.V(4).Infof("GCEBetaSecurityPolicies.AddRule(%v, %v, ...) = %+v", ctx, key, err)
+ if _, ok := m.Objects[*key]; !ok {
+ err := &googleapi.Error{
+ Code: http.StatusNotFound,
+ Message: fmt.Sprintf("MockBetaRegionSslCertificates %v not found", key),
+ }
+ klog.V(5).Infof("MockBetaRegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
return err
}
- err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaSecurityPolicies.AddRule(%v, %v, ...) = %+v", ctx, key, err)
- return err
+
+ delete(m.Objects, *key)
+ klog.V(5).Infof("MockBetaRegionSslCertificates.Delete(%v, %v) = nil", ctx, key)
+ return nil
}
-// GetRule is a method on GCEBetaSecurityPolicies.
-func (g *GCEBetaSecurityPolicies) GetRule(ctx context.Context, key *meta.Key) (*beta.SecurityPolicyRule, error) {
- klog.V(5).Infof("GCEBetaSecurityPolicies.GetRule(%v, %v, ...): called", ctx, key)
+// Obj wraps the object for use in the mock.
+func (m *MockBetaRegionSslCertificates) Obj(o *beta.SslCertificate) *MockRegionSslCertificatesObj {
+ return &MockRegionSslCertificatesObj{o}
+}
+
+// GCEBetaRegionSslCertificates is a simplifying adapter for the GCE RegionSslCertificates.
+type GCEBetaRegionSslCertificates struct {
+ s *Service
+}
+
+// Get the SslCertificate named by key.
+func (g *GCEBetaRegionSslCertificates) Get(ctx context.Context, key *meta.Key) (*beta.SslCertificate, error) {
+ klog.V(5).Infof("GCEBetaRegionSslCertificates.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaSecurityPolicies.GetRule(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
- return nil, fmt.Errorf("invalid GCE key (%+v)", key)
+ klog.V(2).Infof("GCEBetaRegionSslCertificates.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "SecurityPolicies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionSslCertificates")
rk := &RateLimitKey{
ProjectID: projectID,
- Operation: "GetRule",
+ Operation: "Get",
Version: meta.Version("beta"),
- Service: "SecurityPolicies",
+ Service: "RegionSslCertificates",
}
- klog.V(5).Infof("GCEBetaSecurityPolicies.GetRule(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
-
+ klog.V(5).Infof("GCEBetaRegionSslCertificates.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaSecurityPolicies.GetRule(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionSslCertificates.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.Beta.SecurityPolicies.GetRule(projectID, key.Name)
+ call := g.s.Beta.RegionSslCertificates.Get(projectID, key.Region, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEBetaSecurityPolicies.GetRule(%v, %v, ...) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEBetaRegionSslCertificates.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
-// Patch is a method on GCEBetaSecurityPolicies.
-func (g *GCEBetaSecurityPolicies) Patch(ctx context.Context, key *meta.Key, arg0 *beta.SecurityPolicy) error {
- klog.V(5).Infof("GCEBetaSecurityPolicies.Patch(%v, %v, ...): called", ctx, key)
-
- if !key.Valid() {
- klog.V(2).Infof("GCEBetaSecurityPolicies.Patch(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
- return fmt.Errorf("invalid GCE key (%+v)", key)
- }
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "SecurityPolicies")
+// List all SslCertificate objects.
+func (g *GCEBetaRegionSslCertificates) List(ctx context.Context, region string, fl *filter.F) ([]*beta.SslCertificate, error) {
+ klog.V(5).Infof("GCEBetaRegionSslCertificates.List(%v, %v, %v) called", ctx, region, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionSslCertificates")
rk := &RateLimitKey{
ProjectID: projectID,
- Operation: "Patch",
+ Operation: "List",
Version: meta.Version("beta"),
- Service: "SecurityPolicies",
+ Service: "RegionSslCertificates",
}
- klog.V(5).Infof("GCEBetaSecurityPolicies.Patch(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
-
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaSecurityPolicies.Patch(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
- return err
+ return nil, err
}
- call := g.s.Beta.SecurityPolicies.Patch(projectID, key.Name, arg0)
- call.Context(ctx)
- op, err := call.Do()
- if err != nil {
- klog.V(4).Infof("GCEBetaSecurityPolicies.Patch(%v, %v, ...) = %+v", ctx, key, err)
- return err
+ klog.V(5).Infof("GCEBetaRegionSslCertificates.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk)
+ call := g.s.Beta.RegionSslCertificates.List(projectID, region)
+ if fl != filter.None {
+ call.Filter(fl.String())
+ }
+ var all []*beta.SslCertificate
+ f := func(l *beta.SslCertificateList) error {
+ klog.V(5).Infof("GCEBetaRegionSslCertificates.List(%v, ..., %v): page %+v", ctx, fl, l)
+ all = append(all, l.Items...)
+ return nil
+ }
+ if err := call.Pages(ctx, f); err != nil {
+ klog.V(4).Infof("GCEBetaRegionSslCertificates.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ return nil, err
}
- err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaSecurityPolicies.Patch(%v, %v, ...) = %+v", ctx, key, err)
- return err
-}
-// PatchRule is a method on GCEBetaSecurityPolicies.
-func (g *GCEBetaSecurityPolicies) PatchRule(ctx context.Context, key *meta.Key, arg0 *beta.SecurityPolicyRule) error {
- klog.V(5).Infof("GCEBetaSecurityPolicies.PatchRule(%v, %v, ...): called", ctx, key)
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEBetaRegionSslCertificates.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
+ var asStr []string
+ for _, o := range all {
+ asStr = append(asStr, fmt.Sprintf("%+v", o))
+ }
+ klog.V(5).Infof("GCEBetaRegionSslCertificates.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ }
+
+ return all, nil
+}
+// Insert SslCertificate with key of value obj.
+func (g *GCEBetaRegionSslCertificates) Insert(ctx context.Context, key *meta.Key, obj *beta.SslCertificate) error {
+ klog.V(5).Infof("GCEBetaRegionSslCertificates.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaSecurityPolicies.PatchRule(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaRegionSslCertificates.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "SecurityPolicies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionSslCertificates")
rk := &RateLimitKey{
ProjectID: projectID,
- Operation: "PatchRule",
+ Operation: "Insert",
Version: meta.Version("beta"),
- Service: "SecurityPolicies",
+ Service: "RegionSslCertificates",
}
- klog.V(5).Infof("GCEBetaSecurityPolicies.PatchRule(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
-
+ klog.V(5).Infof("GCEBetaRegionSslCertificates.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaSecurityPolicies.PatchRule(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionSslCertificates.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Beta.SecurityPolicies.PatchRule(projectID, key.Name, arg0)
+ obj.Name = key.Name
+ call := g.s.Beta.RegionSslCertificates.Insert(projectID, key.Region, obj)
call.Context(ctx)
+
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaSecurityPolicies.PatchRule(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionSslCertificates.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
+
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaSecurityPolicies.PatchRule(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionSslCertificates.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
-// RemoveRule is a method on GCEBetaSecurityPolicies.
-func (g *GCEBetaSecurityPolicies) RemoveRule(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEBetaSecurityPolicies.RemoveRule(%v, %v, ...): called", ctx, key)
-
+// Delete the SslCertificate referenced by key.
+func (g *GCEBetaRegionSslCertificates) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEBetaRegionSslCertificates.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaSecurityPolicies.RemoveRule(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaRegionSslCertificates.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "SecurityPolicies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionSslCertificates")
rk := &RateLimitKey{
ProjectID: projectID,
- Operation: "RemoveRule",
+ Operation: "Delete",
Version: meta.Version("beta"),
- Service: "SecurityPolicies",
+ Service: "RegionSslCertificates",
}
- klog.V(5).Infof("GCEBetaSecurityPolicies.RemoveRule(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
-
+ klog.V(5).Infof("GCEBetaRegionSslCertificates.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaSecurityPolicies.RemoveRule(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionSslCertificates.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Beta.SecurityPolicies.RemoveRule(projectID, key.Name)
+ call := g.s.Beta.RegionSslCertificates.Delete(projectID, key.Region, key.Name)
call.Context(ctx)
+
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaSecurityPolicies.RemoveRule(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
return err
}
+
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaSecurityPolicies.RemoveRule(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// SslCertificates is an interface that allows for mocking of SslCertificates.
-type SslCertificates interface {
+// RegionSslCertificates is an interface that allows for mocking of RegionSslCertificates.
+type RegionSslCertificates interface {
Get(ctx context.Context, key *meta.Key) (*ga.SslCertificate, error)
- List(ctx context.Context, fl *filter.F) ([]*ga.SslCertificate, error)
+ List(ctx context.Context, region string, fl *filter.F) ([]*ga.SslCertificate, error)
Insert(ctx context.Context, key *meta.Key, obj *ga.SslCertificate) error
Delete(ctx context.Context, key *meta.Key) error
}
-// NewMockSslCertificates returns a new mock for SslCertificates.
-func NewMockSslCertificates(pr ProjectRouter, objs map[meta.Key]*MockSslCertificatesObj) *MockSslCertificates {
- mock := &MockSslCertificates{
+// NewMockRegionSslCertificates returns a new mock for RegionSslCertificates.
+func NewMockRegionSslCertificates(pr ProjectRouter, objs map[meta.Key]*MockRegionSslCertificatesObj) *MockRegionSslCertificates {
+ mock := &MockRegionSslCertificates{
ProjectRouter: pr,
Objects: objs,
@@ -18317,14 +21340,14 @@ func NewMockSslCertificates(pr ProjectRouter, objs map[meta.Key]*MockSslCertific
return mock
}
-// MockSslCertificates is the mock for SslCertificates.
-type MockSslCertificates struct {
+// MockRegionSslCertificates is the mock for RegionSslCertificates.
+type MockRegionSslCertificates struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
// Objects maintained by the mock.
- Objects map[meta.Key]*MockSslCertificatesObj
+ Objects map[meta.Key]*MockRegionSslCertificatesObj
// If an entry exists for the given key and operation, then the error
// will be returned instead of the operation.
@@ -18337,10 +21360,10 @@ type MockSslCertificates struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockSslCertificates) (bool, *ga.SslCertificate, error)
- ListHook func(ctx context.Context, fl *filter.F, m *MockSslCertificates) (bool, []*ga.SslCertificate, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *ga.SslCertificate, m *MockSslCertificates) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockSslCertificates) (bool, error)
+ GetHook func(ctx context.Context, key *meta.Key, m *MockRegionSslCertificates) (bool, *ga.SslCertificate, error)
+ ListHook func(ctx context.Context, region string, fl *filter.F, m *MockRegionSslCertificates) (bool, []*ga.SslCertificate, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *ga.SslCertificate, m *MockRegionSslCertificates) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockRegionSslCertificates) (bool, error)
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -18348,10 +21371,10 @@ type MockSslCertificates struct {
}
// Get returns the object from the mock.
-func (m *MockSslCertificates) Get(ctx context.Context, key *meta.Key) (*ga.SslCertificate, error) {
+func (m *MockRegionSslCertificates) Get(ctx context.Context, key *meta.Key) (*ga.SslCertificate, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockSslCertificates.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockRegionSslCertificates.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -18363,28 +21386,28 @@ func (m *MockSslCertificates) Get(ctx context.Context, key *meta.Key) (*ga.SslCe
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockSslCertificates.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockRegionSslCertificates.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
typedObj := obj.ToGA()
- klog.V(5).Infof("MockSslCertificates.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ klog.V(5).Infof("MockRegionSslCertificates.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockSslCertificates %v not found", key),
+ Message: fmt.Sprintf("MockRegionSslCertificates %v not found", key),
}
- klog.V(5).Infof("MockSslCertificates.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockRegionSslCertificates.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
-// List all of the objects in the mock.
-func (m *MockSslCertificates) List(ctx context.Context, fl *filter.F) ([]*ga.SslCertificate, error) {
+// List all of the objects in the mock in the given region.
+func (m *MockRegionSslCertificates) List(ctx context.Context, region string, fl *filter.F) ([]*ga.SslCertificate, error) {
if m.ListHook != nil {
- if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
- klog.V(5).Infof("MockSslCertificates.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
+ if intercept, objs, err := m.ListHook(ctx, region, fl, m); intercept {
+ klog.V(5).Infof("MockRegionSslCertificates.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err)
return objs, err
}
}
@@ -18394,28 +21417,31 @@ func (m *MockSslCertificates) List(ctx context.Context, fl *filter.F) ([]*ga.Ssl
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockSslCertificates.List(%v, %v) = nil, %v", ctx, fl, err)
+ klog.V(5).Infof("MockRegionSslCertificates.List(%v, %q, %v) = nil, %v", ctx, region, fl, err)
return nil, *m.ListError
}
var objs []*ga.SslCertificate
- for _, obj := range m.Objects {
+ for key, obj := range m.Objects {
+ if key.Region != region {
+ continue
+ }
if !fl.Match(obj.ToGA()) {
continue
}
objs = append(objs, obj.ToGA())
}
- klog.V(5).Infof("MockSslCertificates.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
+ klog.V(5).Infof("MockRegionSslCertificates.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockSslCertificates) Insert(ctx context.Context, key *meta.Key, obj *ga.SslCertificate) error {
+func (m *MockRegionSslCertificates) Insert(ctx context.Context, key *meta.Key, obj *ga.SslCertificate) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockRegionSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -18427,15 +21453,15 @@ func (m *MockSslCertificates) Insert(ctx context.Context, key *meta.Key, obj *ga
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockRegionSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockSslCertificates %v exists", key),
+ Message: fmt.Sprintf("MockRegionSslCertificates %v exists", key),
}
- klog.V(5).Infof("MockSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockRegionSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
@@ -18443,16 +21469,16 @@ func (m *MockSslCertificates) Insert(ctx context.Context, key *meta.Key, obj *ga
projectID := m.ProjectRouter.ProjectID(ctx, "ga", "sslCertificates")
obj.SelfLink = SelfLink(meta.VersionGA, projectID, "sslCertificates", key)
- m.Objects[*key] = &MockSslCertificatesObj{obj}
- klog.V(5).Infof("MockSslCertificates.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ m.Objects[*key] = &MockRegionSslCertificatesObj{obj}
+ klog.V(5).Infof("MockRegionSslCertificates.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockSslCertificates) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockRegionSslCertificates) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockRegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -18464,181 +21490,179 @@ func (m *MockSslCertificates) Delete(ctx context.Context, key *meta.Key) error {
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockRegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockSslCertificates %v not found", key),
+ Message: fmt.Sprintf("MockRegionSslCertificates %v not found", key),
}
- klog.V(5).Infof("MockSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockRegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockSslCertificates.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockRegionSslCertificates.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockSslCertificates) Obj(o *ga.SslCertificate) *MockSslCertificatesObj {
- return &MockSslCertificatesObj{o}
+func (m *MockRegionSslCertificates) Obj(o *ga.SslCertificate) *MockRegionSslCertificatesObj {
+ return &MockRegionSslCertificatesObj{o}
}
-// GCESslCertificates is a simplifying adapter for the GCE SslCertificates.
-type GCESslCertificates struct {
+// GCERegionSslCertificates is a simplifying adapter for the GCE RegionSslCertificates.
+type GCERegionSslCertificates struct {
s *Service
}
// Get the SslCertificate named by key.
-func (g *GCESslCertificates) Get(ctx context.Context, key *meta.Key) (*ga.SslCertificate, error) {
- klog.V(5).Infof("GCESslCertificates.Get(%v, %v): called", ctx, key)
+func (g *GCERegionSslCertificates) Get(ctx context.Context, key *meta.Key) (*ga.SslCertificate, error) {
+ klog.V(5).Infof("GCERegionSslCertificates.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCESslCertificates.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCERegionSslCertificates.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "SslCertificates")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionSslCertificates")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
Version: meta.Version("ga"),
- Service: "SslCertificates",
+ Service: "RegionSslCertificates",
}
- klog.V(5).Infof("GCESslCertificates.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCERegionSslCertificates.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCESslCertificates.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCERegionSslCertificates.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.GA.SslCertificates.Get(projectID, key.Name)
+ call := g.s.GA.RegionSslCertificates.Get(projectID, key.Region, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCESslCertificates.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCERegionSslCertificates.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
// List all SslCertificate objects.
-func (g *GCESslCertificates) List(ctx context.Context, fl *filter.F) ([]*ga.SslCertificate, error) {
- klog.V(5).Infof("GCESslCertificates.List(%v, %v) called", ctx, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "SslCertificates")
+func (g *GCERegionSslCertificates) List(ctx context.Context, region string, fl *filter.F) ([]*ga.SslCertificate, error) {
+ klog.V(5).Infof("GCERegionSslCertificates.List(%v, %v, %v) called", ctx, region, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionSslCertificates")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
Version: meta.Version("ga"),
- Service: "SslCertificates",
+ Service: "RegionSslCertificates",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCESslCertificates.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
- call := g.s.GA.SslCertificates.List(projectID)
+ klog.V(5).Infof("GCERegionSslCertificates.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk)
+ call := g.s.GA.RegionSslCertificates.List(projectID, region)
if fl != filter.None {
call.Filter(fl.String())
}
var all []*ga.SslCertificate
f := func(l *ga.SslCertificateList) error {
- klog.V(5).Infof("GCESslCertificates.List(%v, ..., %v): page %+v", ctx, fl, l)
+ klog.V(5).Infof("GCERegionSslCertificates.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCESslCertificates.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCERegionSslCertificates.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCESslCertificates.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCERegionSslCertificates.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCESslCertificates.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCERegionSslCertificates.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
// Insert SslCertificate with key of value obj.
-func (g *GCESslCertificates) Insert(ctx context.Context, key *meta.Key, obj *ga.SslCertificate) error {
- klog.V(5).Infof("GCESslCertificates.Insert(%v, %v, %+v): called", ctx, key, obj)
+func (g *GCERegionSslCertificates) Insert(ctx context.Context, key *meta.Key, obj *ga.SslCertificate) error {
+ klog.V(5).Infof("GCERegionSslCertificates.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCESslCertificates.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCERegionSslCertificates.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "SslCertificates")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionSslCertificates")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
Version: meta.Version("ga"),
- Service: "SslCertificates",
+ Service: "RegionSslCertificates",
}
- klog.V(5).Infof("GCESslCertificates.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCERegionSslCertificates.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCESslCertificates.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCERegionSslCertificates.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.GA.SslCertificates.Insert(projectID, obj)
+ call := g.s.GA.RegionSslCertificates.Insert(projectID, key.Region, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCESslCertificates.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCERegionSslCertificates.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCESslCertificates.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCERegionSslCertificates.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
// Delete the SslCertificate referenced by key.
-func (g *GCESslCertificates) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCESslCertificates.Delete(%v, %v): called", ctx, key)
+func (g *GCERegionSslCertificates) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCERegionSslCertificates.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCESslCertificates.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCERegionSslCertificates.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "SslCertificates")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionSslCertificates")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
Version: meta.Version("ga"),
- Service: "SslCertificates",
+ Service: "RegionSslCertificates",
}
- klog.V(5).Infof("GCESslCertificates.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCERegionSslCertificates.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCESslCertificates.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCERegionSslCertificates.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.GA.SslCertificates.Delete(projectID, key.Name)
-
+ call := g.s.GA.RegionSslCertificates.Delete(projectID, key.Region, key.Name)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCESslCertificates.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCERegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCESslCertificates.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCERegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// BetaSslCertificates is an interface that allows for mocking of SslCertificates.
-type BetaSslCertificates interface {
- Get(ctx context.Context, key *meta.Key) (*beta.SslCertificate, error)
- List(ctx context.Context, fl *filter.F) ([]*beta.SslCertificate, error)
- Insert(ctx context.Context, key *meta.Key, obj *beta.SslCertificate) error
+// SslPolicies is an interface that allows for mocking of SslPolicies.
+type SslPolicies interface {
+ Get(ctx context.Context, key *meta.Key) (*ga.SslPolicy, error)
+ Insert(ctx context.Context, key *meta.Key, obj *ga.SslPolicy) error
Delete(ctx context.Context, key *meta.Key) error
}
-// NewMockBetaSslCertificates returns a new mock for SslCertificates.
-func NewMockBetaSslCertificates(pr ProjectRouter, objs map[meta.Key]*MockSslCertificatesObj) *MockBetaSslCertificates {
- mock := &MockBetaSslCertificates{
+// NewMockSslPolicies returns a new mock for SslPolicies.
+func NewMockSslPolicies(pr ProjectRouter, objs map[meta.Key]*MockSslPoliciesObj) *MockSslPolicies {
+ mock := &MockSslPolicies{
ProjectRouter: pr,
Objects: objs,
@@ -18649,19 +21673,18 @@ func NewMockBetaSslCertificates(pr ProjectRouter, objs map[meta.Key]*MockSslCert
return mock
}
-// MockBetaSslCertificates is the mock for SslCertificates.
-type MockBetaSslCertificates struct {
+// MockSslPolicies is the mock for SslPolicies.
+type MockSslPolicies struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
// Objects maintained by the mock.
- Objects map[meta.Key]*MockSslCertificatesObj
+ Objects map[meta.Key]*MockSslPoliciesObj
// If an entry exists for the given key and operation, then the error
// will be returned instead of the operation.
GetError map[meta.Key]error
- ListError *error
InsertError map[meta.Key]error
DeleteError map[meta.Key]error
@@ -18669,85 +21692,53 @@ type MockBetaSslCertificates struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockBetaSslCertificates) (bool, *beta.SslCertificate, error)
- ListHook func(ctx context.Context, fl *filter.F, m *MockBetaSslCertificates) (bool, []*beta.SslCertificate, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *beta.SslCertificate, m *MockBetaSslCertificates) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaSslCertificates) (bool, error)
+ GetHook func(ctx context.Context, key *meta.Key, m *MockSslPolicies) (bool, *ga.SslPolicy, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *ga.SslPolicy, m *MockSslPolicies) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockSslPolicies) (bool, error)
// X is extra state that can be used as part of the mock. Generated code
- // will not use this field.
- X interface{}
-}
-
-// Get returns the object from the mock.
-func (m *MockBetaSslCertificates) Get(ctx context.Context, key *meta.Key) (*beta.SslCertificate, error) {
- if m.GetHook != nil {
- if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockBetaSslCertificates.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
- return obj, err
- }
- }
- if !key.Valid() {
- return nil, fmt.Errorf("invalid GCE key (%+v)", key)
- }
-
- m.Lock.Lock()
- defer m.Lock.Unlock()
-
- if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockBetaSslCertificates.Get(%v, %s) = nil, %v", ctx, key, err)
- return nil, err
- }
- if obj, ok := m.Objects[*key]; ok {
- typedObj := obj.ToBeta()
- klog.V(5).Infof("MockBetaSslCertificates.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
- return typedObj, nil
- }
-
- err := &googleapi.Error{
- Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockBetaSslCertificates %v not found", key),
- }
- klog.V(5).Infof("MockBetaSslCertificates.Get(%v, %s) = nil, %v", ctx, key, err)
- return nil, err
-}
-
-// List all of the objects in the mock.
-func (m *MockBetaSslCertificates) List(ctx context.Context, fl *filter.F) ([]*beta.SslCertificate, error) {
- if m.ListHook != nil {
- if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
- klog.V(5).Infof("MockBetaSslCertificates.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
- return objs, err
+ // will not use this field.
+ X interface{}
+}
+
+// Get returns the object from the mock.
+func (m *MockSslPolicies) Get(ctx context.Context, key *meta.Key) (*ga.SslPolicy, error) {
+ if m.GetHook != nil {
+ if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
+ klog.V(5).Infof("MockSslPolicies.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ return obj, err
}
}
+ if !key.Valid() {
+ return nil, fmt.Errorf("invalid GCE key (%+v)", key)
+ }
m.Lock.Lock()
defer m.Lock.Unlock()
- if m.ListError != nil {
- err := *m.ListError
- klog.V(5).Infof("MockBetaSslCertificates.List(%v, %v) = nil, %v", ctx, fl, err)
-
- return nil, *m.ListError
+ if err, ok := m.GetError[*key]; ok {
+ klog.V(5).Infof("MockSslPolicies.Get(%v, %s) = nil, %v", ctx, key, err)
+ return nil, err
}
-
- var objs []*beta.SslCertificate
- for _, obj := range m.Objects {
- if !fl.Match(obj.ToBeta()) {
- continue
- }
- objs = append(objs, obj.ToBeta())
+ if obj, ok := m.Objects[*key]; ok {
+ typedObj := obj.ToGA()
+ klog.V(5).Infof("MockSslPolicies.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ return typedObj, nil
}
- klog.V(5).Infof("MockBetaSslCertificates.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
- return objs, nil
+ err := &googleapi.Error{
+ Code: http.StatusNotFound,
+ Message: fmt.Sprintf("MockSslPolicies %v not found", key),
+ }
+ klog.V(5).Infof("MockSslPolicies.Get(%v, %s) = nil, %v", ctx, key, err)
+ return nil, err
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockBetaSslCertificates) Insert(ctx context.Context, key *meta.Key, obj *beta.SslCertificate) error {
+func (m *MockSslPolicies) Insert(ctx context.Context, key *meta.Key, obj *ga.SslPolicy) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockBetaSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockSslPolicies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -18759,32 +21750,32 @@ func (m *MockBetaSslCertificates) Insert(ctx context.Context, key *meta.Key, obj
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockBetaSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockSslPolicies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockBetaSslCertificates %v exists", key),
+ Message: fmt.Sprintf("MockSslPolicies %v exists", key),
}
- klog.V(5).Infof("MockBetaSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockSslPolicies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "beta", "sslCertificates")
- obj.SelfLink = SelfLink(meta.VersionBeta, projectID, "sslCertificates", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "ga", "sslPolicies")
+ obj.SelfLink = SelfLink(meta.VersionGA, projectID, "sslPolicies", key)
- m.Objects[*key] = &MockSslCertificatesObj{obj}
- klog.V(5).Infof("MockBetaSslCertificates.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ m.Objects[*key] = &MockSslPoliciesObj{obj}
+ klog.V(5).Infof("MockSslPolicies.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockBetaSslCertificates) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockSslPolicies) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockBetaSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockSslPolicies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -18796,181 +21787,139 @@ func (m *MockBetaSslCertificates) Delete(ctx context.Context, key *meta.Key) err
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockBetaSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockSslPolicies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockBetaSslCertificates %v not found", key),
+ Message: fmt.Sprintf("MockSslPolicies %v not found", key),
}
- klog.V(5).Infof("MockBetaSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockSslPolicies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockBetaSslCertificates.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockSslPolicies.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockBetaSslCertificates) Obj(o *beta.SslCertificate) *MockSslCertificatesObj {
- return &MockSslCertificatesObj{o}
+func (m *MockSslPolicies) Obj(o *ga.SslPolicy) *MockSslPoliciesObj {
+ return &MockSslPoliciesObj{o}
}
-// GCEBetaSslCertificates is a simplifying adapter for the GCE SslCertificates.
-type GCEBetaSslCertificates struct {
+// GCESslPolicies is a simplifying adapter for the GCE SslPolicies.
+type GCESslPolicies struct {
s *Service
}
-// Get the SslCertificate named by key.
-func (g *GCEBetaSslCertificates) Get(ctx context.Context, key *meta.Key) (*beta.SslCertificate, error) {
- klog.V(5).Infof("GCEBetaSslCertificates.Get(%v, %v): called", ctx, key)
+// Get the SslPolicy named by key.
+func (g *GCESslPolicies) Get(ctx context.Context, key *meta.Key) (*ga.SslPolicy, error) {
+ klog.V(5).Infof("GCESslPolicies.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaSslCertificates.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCESslPolicies.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "SslCertificates")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "SslPolicies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
- Version: meta.Version("beta"),
- Service: "SslCertificates",
+ Version: meta.Version("ga"),
+ Service: "SslPolicies",
}
- klog.V(5).Infof("GCEBetaSslCertificates.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCESslPolicies.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaSslCertificates.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCESslPolicies.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.Beta.SslCertificates.Get(projectID, key.Name)
+ call := g.s.GA.SslPolicies.Get(projectID, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEBetaSslCertificates.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCESslPolicies.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
-// List all SslCertificate objects.
-func (g *GCEBetaSslCertificates) List(ctx context.Context, fl *filter.F) ([]*beta.SslCertificate, error) {
- klog.V(5).Infof("GCEBetaSslCertificates.List(%v, %v) called", ctx, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "SslCertificates")
- rk := &RateLimitKey{
- ProjectID: projectID,
- Operation: "List",
- Version: meta.Version("beta"),
- Service: "SslCertificates",
- }
- if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- return nil, err
- }
- klog.V(5).Infof("GCEBetaSslCertificates.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
- call := g.s.Beta.SslCertificates.List(projectID)
- if fl != filter.None {
- call.Filter(fl.String())
- }
- var all []*beta.SslCertificate
- f := func(l *beta.SslCertificateList) error {
- klog.V(5).Infof("GCEBetaSslCertificates.List(%v, ..., %v): page %+v", ctx, fl, l)
- all = append(all, l.Items...)
- return nil
- }
- if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEBetaSslCertificates.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
- return nil, err
- }
-
- if klog.V(4) {
- klog.V(4).Infof("GCEBetaSslCertificates.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
- var asStr []string
- for _, o := range all {
- asStr = append(asStr, fmt.Sprintf("%+v", o))
- }
- klog.V(5).Infof("GCEBetaSslCertificates.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
- }
-
- return all, nil
-}
-
-// Insert SslCertificate with key of value obj.
-func (g *GCEBetaSslCertificates) Insert(ctx context.Context, key *meta.Key, obj *beta.SslCertificate) error {
- klog.V(5).Infof("GCEBetaSslCertificates.Insert(%v, %v, %+v): called", ctx, key, obj)
+// Insert SslPolicy with key of value obj.
+func (g *GCESslPolicies) Insert(ctx context.Context, key *meta.Key, obj *ga.SslPolicy) error {
+ klog.V(5).Infof("GCESslPolicies.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaSslCertificates.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCESslPolicies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "SslCertificates")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "SslPolicies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
- Version: meta.Version("beta"),
- Service: "SslCertificates",
+ Version: meta.Version("ga"),
+ Service: "SslPolicies",
}
- klog.V(5).Infof("GCEBetaSslCertificates.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCESslPolicies.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaSslCertificates.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCESslPolicies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.Beta.SslCertificates.Insert(projectID, obj)
+ call := g.s.GA.SslPolicies.Insert(projectID, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaSslCertificates.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCESslPolicies.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaSslCertificates.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCESslPolicies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
-// Delete the SslCertificate referenced by key.
-func (g *GCEBetaSslCertificates) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEBetaSslCertificates.Delete(%v, %v): called", ctx, key)
+// Delete the SslPolicy referenced by key.
+func (g *GCESslPolicies) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCESslPolicies.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaSslCertificates.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCESslPolicies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "SslCertificates")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "SslPolicies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
- Version: meta.Version("beta"),
- Service: "SslCertificates",
+ Version: meta.Version("ga"),
+ Service: "SslPolicies",
}
- klog.V(5).Infof("GCEBetaSslCertificates.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCESslPolicies.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaSslCertificates.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCESslPolicies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Beta.SslCertificates.Delete(projectID, key.Name)
+ call := g.s.GA.SslPolicies.Delete(projectID, key.Name)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCESslPolicies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCESslPolicies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// AlphaSslCertificates is an interface that allows for mocking of SslCertificates.
-type AlphaSslCertificates interface {
- Get(ctx context.Context, key *meta.Key) (*alpha.SslCertificate, error)
- List(ctx context.Context, fl *filter.F) ([]*alpha.SslCertificate, error)
- Insert(ctx context.Context, key *meta.Key, obj *alpha.SslCertificate) error
+// AlphaSubnetworks is an interface that allows for mocking of Subnetworks.
+type AlphaSubnetworks interface {
+ Get(ctx context.Context, key *meta.Key) (*alpha.Subnetwork, error)
+ List(ctx context.Context, region string, fl *filter.F) ([]*alpha.Subnetwork, error)
+ Insert(ctx context.Context, key *meta.Key, obj *alpha.Subnetwork) error
Delete(ctx context.Context, key *meta.Key) error
}
-// NewMockAlphaSslCertificates returns a new mock for SslCertificates.
-func NewMockAlphaSslCertificates(pr ProjectRouter, objs map[meta.Key]*MockSslCertificatesObj) *MockAlphaSslCertificates {
- mock := &MockAlphaSslCertificates{
+// NewMockAlphaSubnetworks returns a new mock for Subnetworks.
+func NewMockAlphaSubnetworks(pr ProjectRouter, objs map[meta.Key]*MockSubnetworksObj) *MockAlphaSubnetworks {
+ mock := &MockAlphaSubnetworks{
ProjectRouter: pr,
Objects: objs,
@@ -18981,14 +21930,14 @@ func NewMockAlphaSslCertificates(pr ProjectRouter, objs map[meta.Key]*MockSslCer
return mock
}
-// MockAlphaSslCertificates is the mock for SslCertificates.
-type MockAlphaSslCertificates struct {
+// MockAlphaSubnetworks is the mock for Subnetworks.
+type MockAlphaSubnetworks struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
// Objects maintained by the mock.
- Objects map[meta.Key]*MockSslCertificatesObj
+ Objects map[meta.Key]*MockSubnetworksObj
// If an entry exists for the given key and operation, then the error
// will be returned instead of the operation.
@@ -19001,10 +21950,10 @@ type MockAlphaSslCertificates struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaSslCertificates) (bool, *alpha.SslCertificate, error)
- ListHook func(ctx context.Context, fl *filter.F, m *MockAlphaSslCertificates) (bool, []*alpha.SslCertificate, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *alpha.SslCertificate, m *MockAlphaSslCertificates) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaSslCertificates) (bool, error)
+ GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaSubnetworks) (bool, *alpha.Subnetwork, error)
+ ListHook func(ctx context.Context, region string, fl *filter.F, m *MockAlphaSubnetworks) (bool, []*alpha.Subnetwork, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *alpha.Subnetwork, m *MockAlphaSubnetworks) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaSubnetworks) (bool, error)
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -19012,10 +21961,10 @@ type MockAlphaSslCertificates struct {
}
// Get returns the object from the mock.
-func (m *MockAlphaSslCertificates) Get(ctx context.Context, key *meta.Key) (*alpha.SslCertificate, error) {
+func (m *MockAlphaSubnetworks) Get(ctx context.Context, key *meta.Key) (*alpha.Subnetwork, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockAlphaSslCertificates.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaSubnetworks.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -19027,28 +21976,28 @@ func (m *MockAlphaSslCertificates) Get(ctx context.Context, key *meta.Key) (*alp
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockAlphaSslCertificates.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaSubnetworks.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
typedObj := obj.ToAlpha()
- klog.V(5).Infof("MockAlphaSslCertificates.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ klog.V(5).Infof("MockAlphaSubnetworks.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockAlphaSslCertificates %v not found", key),
+ Message: fmt.Sprintf("MockAlphaSubnetworks %v not found", key),
}
- klog.V(5).Infof("MockAlphaSslCertificates.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaSubnetworks.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
-// List all of the objects in the mock.
-func (m *MockAlphaSslCertificates) List(ctx context.Context, fl *filter.F) ([]*alpha.SslCertificate, error) {
+// List all of the objects in the mock in the given region.
+func (m *MockAlphaSubnetworks) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.Subnetwork, error) {
if m.ListHook != nil {
- if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
- klog.V(5).Infof("MockAlphaSslCertificates.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
+ if intercept, objs, err := m.ListHook(ctx, region, fl, m); intercept {
+ klog.V(5).Infof("MockAlphaSubnetworks.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err)
return objs, err
}
}
@@ -19058,28 +22007,31 @@ func (m *MockAlphaSslCertificates) List(ctx context.Context, fl *filter.F) ([]*a
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockAlphaSslCertificates.List(%v, %v) = nil, %v", ctx, fl, err)
+ klog.V(5).Infof("MockAlphaSubnetworks.List(%v, %q, %v) = nil, %v", ctx, region, fl, err)
return nil, *m.ListError
}
- var objs []*alpha.SslCertificate
- for _, obj := range m.Objects {
+ var objs []*alpha.Subnetwork
+ for key, obj := range m.Objects {
+ if key.Region != region {
+ continue
+ }
if !fl.Match(obj.ToAlpha()) {
continue
}
objs = append(objs, obj.ToAlpha())
}
- klog.V(5).Infof("MockAlphaSslCertificates.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
+ klog.V(5).Infof("MockAlphaSubnetworks.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockAlphaSslCertificates) Insert(ctx context.Context, key *meta.Key, obj *alpha.SslCertificate) error {
+func (m *MockAlphaSubnetworks) Insert(ctx context.Context, key *meta.Key, obj *alpha.Subnetwork) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockAlphaSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaSubnetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -19091,32 +22043,32 @@ func (m *MockAlphaSslCertificates) Insert(ctx context.Context, key *meta.Key, ob
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockAlphaSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaSubnetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockAlphaSslCertificates %v exists", key),
+ Message: fmt.Sprintf("MockAlphaSubnetworks %v exists", key),
}
- klog.V(5).Infof("MockAlphaSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaSubnetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "sslCertificates")
- obj.SelfLink = SelfLink(meta.VersionAlpha, projectID, "sslCertificates", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "subnetworks")
+ obj.SelfLink = SelfLink(meta.VersionAlpha, projectID, "subnetworks", key)
- m.Objects[*key] = &MockSslCertificatesObj{obj}
- klog.V(5).Infof("MockAlphaSslCertificates.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ m.Objects[*key] = &MockSubnetworksObj{obj}
+ klog.V(5).Infof("MockAlphaSubnetworks.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockAlphaSslCertificates) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockAlphaSubnetworks) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockAlphaSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaSubnetworks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -19128,181 +22080,180 @@ func (m *MockAlphaSslCertificates) Delete(ctx context.Context, key *meta.Key) er
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockAlphaSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaSubnetworks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockAlphaSslCertificates %v not found", key),
+ Message: fmt.Sprintf("MockAlphaSubnetworks %v not found", key),
}
- klog.V(5).Infof("MockAlphaSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaSubnetworks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockAlphaSslCertificates.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockAlphaSubnetworks.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockAlphaSslCertificates) Obj(o *alpha.SslCertificate) *MockSslCertificatesObj {
- return &MockSslCertificatesObj{o}
+func (m *MockAlphaSubnetworks) Obj(o *alpha.Subnetwork) *MockSubnetworksObj {
+ return &MockSubnetworksObj{o}
}
-// GCEAlphaSslCertificates is a simplifying adapter for the GCE SslCertificates.
-type GCEAlphaSslCertificates struct {
+// GCEAlphaSubnetworks is a simplifying adapter for the GCE Subnetworks.
+type GCEAlphaSubnetworks struct {
s *Service
}
-// Get the SslCertificate named by key.
-func (g *GCEAlphaSslCertificates) Get(ctx context.Context, key *meta.Key) (*alpha.SslCertificate, error) {
- klog.V(5).Infof("GCEAlphaSslCertificates.Get(%v, %v): called", ctx, key)
+// Get the Subnetwork named by key.
+func (g *GCEAlphaSubnetworks) Get(ctx context.Context, key *meta.Key) (*alpha.Subnetwork, error) {
+ klog.V(5).Infof("GCEAlphaSubnetworks.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaSslCertificates.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaSubnetworks.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "SslCertificates")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Subnetworks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
Version: meta.Version("alpha"),
- Service: "SslCertificates",
+ Service: "Subnetworks",
}
- klog.V(5).Infof("GCEAlphaSslCertificates.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaSubnetworks.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaSslCertificates.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaSubnetworks.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.Alpha.SslCertificates.Get(projectID, key.Name)
+ call := g.s.Alpha.Subnetworks.Get(projectID, key.Region, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEAlphaSslCertificates.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEAlphaSubnetworks.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
-// List all SslCertificate objects.
-func (g *GCEAlphaSslCertificates) List(ctx context.Context, fl *filter.F) ([]*alpha.SslCertificate, error) {
- klog.V(5).Infof("GCEAlphaSslCertificates.List(%v, %v) called", ctx, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "SslCertificates")
+// List all Subnetwork objects.
+func (g *GCEAlphaSubnetworks) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.Subnetwork, error) {
+ klog.V(5).Infof("GCEAlphaSubnetworks.List(%v, %v, %v) called", ctx, region, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Subnetworks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
Version: meta.Version("alpha"),
- Service: "SslCertificates",
+ Service: "Subnetworks",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCEAlphaSslCertificates.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
- call := g.s.Alpha.SslCertificates.List(projectID)
+ klog.V(5).Infof("GCEAlphaSubnetworks.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk)
+ call := g.s.Alpha.Subnetworks.List(projectID, region)
if fl != filter.None {
call.Filter(fl.String())
}
- var all []*alpha.SslCertificate
- f := func(l *alpha.SslCertificateList) error {
- klog.V(5).Infof("GCEAlphaSslCertificates.List(%v, ..., %v): page %+v", ctx, fl, l)
+ var all []*alpha.Subnetwork
+ f := func(l *alpha.SubnetworkList) error {
+ klog.V(5).Infof("GCEAlphaSubnetworks.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEAlphaSslCertificates.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEAlphaSubnetworks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEAlphaSslCertificates.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEAlphaSubnetworks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEAlphaSslCertificates.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEAlphaSubnetworks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
-// Insert SslCertificate with key of value obj.
-func (g *GCEAlphaSslCertificates) Insert(ctx context.Context, key *meta.Key, obj *alpha.SslCertificate) error {
- klog.V(5).Infof("GCEAlphaSslCertificates.Insert(%v, %v, %+v): called", ctx, key, obj)
+// Insert Subnetwork with key of value obj.
+func (g *GCEAlphaSubnetworks) Insert(ctx context.Context, key *meta.Key, obj *alpha.Subnetwork) error {
+ klog.V(5).Infof("GCEAlphaSubnetworks.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaSslCertificates.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaSubnetworks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "SslCertificates")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Subnetworks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
Version: meta.Version("alpha"),
- Service: "SslCertificates",
+ Service: "Subnetworks",
}
- klog.V(5).Infof("GCEAlphaSslCertificates.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaSubnetworks.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaSslCertificates.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaSubnetworks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.Alpha.SslCertificates.Insert(projectID, obj)
+ call := g.s.Alpha.Subnetworks.Insert(projectID, key.Region, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaSslCertificates.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaSubnetworks.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaSslCertificates.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCEAlphaSubnetworks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
-// Delete the SslCertificate referenced by key.
-func (g *GCEAlphaSslCertificates) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEAlphaSslCertificates.Delete(%v, %v): called", ctx, key)
+// Delete the Subnetwork referenced by key.
+func (g *GCEAlphaSubnetworks) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEAlphaSubnetworks.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaSslCertificates.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaSubnetworks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "SslCertificates")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Subnetworks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
Version: meta.Version("alpha"),
- Service: "SslCertificates",
+ Service: "Subnetworks",
}
- klog.V(5).Infof("GCEAlphaSslCertificates.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaSubnetworks.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaSslCertificates.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaSubnetworks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Alpha.SslCertificates.Delete(projectID, key.Name)
-
+ call := g.s.Alpha.Subnetworks.Delete(projectID, key.Region, key.Name)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaSubnetworks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaSubnetworks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// AlphaRegionSslCertificates is an interface that allows for mocking of RegionSslCertificates.
-type AlphaRegionSslCertificates interface {
- Get(ctx context.Context, key *meta.Key) (*alpha.SslCertificate, error)
- List(ctx context.Context, region string, fl *filter.F) ([]*alpha.SslCertificate, error)
- Insert(ctx context.Context, key *meta.Key, obj *alpha.SslCertificate) error
+// BetaSubnetworks is an interface that allows for mocking of Subnetworks.
+type BetaSubnetworks interface {
+ Get(ctx context.Context, key *meta.Key) (*beta.Subnetwork, error)
+ List(ctx context.Context, region string, fl *filter.F) ([]*beta.Subnetwork, error)
+ Insert(ctx context.Context, key *meta.Key, obj *beta.Subnetwork) error
Delete(ctx context.Context, key *meta.Key) error
}
-// NewMockAlphaRegionSslCertificates returns a new mock for RegionSslCertificates.
-func NewMockAlphaRegionSslCertificates(pr ProjectRouter, objs map[meta.Key]*MockRegionSslCertificatesObj) *MockAlphaRegionSslCertificates {
- mock := &MockAlphaRegionSslCertificates{
+// NewMockBetaSubnetworks returns a new mock for Subnetworks.
+func NewMockBetaSubnetworks(pr ProjectRouter, objs map[meta.Key]*MockSubnetworksObj) *MockBetaSubnetworks {
+ mock := &MockBetaSubnetworks{
ProjectRouter: pr,
Objects: objs,
@@ -19313,14 +22264,14 @@ func NewMockAlphaRegionSslCertificates(pr ProjectRouter, objs map[meta.Key]*Mock
return mock
}
-// MockAlphaRegionSslCertificates is the mock for RegionSslCertificates.
-type MockAlphaRegionSslCertificates struct {
+// MockBetaSubnetworks is the mock for Subnetworks.
+type MockBetaSubnetworks struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
// Objects maintained by the mock.
- Objects map[meta.Key]*MockRegionSslCertificatesObj
+ Objects map[meta.Key]*MockSubnetworksObj
// If an entry exists for the given key and operation, then the error
// will be returned instead of the operation.
@@ -19333,10 +22284,10 @@ type MockAlphaRegionSslCertificates struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaRegionSslCertificates) (bool, *alpha.SslCertificate, error)
- ListHook func(ctx context.Context, region string, fl *filter.F, m *MockAlphaRegionSslCertificates) (bool, []*alpha.SslCertificate, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *alpha.SslCertificate, m *MockAlphaRegionSslCertificates) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaRegionSslCertificates) (bool, error)
+ GetHook func(ctx context.Context, key *meta.Key, m *MockBetaSubnetworks) (bool, *beta.Subnetwork, error)
+ ListHook func(ctx context.Context, region string, fl *filter.F, m *MockBetaSubnetworks) (bool, []*beta.Subnetwork, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *beta.Subnetwork, m *MockBetaSubnetworks) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaSubnetworks) (bool, error)
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -19344,10 +22295,10 @@ type MockAlphaRegionSslCertificates struct {
}
// Get returns the object from the mock.
-func (m *MockAlphaRegionSslCertificates) Get(ctx context.Context, key *meta.Key) (*alpha.SslCertificate, error) {
+func (m *MockBetaSubnetworks) Get(ctx context.Context, key *meta.Key) (*beta.Subnetwork, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockAlphaRegionSslCertificates.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaSubnetworks.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -19359,28 +22310,28 @@ func (m *MockAlphaRegionSslCertificates) Get(ctx context.Context, key *meta.Key)
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockAlphaRegionSslCertificates.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaSubnetworks.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
- typedObj := obj.ToAlpha()
- klog.V(5).Infof("MockAlphaRegionSslCertificates.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ typedObj := obj.ToBeta()
+ klog.V(5).Infof("MockBetaSubnetworks.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockAlphaRegionSslCertificates %v not found", key),
+ Message: fmt.Sprintf("MockBetaSubnetworks %v not found", key),
}
- klog.V(5).Infof("MockAlphaRegionSslCertificates.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaSubnetworks.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
// List all of the objects in the mock in the given region.
-func (m *MockAlphaRegionSslCertificates) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.SslCertificate, error) {
+func (m *MockBetaSubnetworks) List(ctx context.Context, region string, fl *filter.F) ([]*beta.Subnetwork, error) {
if m.ListHook != nil {
if intercept, objs, err := m.ListHook(ctx, region, fl, m); intercept {
- klog.V(5).Infof("MockAlphaRegionSslCertificates.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err)
+ klog.V(5).Infof("MockBetaSubnetworks.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err)
return objs, err
}
}
@@ -19390,31 +22341,31 @@ func (m *MockAlphaRegionSslCertificates) List(ctx context.Context, region string
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockAlphaRegionSslCertificates.List(%v, %q, %v) = nil, %v", ctx, region, fl, err)
+ klog.V(5).Infof("MockBetaSubnetworks.List(%v, %q, %v) = nil, %v", ctx, region, fl, err)
return nil, *m.ListError
}
- var objs []*alpha.SslCertificate
+ var objs []*beta.Subnetwork
for key, obj := range m.Objects {
if key.Region != region {
continue
}
- if !fl.Match(obj.ToAlpha()) {
+ if !fl.Match(obj.ToBeta()) {
continue
}
- objs = append(objs, obj.ToAlpha())
+ objs = append(objs, obj.ToBeta())
}
- klog.V(5).Infof("MockAlphaRegionSslCertificates.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs))
+ klog.V(5).Infof("MockBetaSubnetworks.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockAlphaRegionSslCertificates) Insert(ctx context.Context, key *meta.Key, obj *alpha.SslCertificate) error {
+func (m *MockBetaSubnetworks) Insert(ctx context.Context, key *meta.Key, obj *beta.Subnetwork) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockAlphaRegionSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaSubnetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -19426,32 +22377,32 @@ func (m *MockAlphaRegionSslCertificates) Insert(ctx context.Context, key *meta.K
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockAlphaRegionSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaSubnetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockAlphaRegionSslCertificates %v exists", key),
+ Message: fmt.Sprintf("MockBetaSubnetworks %v exists", key),
}
- klog.V(5).Infof("MockAlphaRegionSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaSubnetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "sslCertificates")
- obj.SelfLink = SelfLink(meta.VersionAlpha, projectID, "sslCertificates", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "beta", "subnetworks")
+ obj.SelfLink = SelfLink(meta.VersionBeta, projectID, "subnetworks", key)
- m.Objects[*key] = &MockRegionSslCertificatesObj{obj}
- klog.V(5).Infof("MockAlphaRegionSslCertificates.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ m.Objects[*key] = &MockSubnetworksObj{obj}
+ klog.V(5).Infof("MockBetaSubnetworks.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockAlphaRegionSslCertificates) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockBetaSubnetworks) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockAlphaRegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaSubnetworks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -19463,180 +22414,180 @@ func (m *MockAlphaRegionSslCertificates) Delete(ctx context.Context, key *meta.K
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockAlphaRegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaSubnetworks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockAlphaRegionSslCertificates %v not found", key),
+ Message: fmt.Sprintf("MockBetaSubnetworks %v not found", key),
}
- klog.V(5).Infof("MockAlphaRegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaSubnetworks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockAlphaRegionSslCertificates.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockBetaSubnetworks.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockAlphaRegionSslCertificates) Obj(o *alpha.SslCertificate) *MockRegionSslCertificatesObj {
- return &MockRegionSslCertificatesObj{o}
+func (m *MockBetaSubnetworks) Obj(o *beta.Subnetwork) *MockSubnetworksObj {
+ return &MockSubnetworksObj{o}
}
-// GCEAlphaRegionSslCertificates is a simplifying adapter for the GCE RegionSslCertificates.
-type GCEAlphaRegionSslCertificates struct {
+// GCEBetaSubnetworks is a simplifying adapter for the GCE Subnetworks.
+type GCEBetaSubnetworks struct {
s *Service
}
-// Get the SslCertificate named by key.
-func (g *GCEAlphaRegionSslCertificates) Get(ctx context.Context, key *meta.Key) (*alpha.SslCertificate, error) {
- klog.V(5).Infof("GCEAlphaRegionSslCertificates.Get(%v, %v): called", ctx, key)
+// Get the Subnetwork named by key.
+func (g *GCEBetaSubnetworks) Get(ctx context.Context, key *meta.Key) (*beta.Subnetwork, error) {
+ klog.V(5).Infof("GCEBetaSubnetworks.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaRegionSslCertificates.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaSubnetworks.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionSslCertificates")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Subnetworks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
- Version: meta.Version("alpha"),
- Service: "RegionSslCertificates",
+ Version: meta.Version("beta"),
+ Service: "Subnetworks",
}
- klog.V(5).Infof("GCEAlphaRegionSslCertificates.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaSubnetworks.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaRegionSslCertificates.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaSubnetworks.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.Alpha.RegionSslCertificates.Get(projectID, key.Region, key.Name)
+ call := g.s.Beta.Subnetworks.Get(projectID, key.Region, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEAlphaRegionSslCertificates.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEBetaSubnetworks.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
-// List all SslCertificate objects.
-func (g *GCEAlphaRegionSslCertificates) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.SslCertificate, error) {
- klog.V(5).Infof("GCEAlphaRegionSslCertificates.List(%v, %v, %v) called", ctx, region, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionSslCertificates")
+// List all Subnetwork objects.
+func (g *GCEBetaSubnetworks) List(ctx context.Context, region string, fl *filter.F) ([]*beta.Subnetwork, error) {
+ klog.V(5).Infof("GCEBetaSubnetworks.List(%v, %v, %v) called", ctx, region, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Subnetworks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
- Version: meta.Version("alpha"),
- Service: "RegionSslCertificates",
+ Version: meta.Version("beta"),
+ Service: "Subnetworks",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCEAlphaRegionSslCertificates.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk)
- call := g.s.Alpha.RegionSslCertificates.List(projectID, region)
+ klog.V(5).Infof("GCEBetaSubnetworks.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk)
+ call := g.s.Beta.Subnetworks.List(projectID, region)
if fl != filter.None {
call.Filter(fl.String())
}
- var all []*alpha.SslCertificate
- f := func(l *alpha.SslCertificateList) error {
- klog.V(5).Infof("GCEAlphaRegionSslCertificates.List(%v, ..., %v): page %+v", ctx, fl, l)
+ var all []*beta.Subnetwork
+ f := func(l *beta.SubnetworkList) error {
+ klog.V(5).Infof("GCEBetaSubnetworks.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEAlphaRegionSslCertificates.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEBetaSubnetworks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEAlphaRegionSslCertificates.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEBetaSubnetworks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEAlphaRegionSslCertificates.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEBetaSubnetworks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
-// Insert SslCertificate with key of value obj.
-func (g *GCEAlphaRegionSslCertificates) Insert(ctx context.Context, key *meta.Key, obj *alpha.SslCertificate) error {
- klog.V(5).Infof("GCEAlphaRegionSslCertificates.Insert(%v, %v, %+v): called", ctx, key, obj)
+// Insert Subnetwork with key of value obj.
+func (g *GCEBetaSubnetworks) Insert(ctx context.Context, key *meta.Key, obj *beta.Subnetwork) error {
+ klog.V(5).Infof("GCEBetaSubnetworks.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaRegionSslCertificates.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaSubnetworks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionSslCertificates")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Subnetworks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
- Version: meta.Version("alpha"),
- Service: "RegionSslCertificates",
+ Version: meta.Version("beta"),
+ Service: "Subnetworks",
}
- klog.V(5).Infof("GCEAlphaRegionSslCertificates.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaSubnetworks.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaRegionSslCertificates.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaSubnetworks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.Alpha.RegionSslCertificates.Insert(projectID, key.Region, obj)
+ call := g.s.Beta.Subnetworks.Insert(projectID, key.Region, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaRegionSslCertificates.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaSubnetworks.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaRegionSslCertificates.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCEBetaSubnetworks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
-// Delete the SslCertificate referenced by key.
-func (g *GCEAlphaRegionSslCertificates) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEAlphaRegionSslCertificates.Delete(%v, %v): called", ctx, key)
+// Delete the Subnetwork referenced by key.
+func (g *GCEBetaSubnetworks) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEBetaSubnetworks.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaRegionSslCertificates.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaSubnetworks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionSslCertificates")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Subnetworks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
- Version: meta.Version("alpha"),
- Service: "RegionSslCertificates",
+ Version: meta.Version("beta"),
+ Service: "Subnetworks",
}
- klog.V(5).Infof("GCEAlphaRegionSslCertificates.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaSubnetworks.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaRegionSslCertificates.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaSubnetworks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Alpha.RegionSslCertificates.Delete(projectID, key.Region, key.Name)
+ call := g.s.Beta.Subnetworks.Delete(projectID, key.Region, key.Name)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaRegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaSubnetworks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaRegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaSubnetworks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// BetaRegionSslCertificates is an interface that allows for mocking of RegionSslCertificates.
-type BetaRegionSslCertificates interface {
- Get(ctx context.Context, key *meta.Key) (*beta.SslCertificate, error)
- List(ctx context.Context, region string, fl *filter.F) ([]*beta.SslCertificate, error)
- Insert(ctx context.Context, key *meta.Key, obj *beta.SslCertificate) error
+// Subnetworks is an interface that allows for mocking of Subnetworks.
+type Subnetworks interface {
+ Get(ctx context.Context, key *meta.Key) (*ga.Subnetwork, error)
+ List(ctx context.Context, region string, fl *filter.F) ([]*ga.Subnetwork, error)
+ Insert(ctx context.Context, key *meta.Key, obj *ga.Subnetwork) error
Delete(ctx context.Context, key *meta.Key) error
}
-// NewMockBetaRegionSslCertificates returns a new mock for RegionSslCertificates.
-func NewMockBetaRegionSslCertificates(pr ProjectRouter, objs map[meta.Key]*MockRegionSslCertificatesObj) *MockBetaRegionSslCertificates {
- mock := &MockBetaRegionSslCertificates{
+// NewMockSubnetworks returns a new mock for Subnetworks.
+func NewMockSubnetworks(pr ProjectRouter, objs map[meta.Key]*MockSubnetworksObj) *MockSubnetworks {
+ mock := &MockSubnetworks{
ProjectRouter: pr,
Objects: objs,
@@ -19647,14 +22598,14 @@ func NewMockBetaRegionSslCertificates(pr ProjectRouter, objs map[meta.Key]*MockR
return mock
}
-// MockBetaRegionSslCertificates is the mock for RegionSslCertificates.
-type MockBetaRegionSslCertificates struct {
+// MockSubnetworks is the mock for Subnetworks.
+type MockSubnetworks struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
// Objects maintained by the mock.
- Objects map[meta.Key]*MockRegionSslCertificatesObj
+ Objects map[meta.Key]*MockSubnetworksObj
// If an entry exists for the given key and operation, then the error
// will be returned instead of the operation.
@@ -19667,10 +22618,10 @@ type MockBetaRegionSslCertificates struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockBetaRegionSslCertificates) (bool, *beta.SslCertificate, error)
- ListHook func(ctx context.Context, region string, fl *filter.F, m *MockBetaRegionSslCertificates) (bool, []*beta.SslCertificate, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *beta.SslCertificate, m *MockBetaRegionSslCertificates) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaRegionSslCertificates) (bool, error)
+ GetHook func(ctx context.Context, key *meta.Key, m *MockSubnetworks) (bool, *ga.Subnetwork, error)
+ ListHook func(ctx context.Context, region string, fl *filter.F, m *MockSubnetworks) (bool, []*ga.Subnetwork, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *ga.Subnetwork, m *MockSubnetworks) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockSubnetworks) (bool, error)
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -19678,10 +22629,10 @@ type MockBetaRegionSslCertificates struct {
}
// Get returns the object from the mock.
-func (m *MockBetaRegionSslCertificates) Get(ctx context.Context, key *meta.Key) (*beta.SslCertificate, error) {
+func (m *MockSubnetworks) Get(ctx context.Context, key *meta.Key) (*ga.Subnetwork, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockBetaRegionSslCertificates.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockSubnetworks.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -19693,28 +22644,28 @@ func (m *MockBetaRegionSslCertificates) Get(ctx context.Context, key *meta.Key)
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockBetaRegionSslCertificates.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockSubnetworks.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
- typedObj := obj.ToBeta()
- klog.V(5).Infof("MockBetaRegionSslCertificates.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ typedObj := obj.ToGA()
+ klog.V(5).Infof("MockSubnetworks.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockBetaRegionSslCertificates %v not found", key),
+ Message: fmt.Sprintf("MockSubnetworks %v not found", key),
}
- klog.V(5).Infof("MockBetaRegionSslCertificates.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockSubnetworks.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
// List all of the objects in the mock in the given region.
-func (m *MockBetaRegionSslCertificates) List(ctx context.Context, region string, fl *filter.F) ([]*beta.SslCertificate, error) {
+func (m *MockSubnetworks) List(ctx context.Context, region string, fl *filter.F) ([]*ga.Subnetwork, error) {
if m.ListHook != nil {
if intercept, objs, err := m.ListHook(ctx, region, fl, m); intercept {
- klog.V(5).Infof("MockBetaRegionSslCertificates.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err)
+ klog.V(5).Infof("MockSubnetworks.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err)
return objs, err
}
}
@@ -19724,31 +22675,31 @@ func (m *MockBetaRegionSslCertificates) List(ctx context.Context, region string,
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockBetaRegionSslCertificates.List(%v, %q, %v) = nil, %v", ctx, region, fl, err)
+ klog.V(5).Infof("MockSubnetworks.List(%v, %q, %v) = nil, %v", ctx, region, fl, err)
return nil, *m.ListError
}
- var objs []*beta.SslCertificate
+ var objs []*ga.Subnetwork
for key, obj := range m.Objects {
if key.Region != region {
continue
}
- if !fl.Match(obj.ToBeta()) {
+ if !fl.Match(obj.ToGA()) {
continue
}
- objs = append(objs, obj.ToBeta())
+ objs = append(objs, obj.ToGA())
}
- klog.V(5).Infof("MockBetaRegionSslCertificates.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs))
+ klog.V(5).Infof("MockSubnetworks.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockBetaRegionSslCertificates) Insert(ctx context.Context, key *meta.Key, obj *beta.SslCertificate) error {
+func (m *MockSubnetworks) Insert(ctx context.Context, key *meta.Key, obj *ga.Subnetwork) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockBetaRegionSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockSubnetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -19760,32 +22711,32 @@ func (m *MockBetaRegionSslCertificates) Insert(ctx context.Context, key *meta.Ke
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockBetaRegionSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockSubnetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockBetaRegionSslCertificates %v exists", key),
+ Message: fmt.Sprintf("MockSubnetworks %v exists", key),
}
- klog.V(5).Infof("MockBetaRegionSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockSubnetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "beta", "sslCertificates")
- obj.SelfLink = SelfLink(meta.VersionBeta, projectID, "sslCertificates", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "ga", "subnetworks")
+ obj.SelfLink = SelfLink(meta.VersionGA, projectID, "subnetworks", key)
- m.Objects[*key] = &MockRegionSslCertificatesObj{obj}
- klog.V(5).Infof("MockBetaRegionSslCertificates.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ m.Objects[*key] = &MockSubnetworksObj{obj}
+ klog.V(5).Infof("MockSubnetworks.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockBetaRegionSslCertificates) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockSubnetworks) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockBetaRegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockSubnetworks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -19797,180 +22748,181 @@ func (m *MockBetaRegionSslCertificates) Delete(ctx context.Context, key *meta.Ke
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockBetaRegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockSubnetworks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockBetaRegionSslCertificates %v not found", key),
+ Message: fmt.Sprintf("MockSubnetworks %v not found", key),
}
- klog.V(5).Infof("MockBetaRegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockSubnetworks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockBetaRegionSslCertificates.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockSubnetworks.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockBetaRegionSslCertificates) Obj(o *beta.SslCertificate) *MockRegionSslCertificatesObj {
- return &MockRegionSslCertificatesObj{o}
+func (m *MockSubnetworks) Obj(o *ga.Subnetwork) *MockSubnetworksObj {
+ return &MockSubnetworksObj{o}
}
-// GCEBetaRegionSslCertificates is a simplifying adapter for the GCE RegionSslCertificates.
-type GCEBetaRegionSslCertificates struct {
+// GCESubnetworks is a simplifying adapter for the GCE Subnetworks.
+type GCESubnetworks struct {
s *Service
}
-// Get the SslCertificate named by key.
-func (g *GCEBetaRegionSslCertificates) Get(ctx context.Context, key *meta.Key) (*beta.SslCertificate, error) {
- klog.V(5).Infof("GCEBetaRegionSslCertificates.Get(%v, %v): called", ctx, key)
+// Get the Subnetwork named by key.
+func (g *GCESubnetworks) Get(ctx context.Context, key *meta.Key) (*ga.Subnetwork, error) {
+ klog.V(5).Infof("GCESubnetworks.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaRegionSslCertificates.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCESubnetworks.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionSslCertificates")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Subnetworks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
- Version: meta.Version("beta"),
- Service: "RegionSslCertificates",
+ Version: meta.Version("ga"),
+ Service: "Subnetworks",
}
- klog.V(5).Infof("GCEBetaRegionSslCertificates.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCESubnetworks.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaRegionSslCertificates.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCESubnetworks.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.Beta.RegionSslCertificates.Get(projectID, key.Region, key.Name)
+ call := g.s.GA.Subnetworks.Get(projectID, key.Region, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEBetaRegionSslCertificates.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCESubnetworks.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
-// List all SslCertificate objects.
-func (g *GCEBetaRegionSslCertificates) List(ctx context.Context, region string, fl *filter.F) ([]*beta.SslCertificate, error) {
- klog.V(5).Infof("GCEBetaRegionSslCertificates.List(%v, %v, %v) called", ctx, region, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionSslCertificates")
+// List all Subnetwork objects.
+func (g *GCESubnetworks) List(ctx context.Context, region string, fl *filter.F) ([]*ga.Subnetwork, error) {
+ klog.V(5).Infof("GCESubnetworks.List(%v, %v, %v) called", ctx, region, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Subnetworks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
- Version: meta.Version("beta"),
- Service: "RegionSslCertificates",
+ Version: meta.Version("ga"),
+ Service: "Subnetworks",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCEBetaRegionSslCertificates.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk)
- call := g.s.Beta.RegionSslCertificates.List(projectID, region)
+ klog.V(5).Infof("GCESubnetworks.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk)
+ call := g.s.GA.Subnetworks.List(projectID, region)
if fl != filter.None {
call.Filter(fl.String())
}
- var all []*beta.SslCertificate
- f := func(l *beta.SslCertificateList) error {
- klog.V(5).Infof("GCEBetaRegionSslCertificates.List(%v, ..., %v): page %+v", ctx, fl, l)
+ var all []*ga.Subnetwork
+ f := func(l *ga.SubnetworkList) error {
+ klog.V(5).Infof("GCESubnetworks.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEBetaRegionSslCertificates.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCESubnetworks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEBetaRegionSslCertificates.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCESubnetworks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEBetaRegionSslCertificates.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCESubnetworks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
-// Insert SslCertificate with key of value obj.
-func (g *GCEBetaRegionSslCertificates) Insert(ctx context.Context, key *meta.Key, obj *beta.SslCertificate) error {
- klog.V(5).Infof("GCEBetaRegionSslCertificates.Insert(%v, %v, %+v): called", ctx, key, obj)
+// Insert Subnetwork with key of value obj.
+func (g *GCESubnetworks) Insert(ctx context.Context, key *meta.Key, obj *ga.Subnetwork) error {
+ klog.V(5).Infof("GCESubnetworks.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaRegionSslCertificates.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCESubnetworks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionSslCertificates")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Subnetworks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
- Version: meta.Version("beta"),
- Service: "RegionSslCertificates",
+ Version: meta.Version("ga"),
+ Service: "Subnetworks",
}
- klog.V(5).Infof("GCEBetaRegionSslCertificates.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCESubnetworks.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaRegionSslCertificates.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCESubnetworks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.Beta.RegionSslCertificates.Insert(projectID, key.Region, obj)
+ call := g.s.GA.Subnetworks.Insert(projectID, key.Region, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaRegionSslCertificates.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCESubnetworks.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaRegionSslCertificates.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCESubnetworks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
-// Delete the SslCertificate referenced by key.
-func (g *GCEBetaRegionSslCertificates) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEBetaRegionSslCertificates.Delete(%v, %v): called", ctx, key)
+// Delete the Subnetwork referenced by key.
+func (g *GCESubnetworks) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCESubnetworks.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaRegionSslCertificates.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCESubnetworks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionSslCertificates")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Subnetworks")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
- Version: meta.Version("beta"),
- Service: "RegionSslCertificates",
+ Version: meta.Version("ga"),
+ Service: "Subnetworks",
}
- klog.V(5).Infof("GCEBetaRegionSslCertificates.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCESubnetworks.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaRegionSslCertificates.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCESubnetworks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Beta.RegionSslCertificates.Delete(projectID, key.Region, key.Name)
+ call := g.s.GA.Subnetworks.Delete(projectID, key.Region, key.Name)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaRegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCESubnetworks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaRegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCESubnetworks.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// AlphaSubnetworks is an interface that allows for mocking of Subnetworks.
-type AlphaSubnetworks interface {
- Get(ctx context.Context, key *meta.Key) (*alpha.Subnetwork, error)
- List(ctx context.Context, region string, fl *filter.F) ([]*alpha.Subnetwork, error)
- Insert(ctx context.Context, key *meta.Key, obj *alpha.Subnetwork) error
+// AlphaTargetHttpProxies is an interface that allows for mocking of TargetHttpProxies.
+type AlphaTargetHttpProxies interface {
+ Get(ctx context.Context, key *meta.Key) (*alpha.TargetHttpProxy, error)
+ List(ctx context.Context, fl *filter.F) ([]*alpha.TargetHttpProxy, error)
+ Insert(ctx context.Context, key *meta.Key, obj *alpha.TargetHttpProxy) error
Delete(ctx context.Context, key *meta.Key) error
+ SetUrlMap(context.Context, *meta.Key, *alpha.UrlMapReference) error
}
-// NewMockAlphaSubnetworks returns a new mock for Subnetworks.
-func NewMockAlphaSubnetworks(pr ProjectRouter, objs map[meta.Key]*MockSubnetworksObj) *MockAlphaSubnetworks {
- mock := &MockAlphaSubnetworks{
+// NewMockAlphaTargetHttpProxies returns a new mock for TargetHttpProxies.
+func NewMockAlphaTargetHttpProxies(pr ProjectRouter, objs map[meta.Key]*MockTargetHttpProxiesObj) *MockAlphaTargetHttpProxies {
+ mock := &MockAlphaTargetHttpProxies{
ProjectRouter: pr,
Objects: objs,
@@ -19981,14 +22933,14 @@ func NewMockAlphaSubnetworks(pr ProjectRouter, objs map[meta.Key]*MockSubnetwork
return mock
}
-// MockAlphaSubnetworks is the mock for Subnetworks.
-type MockAlphaSubnetworks struct {
+// MockAlphaTargetHttpProxies is the mock for TargetHttpProxies.
+type MockAlphaTargetHttpProxies struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
// Objects maintained by the mock.
- Objects map[meta.Key]*MockSubnetworksObj
+ Objects map[meta.Key]*MockTargetHttpProxiesObj
// If an entry exists for the given key and operation, then the error
// will be returned instead of the operation.
@@ -20001,10 +22953,11 @@ type MockAlphaSubnetworks struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaSubnetworks) (bool, *alpha.Subnetwork, error)
- ListHook func(ctx context.Context, region string, fl *filter.F, m *MockAlphaSubnetworks) (bool, []*alpha.Subnetwork, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *alpha.Subnetwork, m *MockAlphaSubnetworks) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaSubnetworks) (bool, error)
+ GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaTargetHttpProxies) (bool, *alpha.TargetHttpProxy, error)
+ ListHook func(ctx context.Context, fl *filter.F, m *MockAlphaTargetHttpProxies) (bool, []*alpha.TargetHttpProxy, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *alpha.TargetHttpProxy, m *MockAlphaTargetHttpProxies) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaTargetHttpProxies) (bool, error)
+ SetUrlMapHook func(context.Context, *meta.Key, *alpha.UrlMapReference, *MockAlphaTargetHttpProxies) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -20012,10 +22965,10 @@ type MockAlphaSubnetworks struct {
}
// Get returns the object from the mock.
-func (m *MockAlphaSubnetworks) Get(ctx context.Context, key *meta.Key) (*alpha.Subnetwork, error) {
+func (m *MockAlphaTargetHttpProxies) Get(ctx context.Context, key *meta.Key) (*alpha.TargetHttpProxy, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockAlphaSubnetworks.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaTargetHttpProxies.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -20027,28 +22980,28 @@ func (m *MockAlphaSubnetworks) Get(ctx context.Context, key *meta.Key) (*alpha.S
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockAlphaSubnetworks.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaTargetHttpProxies.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
typedObj := obj.ToAlpha()
- klog.V(5).Infof("MockAlphaSubnetworks.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ klog.V(5).Infof("MockAlphaTargetHttpProxies.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockAlphaSubnetworks %v not found", key),
+ Message: fmt.Sprintf("MockAlphaTargetHttpProxies %v not found", key),
}
- klog.V(5).Infof("MockAlphaSubnetworks.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaTargetHttpProxies.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
-// List all of the objects in the mock in the given region.
-func (m *MockAlphaSubnetworks) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.Subnetwork, error) {
+// List all of the objects in the mock.
+func (m *MockAlphaTargetHttpProxies) List(ctx context.Context, fl *filter.F) ([]*alpha.TargetHttpProxy, error) {
if m.ListHook != nil {
- if intercept, objs, err := m.ListHook(ctx, region, fl, m); intercept {
- klog.V(5).Infof("MockAlphaSubnetworks.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err)
+ if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
+ klog.V(5).Infof("MockAlphaTargetHttpProxies.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
return objs, err
}
}
@@ -20058,31 +23011,28 @@ func (m *MockAlphaSubnetworks) List(ctx context.Context, region string, fl *filt
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockAlphaSubnetworks.List(%v, %q, %v) = nil, %v", ctx, region, fl, err)
+ klog.V(5).Infof("MockAlphaTargetHttpProxies.List(%v, %v) = nil, %v", ctx, fl, err)
return nil, *m.ListError
}
- var objs []*alpha.Subnetwork
- for key, obj := range m.Objects {
- if key.Region != region {
- continue
- }
+ var objs []*alpha.TargetHttpProxy
+ for _, obj := range m.Objects {
if !fl.Match(obj.ToAlpha()) {
continue
}
objs = append(objs, obj.ToAlpha())
}
- klog.V(5).Infof("MockAlphaSubnetworks.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs))
+ klog.V(5).Infof("MockAlphaTargetHttpProxies.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockAlphaSubnetworks) Insert(ctx context.Context, key *meta.Key, obj *alpha.Subnetwork) error {
+func (m *MockAlphaTargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *alpha.TargetHttpProxy) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockAlphaSubnetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -20094,32 +23044,32 @@ func (m *MockAlphaSubnetworks) Insert(ctx context.Context, key *meta.Key, obj *a
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockAlphaSubnetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockAlphaSubnetworks %v exists", key),
+ Message: fmt.Sprintf("MockAlphaTargetHttpProxies %v exists", key),
}
- klog.V(5).Infof("MockAlphaSubnetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "subnetworks")
- obj.SelfLink = SelfLink(meta.VersionAlpha, projectID, "subnetworks", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "targetHttpProxies")
+ obj.SelfLink = SelfLink(meta.VersionAlpha, projectID, "targetHttpProxies", key)
- m.Objects[*key] = &MockSubnetworksObj{obj}
- klog.V(5).Infof("MockAlphaSubnetworks.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ m.Objects[*key] = &MockTargetHttpProxiesObj{obj}
+ klog.V(5).Infof("MockAlphaTargetHttpProxies.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockAlphaSubnetworks) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockAlphaTargetHttpProxies) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockAlphaSubnetworks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -20131,180 +23081,223 @@ func (m *MockAlphaSubnetworks) Delete(ctx context.Context, key *meta.Key) error
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockAlphaSubnetworks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockAlphaSubnetworks %v not found", key),
+ Message: fmt.Sprintf("MockAlphaTargetHttpProxies %v not found", key),
}
- klog.V(5).Infof("MockAlphaSubnetworks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockAlphaSubnetworks.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockAlphaTargetHttpProxies.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockAlphaSubnetworks) Obj(o *alpha.Subnetwork) *MockSubnetworksObj {
- return &MockSubnetworksObj{o}
+func (m *MockAlphaTargetHttpProxies) Obj(o *alpha.TargetHttpProxy) *MockTargetHttpProxiesObj {
+ return &MockTargetHttpProxiesObj{o}
}
-// GCEAlphaSubnetworks is a simplifying adapter for the GCE Subnetworks.
-type GCEAlphaSubnetworks struct {
+// SetUrlMap is a mock for the corresponding method.
+func (m *MockAlphaTargetHttpProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *alpha.UrlMapReference) error {
+ if m.SetUrlMapHook != nil {
+ return m.SetUrlMapHook(ctx, key, arg0, m)
+ }
+ return nil
+}
+
+// GCEAlphaTargetHttpProxies is a simplifying adapter for the GCE TargetHttpProxies.
+type GCEAlphaTargetHttpProxies struct {
s *Service
}
-// Get the Subnetwork named by key.
-func (g *GCEAlphaSubnetworks) Get(ctx context.Context, key *meta.Key) (*alpha.Subnetwork, error) {
- klog.V(5).Infof("GCEAlphaSubnetworks.Get(%v, %v): called", ctx, key)
+// Get the TargetHttpProxy named by key.
+func (g *GCEAlphaTargetHttpProxies) Get(ctx context.Context, key *meta.Key) (*alpha.TargetHttpProxy, error) {
+ klog.V(5).Infof("GCEAlphaTargetHttpProxies.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaSubnetworks.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaTargetHttpProxies.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Subnetworks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "TargetHttpProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
Version: meta.Version("alpha"),
- Service: "Subnetworks",
+ Service: "TargetHttpProxies",
}
- klog.V(5).Infof("GCEAlphaSubnetworks.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaTargetHttpProxies.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaSubnetworks.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaTargetHttpProxies.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.Alpha.Subnetworks.Get(projectID, key.Region, key.Name)
+ call := g.s.Alpha.TargetHttpProxies.Get(projectID, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEAlphaSubnetworks.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEAlphaTargetHttpProxies.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
-// List all Subnetwork objects.
-func (g *GCEAlphaSubnetworks) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.Subnetwork, error) {
- klog.V(5).Infof("GCEAlphaSubnetworks.List(%v, %v, %v) called", ctx, region, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Subnetworks")
+// List all TargetHttpProxy objects.
+func (g *GCEAlphaTargetHttpProxies) List(ctx context.Context, fl *filter.F) ([]*alpha.TargetHttpProxy, error) {
+ klog.V(5).Infof("GCEAlphaTargetHttpProxies.List(%v, %v) called", ctx, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "TargetHttpProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
Version: meta.Version("alpha"),
- Service: "Subnetworks",
+ Service: "TargetHttpProxies",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCEAlphaSubnetworks.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk)
- call := g.s.Alpha.Subnetworks.List(projectID, region)
+ klog.V(5).Infof("GCEAlphaTargetHttpProxies.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
+ call := g.s.Alpha.TargetHttpProxies.List(projectID)
if fl != filter.None {
call.Filter(fl.String())
}
- var all []*alpha.Subnetwork
- f := func(l *alpha.SubnetworkList) error {
- klog.V(5).Infof("GCEAlphaSubnetworks.List(%v, ..., %v): page %+v", ctx, fl, l)
+ var all []*alpha.TargetHttpProxy
+ f := func(l *alpha.TargetHttpProxyList) error {
+ klog.V(5).Infof("GCEAlphaTargetHttpProxies.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEAlphaSubnetworks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEAlphaTargetHttpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEAlphaSubnetworks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEAlphaTargetHttpProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEAlphaSubnetworks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEAlphaTargetHttpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
-// Insert Subnetwork with key of value obj.
-func (g *GCEAlphaSubnetworks) Insert(ctx context.Context, key *meta.Key, obj *alpha.Subnetwork) error {
- klog.V(5).Infof("GCEAlphaSubnetworks.Insert(%v, %v, %+v): called", ctx, key, obj)
+// Insert TargetHttpProxy with key of value obj.
+func (g *GCEAlphaTargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *alpha.TargetHttpProxy) error {
+ klog.V(5).Infof("GCEAlphaTargetHttpProxies.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaSubnetworks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaTargetHttpProxies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Subnetworks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "TargetHttpProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
Version: meta.Version("alpha"),
- Service: "Subnetworks",
+ Service: "TargetHttpProxies",
}
- klog.V(5).Infof("GCEAlphaSubnetworks.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaTargetHttpProxies.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaSubnetworks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaTargetHttpProxies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.Alpha.Subnetworks.Insert(projectID, key.Region, obj)
+ call := g.s.Alpha.TargetHttpProxies.Insert(projectID, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaSubnetworks.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaTargetHttpProxies.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaSubnetworks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCEAlphaTargetHttpProxies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
-// Delete the Subnetwork referenced by key.
-func (g *GCEAlphaSubnetworks) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEAlphaSubnetworks.Delete(%v, %v): called", ctx, key)
+// Delete the TargetHttpProxy referenced by key.
+func (g *GCEAlphaTargetHttpProxies) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEAlphaTargetHttpProxies.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaSubnetworks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaTargetHttpProxies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Subnetworks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "TargetHttpProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
Version: meta.Version("alpha"),
- Service: "Subnetworks",
+ Service: "TargetHttpProxies",
}
- klog.V(5).Infof("GCEAlphaSubnetworks.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaTargetHttpProxies.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaSubnetworks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaTargetHttpProxies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Alpha.Subnetworks.Delete(projectID, key.Region, key.Name)
+ call := g.s.Alpha.TargetHttpProxies.Delete(projectID, key.Name)
+
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaSubnetworks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaSubnetworks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// BetaSubnetworks is an interface that allows for mocking of Subnetworks.
-type BetaSubnetworks interface {
- Get(ctx context.Context, key *meta.Key) (*beta.Subnetwork, error)
- List(ctx context.Context, region string, fl *filter.F) ([]*beta.Subnetwork, error)
- Insert(ctx context.Context, key *meta.Key, obj *beta.Subnetwork) error
+// SetUrlMap is a method on GCEAlphaTargetHttpProxies.
+func (g *GCEAlphaTargetHttpProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *alpha.UrlMapReference) error {
+ klog.V(5).Infof("GCEAlphaTargetHttpProxies.SetUrlMap(%v, %v, ...): called", ctx, key)
+
+ if !key.Valid() {
+ klog.V(2).Infof("GCEAlphaTargetHttpProxies.SetUrlMap(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "TargetHttpProxies")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "SetUrlMap",
+ Version: meta.Version("alpha"),
+ Service: "TargetHttpProxies",
+ }
+ klog.V(5).Infof("GCEAlphaTargetHttpProxies.SetUrlMap(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCEAlphaTargetHttpProxies.SetUrlMap(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ return err
+ }
+ call := g.s.Alpha.TargetHttpProxies.SetUrlMap(projectID, key.Name, arg0)
+ call.Context(ctx)
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCEAlphaTargetHttpProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+ }
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCEAlphaTargetHttpProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+}
+
+// BetaTargetHttpProxies is an interface that allows for mocking of TargetHttpProxies.
+type BetaTargetHttpProxies interface {
+ Get(ctx context.Context, key *meta.Key) (*beta.TargetHttpProxy, error)
+ List(ctx context.Context, fl *filter.F) ([]*beta.TargetHttpProxy, error)
+ Insert(ctx context.Context, key *meta.Key, obj *beta.TargetHttpProxy) error
Delete(ctx context.Context, key *meta.Key) error
+ SetUrlMap(context.Context, *meta.Key, *beta.UrlMapReference) error
}
-// NewMockBetaSubnetworks returns a new mock for Subnetworks.
-func NewMockBetaSubnetworks(pr ProjectRouter, objs map[meta.Key]*MockSubnetworksObj) *MockBetaSubnetworks {
- mock := &MockBetaSubnetworks{
+// NewMockBetaTargetHttpProxies returns a new mock for TargetHttpProxies.
+func NewMockBetaTargetHttpProxies(pr ProjectRouter, objs map[meta.Key]*MockTargetHttpProxiesObj) *MockBetaTargetHttpProxies {
+ mock := &MockBetaTargetHttpProxies{
ProjectRouter: pr,
Objects: objs,
@@ -20315,14 +23308,14 @@ func NewMockBetaSubnetworks(pr ProjectRouter, objs map[meta.Key]*MockSubnetworks
return mock
}
-// MockBetaSubnetworks is the mock for Subnetworks.
-type MockBetaSubnetworks struct {
+// MockBetaTargetHttpProxies is the mock for TargetHttpProxies.
+type MockBetaTargetHttpProxies struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
// Objects maintained by the mock.
- Objects map[meta.Key]*MockSubnetworksObj
+ Objects map[meta.Key]*MockTargetHttpProxiesObj
// If an entry exists for the given key and operation, then the error
// will be returned instead of the operation.
@@ -20335,10 +23328,11 @@ type MockBetaSubnetworks struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockBetaSubnetworks) (bool, *beta.Subnetwork, error)
- ListHook func(ctx context.Context, region string, fl *filter.F, m *MockBetaSubnetworks) (bool, []*beta.Subnetwork, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *beta.Subnetwork, m *MockBetaSubnetworks) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaSubnetworks) (bool, error)
+ GetHook func(ctx context.Context, key *meta.Key, m *MockBetaTargetHttpProxies) (bool, *beta.TargetHttpProxy, error)
+ ListHook func(ctx context.Context, fl *filter.F, m *MockBetaTargetHttpProxies) (bool, []*beta.TargetHttpProxy, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *beta.TargetHttpProxy, m *MockBetaTargetHttpProxies) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaTargetHttpProxies) (bool, error)
+ SetUrlMapHook func(context.Context, *meta.Key, *beta.UrlMapReference, *MockBetaTargetHttpProxies) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -20346,10 +23340,10 @@ type MockBetaSubnetworks struct {
}
// Get returns the object from the mock.
-func (m *MockBetaSubnetworks) Get(ctx context.Context, key *meta.Key) (*beta.Subnetwork, error) {
+func (m *MockBetaTargetHttpProxies) Get(ctx context.Context, key *meta.Key) (*beta.TargetHttpProxy, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockBetaSubnetworks.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaTargetHttpProxies.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -20361,28 +23355,28 @@ func (m *MockBetaSubnetworks) Get(ctx context.Context, key *meta.Key) (*beta.Sub
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockBetaSubnetworks.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaTargetHttpProxies.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
typedObj := obj.ToBeta()
- klog.V(5).Infof("MockBetaSubnetworks.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ klog.V(5).Infof("MockBetaTargetHttpProxies.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockBetaSubnetworks %v not found", key),
+ Message: fmt.Sprintf("MockBetaTargetHttpProxies %v not found", key),
}
- klog.V(5).Infof("MockBetaSubnetworks.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaTargetHttpProxies.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
-// List all of the objects in the mock in the given region.
-func (m *MockBetaSubnetworks) List(ctx context.Context, region string, fl *filter.F) ([]*beta.Subnetwork, error) {
+// List all of the objects in the mock.
+func (m *MockBetaTargetHttpProxies) List(ctx context.Context, fl *filter.F) ([]*beta.TargetHttpProxy, error) {
if m.ListHook != nil {
- if intercept, objs, err := m.ListHook(ctx, region, fl, m); intercept {
- klog.V(5).Infof("MockBetaSubnetworks.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err)
+ if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
+ klog.V(5).Infof("MockBetaTargetHttpProxies.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
return objs, err
}
}
@@ -20392,31 +23386,28 @@ func (m *MockBetaSubnetworks) List(ctx context.Context, region string, fl *filte
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockBetaSubnetworks.List(%v, %q, %v) = nil, %v", ctx, region, fl, err)
+ klog.V(5).Infof("MockBetaTargetHttpProxies.List(%v, %v) = nil, %v", ctx, fl, err)
return nil, *m.ListError
}
- var objs []*beta.Subnetwork
- for key, obj := range m.Objects {
- if key.Region != region {
- continue
- }
+ var objs []*beta.TargetHttpProxy
+ for _, obj := range m.Objects {
if !fl.Match(obj.ToBeta()) {
continue
}
objs = append(objs, obj.ToBeta())
}
- klog.V(5).Infof("MockBetaSubnetworks.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs))
+ klog.V(5).Infof("MockBetaTargetHttpProxies.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockBetaSubnetworks) Insert(ctx context.Context, key *meta.Key, obj *beta.Subnetwork) error {
+func (m *MockBetaTargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *beta.TargetHttpProxy) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockBetaSubnetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -20428,32 +23419,32 @@ func (m *MockBetaSubnetworks) Insert(ctx context.Context, key *meta.Key, obj *be
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockBetaSubnetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockBetaSubnetworks %v exists", key),
+ Message: fmt.Sprintf("MockBetaTargetHttpProxies %v exists", key),
}
- klog.V(5).Infof("MockBetaSubnetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "beta", "subnetworks")
- obj.SelfLink = SelfLink(meta.VersionBeta, projectID, "subnetworks", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "beta", "targetHttpProxies")
+ obj.SelfLink = SelfLink(meta.VersionBeta, projectID, "targetHttpProxies", key)
- m.Objects[*key] = &MockSubnetworksObj{obj}
- klog.V(5).Infof("MockBetaSubnetworks.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ m.Objects[*key] = &MockTargetHttpProxiesObj{obj}
+ klog.V(5).Infof("MockBetaTargetHttpProxies.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockBetaSubnetworks) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockBetaTargetHttpProxies) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockBetaSubnetworks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -20465,180 +23456,223 @@ func (m *MockBetaSubnetworks) Delete(ctx context.Context, key *meta.Key) error {
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockBetaSubnetworks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockBetaSubnetworks %v not found", key),
+ Message: fmt.Sprintf("MockBetaTargetHttpProxies %v not found", key),
}
- klog.V(5).Infof("MockBetaSubnetworks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockBetaSubnetworks.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockBetaTargetHttpProxies.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockBetaSubnetworks) Obj(o *beta.Subnetwork) *MockSubnetworksObj {
- return &MockSubnetworksObj{o}
+func (m *MockBetaTargetHttpProxies) Obj(o *beta.TargetHttpProxy) *MockTargetHttpProxiesObj {
+ return &MockTargetHttpProxiesObj{o}
}
-// GCEBetaSubnetworks is a simplifying adapter for the GCE Subnetworks.
-type GCEBetaSubnetworks struct {
+// SetUrlMap is a mock for the corresponding method.
+func (m *MockBetaTargetHttpProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *beta.UrlMapReference) error {
+ if m.SetUrlMapHook != nil {
+ return m.SetUrlMapHook(ctx, key, arg0, m)
+ }
+ return nil
+}
+
+// GCEBetaTargetHttpProxies is a simplifying adapter for the GCE TargetHttpProxies.
+type GCEBetaTargetHttpProxies struct {
s *Service
}
-// Get the Subnetwork named by key.
-func (g *GCEBetaSubnetworks) Get(ctx context.Context, key *meta.Key) (*beta.Subnetwork, error) {
- klog.V(5).Infof("GCEBetaSubnetworks.Get(%v, %v): called", ctx, key)
+// Get the TargetHttpProxy named by key.
+func (g *GCEBetaTargetHttpProxies) Get(ctx context.Context, key *meta.Key) (*beta.TargetHttpProxy, error) {
+ klog.V(5).Infof("GCEBetaTargetHttpProxies.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaSubnetworks.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaTargetHttpProxies.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Subnetworks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "TargetHttpProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
Version: meta.Version("beta"),
- Service: "Subnetworks",
+ Service: "TargetHttpProxies",
}
- klog.V(5).Infof("GCEBetaSubnetworks.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaTargetHttpProxies.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaSubnetworks.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaTargetHttpProxies.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.Beta.Subnetworks.Get(projectID, key.Region, key.Name)
+ call := g.s.Beta.TargetHttpProxies.Get(projectID, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEBetaSubnetworks.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEBetaTargetHttpProxies.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
-// List all Subnetwork objects.
-func (g *GCEBetaSubnetworks) List(ctx context.Context, region string, fl *filter.F) ([]*beta.Subnetwork, error) {
- klog.V(5).Infof("GCEBetaSubnetworks.List(%v, %v, %v) called", ctx, region, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Subnetworks")
+// List all TargetHttpProxy objects.
+func (g *GCEBetaTargetHttpProxies) List(ctx context.Context, fl *filter.F) ([]*beta.TargetHttpProxy, error) {
+ klog.V(5).Infof("GCEBetaTargetHttpProxies.List(%v, %v) called", ctx, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "TargetHttpProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
Version: meta.Version("beta"),
- Service: "Subnetworks",
+ Service: "TargetHttpProxies",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCEBetaSubnetworks.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk)
- call := g.s.Beta.Subnetworks.List(projectID, region)
+ klog.V(5).Infof("GCEBetaTargetHttpProxies.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
+ call := g.s.Beta.TargetHttpProxies.List(projectID)
if fl != filter.None {
call.Filter(fl.String())
}
- var all []*beta.Subnetwork
- f := func(l *beta.SubnetworkList) error {
- klog.V(5).Infof("GCEBetaSubnetworks.List(%v, ..., %v): page %+v", ctx, fl, l)
+ var all []*beta.TargetHttpProxy
+ f := func(l *beta.TargetHttpProxyList) error {
+ klog.V(5).Infof("GCEBetaTargetHttpProxies.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEBetaSubnetworks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEBetaTargetHttpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEBetaSubnetworks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEBetaTargetHttpProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEBetaSubnetworks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEBetaTargetHttpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
-// Insert Subnetwork with key of value obj.
-func (g *GCEBetaSubnetworks) Insert(ctx context.Context, key *meta.Key, obj *beta.Subnetwork) error {
- klog.V(5).Infof("GCEBetaSubnetworks.Insert(%v, %v, %+v): called", ctx, key, obj)
+// Insert TargetHttpProxy with key of value obj.
+func (g *GCEBetaTargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *beta.TargetHttpProxy) error {
+ klog.V(5).Infof("GCEBetaTargetHttpProxies.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaSubnetworks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaTargetHttpProxies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Subnetworks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "TargetHttpProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
Version: meta.Version("beta"),
- Service: "Subnetworks",
+ Service: "TargetHttpProxies",
}
- klog.V(5).Infof("GCEBetaSubnetworks.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaTargetHttpProxies.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaSubnetworks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaTargetHttpProxies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.Beta.Subnetworks.Insert(projectID, key.Region, obj)
+ call := g.s.Beta.TargetHttpProxies.Insert(projectID, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaSubnetworks.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaTargetHttpProxies.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaSubnetworks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCEBetaTargetHttpProxies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
-// Delete the Subnetwork referenced by key.
-func (g *GCEBetaSubnetworks) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEBetaSubnetworks.Delete(%v, %v): called", ctx, key)
+// Delete the TargetHttpProxy referenced by key.
+func (g *GCEBetaTargetHttpProxies) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEBetaTargetHttpProxies.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaSubnetworks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaTargetHttpProxies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Subnetworks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "TargetHttpProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
Version: meta.Version("beta"),
- Service: "Subnetworks",
+ Service: "TargetHttpProxies",
}
- klog.V(5).Infof("GCEBetaSubnetworks.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaTargetHttpProxies.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaSubnetworks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaTargetHttpProxies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Beta.Subnetworks.Delete(projectID, key.Region, key.Name)
+ call := g.s.Beta.TargetHttpProxies.Delete(projectID, key.Name)
+
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaSubnetworks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaSubnetworks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// Subnetworks is an interface that allows for mocking of Subnetworks.
-type Subnetworks interface {
- Get(ctx context.Context, key *meta.Key) (*ga.Subnetwork, error)
- List(ctx context.Context, region string, fl *filter.F) ([]*ga.Subnetwork, error)
- Insert(ctx context.Context, key *meta.Key, obj *ga.Subnetwork) error
+// SetUrlMap is a method on GCEBetaTargetHttpProxies.
+func (g *GCEBetaTargetHttpProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *beta.UrlMapReference) error {
+ klog.V(5).Infof("GCEBetaTargetHttpProxies.SetUrlMap(%v, %v, ...): called", ctx, key)
+
+ if !key.Valid() {
+ klog.V(2).Infof("GCEBetaTargetHttpProxies.SetUrlMap(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "TargetHttpProxies")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "SetUrlMap",
+ Version: meta.Version("beta"),
+ Service: "TargetHttpProxies",
+ }
+ klog.V(5).Infof("GCEBetaTargetHttpProxies.SetUrlMap(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCEBetaTargetHttpProxies.SetUrlMap(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ return err
+ }
+ call := g.s.Beta.TargetHttpProxies.SetUrlMap(projectID, key.Name, arg0)
+ call.Context(ctx)
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCEBetaTargetHttpProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+ }
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCEBetaTargetHttpProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+}
+
+// TargetHttpProxies is an interface that allows for mocking of TargetHttpProxies.
+type TargetHttpProxies interface {
+ Get(ctx context.Context, key *meta.Key) (*ga.TargetHttpProxy, error)
+ List(ctx context.Context, fl *filter.F) ([]*ga.TargetHttpProxy, error)
+ Insert(ctx context.Context, key *meta.Key, obj *ga.TargetHttpProxy) error
Delete(ctx context.Context, key *meta.Key) error
+ SetUrlMap(context.Context, *meta.Key, *ga.UrlMapReference) error
}
-// NewMockSubnetworks returns a new mock for Subnetworks.
-func NewMockSubnetworks(pr ProjectRouter, objs map[meta.Key]*MockSubnetworksObj) *MockSubnetworks {
- mock := &MockSubnetworks{
+// NewMockTargetHttpProxies returns a new mock for TargetHttpProxies.
+func NewMockTargetHttpProxies(pr ProjectRouter, objs map[meta.Key]*MockTargetHttpProxiesObj) *MockTargetHttpProxies {
+ mock := &MockTargetHttpProxies{
ProjectRouter: pr,
Objects: objs,
@@ -20649,14 +23683,14 @@ func NewMockSubnetworks(pr ProjectRouter, objs map[meta.Key]*MockSubnetworksObj)
return mock
}
-// MockSubnetworks is the mock for Subnetworks.
-type MockSubnetworks struct {
+// MockTargetHttpProxies is the mock for TargetHttpProxies.
+type MockTargetHttpProxies struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
// Objects maintained by the mock.
- Objects map[meta.Key]*MockSubnetworksObj
+ Objects map[meta.Key]*MockTargetHttpProxiesObj
// If an entry exists for the given key and operation, then the error
// will be returned instead of the operation.
@@ -20669,10 +23703,11 @@ type MockSubnetworks struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockSubnetworks) (bool, *ga.Subnetwork, error)
- ListHook func(ctx context.Context, region string, fl *filter.F, m *MockSubnetworks) (bool, []*ga.Subnetwork, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *ga.Subnetwork, m *MockSubnetworks) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockSubnetworks) (bool, error)
+ GetHook func(ctx context.Context, key *meta.Key, m *MockTargetHttpProxies) (bool, *ga.TargetHttpProxy, error)
+ ListHook func(ctx context.Context, fl *filter.F, m *MockTargetHttpProxies) (bool, []*ga.TargetHttpProxy, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *ga.TargetHttpProxy, m *MockTargetHttpProxies) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockTargetHttpProxies) (bool, error)
+ SetUrlMapHook func(context.Context, *meta.Key, *ga.UrlMapReference, *MockTargetHttpProxies) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -20680,10 +23715,10 @@ type MockSubnetworks struct {
}
// Get returns the object from the mock.
-func (m *MockSubnetworks) Get(ctx context.Context, key *meta.Key) (*ga.Subnetwork, error) {
+func (m *MockTargetHttpProxies) Get(ctx context.Context, key *meta.Key) (*ga.TargetHttpProxy, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockSubnetworks.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockTargetHttpProxies.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -20695,28 +23730,28 @@ func (m *MockSubnetworks) Get(ctx context.Context, key *meta.Key) (*ga.Subnetwor
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockSubnetworks.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockTargetHttpProxies.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
typedObj := obj.ToGA()
- klog.V(5).Infof("MockSubnetworks.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ klog.V(5).Infof("MockTargetHttpProxies.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockSubnetworks %v not found", key),
+ Message: fmt.Sprintf("MockTargetHttpProxies %v not found", key),
}
- klog.V(5).Infof("MockSubnetworks.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockTargetHttpProxies.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
-// List all of the objects in the mock in the given region.
-func (m *MockSubnetworks) List(ctx context.Context, region string, fl *filter.F) ([]*ga.Subnetwork, error) {
+// List all of the objects in the mock.
+func (m *MockTargetHttpProxies) List(ctx context.Context, fl *filter.F) ([]*ga.TargetHttpProxy, error) {
if m.ListHook != nil {
- if intercept, objs, err := m.ListHook(ctx, region, fl, m); intercept {
- klog.V(5).Infof("MockSubnetworks.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err)
+ if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
+ klog.V(5).Infof("MockTargetHttpProxies.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
return objs, err
}
}
@@ -20726,31 +23761,28 @@ func (m *MockSubnetworks) List(ctx context.Context, region string, fl *filter.F)
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockSubnetworks.List(%v, %q, %v) = nil, %v", ctx, region, fl, err)
+ klog.V(5).Infof("MockTargetHttpProxies.List(%v, %v) = nil, %v", ctx, fl, err)
return nil, *m.ListError
}
- var objs []*ga.Subnetwork
- for key, obj := range m.Objects {
- if key.Region != region {
- continue
- }
+ var objs []*ga.TargetHttpProxy
+ for _, obj := range m.Objects {
if !fl.Match(obj.ToGA()) {
continue
}
objs = append(objs, obj.ToGA())
}
- klog.V(5).Infof("MockSubnetworks.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs))
+ klog.V(5).Infof("MockTargetHttpProxies.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockSubnetworks) Insert(ctx context.Context, key *meta.Key, obj *ga.Subnetwork) error {
+func (m *MockTargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *ga.TargetHttpProxy) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockSubnetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -20762,32 +23794,32 @@ func (m *MockSubnetworks) Insert(ctx context.Context, key *meta.Key, obj *ga.Sub
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockSubnetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockSubnetworks %v exists", key),
+ Message: fmt.Sprintf("MockTargetHttpProxies %v exists", key),
}
- klog.V(5).Infof("MockSubnetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "ga", "subnetworks")
- obj.SelfLink = SelfLink(meta.VersionGA, projectID, "subnetworks", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "ga", "targetHttpProxies")
+ obj.SelfLink = SelfLink(meta.VersionGA, projectID, "targetHttpProxies", key)
- m.Objects[*key] = &MockSubnetworksObj{obj}
- klog.V(5).Infof("MockSubnetworks.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ m.Objects[*key] = &MockTargetHttpProxiesObj{obj}
+ klog.V(5).Infof("MockTargetHttpProxies.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockSubnetworks) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockTargetHttpProxies) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockSubnetworks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -20799,181 +23831,223 @@ func (m *MockSubnetworks) Delete(ctx context.Context, key *meta.Key) error {
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockSubnetworks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockSubnetworks %v not found", key),
+ Message: fmt.Sprintf("MockTargetHttpProxies %v not found", key),
}
- klog.V(5).Infof("MockSubnetworks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockSubnetworks.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockTargetHttpProxies.Delete(%v, %v) = nil", ctx, key)
+ return nil
+}
+
+// Obj wraps the object for use in the mock.
+func (m *MockTargetHttpProxies) Obj(o *ga.TargetHttpProxy) *MockTargetHttpProxiesObj {
+ return &MockTargetHttpProxiesObj{o}
+}
+
+// SetUrlMap is a mock for the corresponding method.
+func (m *MockTargetHttpProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *ga.UrlMapReference) error {
+ if m.SetUrlMapHook != nil {
+ return m.SetUrlMapHook(ctx, key, arg0, m)
+ }
return nil
}
-// Obj wraps the object for use in the mock.
-func (m *MockSubnetworks) Obj(o *ga.Subnetwork) *MockSubnetworksObj {
- return &MockSubnetworksObj{o}
-}
-
-// GCESubnetworks is a simplifying adapter for the GCE Subnetworks.
-type GCESubnetworks struct {
+// GCETargetHttpProxies is a simplifying adapter for the GCE TargetHttpProxies.
+type GCETargetHttpProxies struct {
s *Service
}
-// Get the Subnetwork named by key.
-func (g *GCESubnetworks) Get(ctx context.Context, key *meta.Key) (*ga.Subnetwork, error) {
- klog.V(5).Infof("GCESubnetworks.Get(%v, %v): called", ctx, key)
+// Get the TargetHttpProxy named by key.
+func (g *GCETargetHttpProxies) Get(ctx context.Context, key *meta.Key) (*ga.TargetHttpProxy, error) {
+ klog.V(5).Infof("GCETargetHttpProxies.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCESubnetworks.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCETargetHttpProxies.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Subnetworks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "TargetHttpProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
Version: meta.Version("ga"),
- Service: "Subnetworks",
+ Service: "TargetHttpProxies",
}
- klog.V(5).Infof("GCESubnetworks.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCETargetHttpProxies.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCESubnetworks.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCETargetHttpProxies.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.GA.Subnetworks.Get(projectID, key.Region, key.Name)
+ call := g.s.GA.TargetHttpProxies.Get(projectID, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCESubnetworks.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCETargetHttpProxies.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
-// List all Subnetwork objects.
-func (g *GCESubnetworks) List(ctx context.Context, region string, fl *filter.F) ([]*ga.Subnetwork, error) {
- klog.V(5).Infof("GCESubnetworks.List(%v, %v, %v) called", ctx, region, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Subnetworks")
+// List all TargetHttpProxy objects.
+func (g *GCETargetHttpProxies) List(ctx context.Context, fl *filter.F) ([]*ga.TargetHttpProxy, error) {
+ klog.V(5).Infof("GCETargetHttpProxies.List(%v, %v) called", ctx, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "TargetHttpProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
Version: meta.Version("ga"),
- Service: "Subnetworks",
+ Service: "TargetHttpProxies",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCESubnetworks.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk)
- call := g.s.GA.Subnetworks.List(projectID, region)
+ klog.V(5).Infof("GCETargetHttpProxies.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
+ call := g.s.GA.TargetHttpProxies.List(projectID)
if fl != filter.None {
call.Filter(fl.String())
}
- var all []*ga.Subnetwork
- f := func(l *ga.SubnetworkList) error {
- klog.V(5).Infof("GCESubnetworks.List(%v, ..., %v): page %+v", ctx, fl, l)
+ var all []*ga.TargetHttpProxy
+ f := func(l *ga.TargetHttpProxyList) error {
+ klog.V(5).Infof("GCETargetHttpProxies.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCESubnetworks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCETargetHttpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCESubnetworks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCETargetHttpProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCESubnetworks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCETargetHttpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
-// Insert Subnetwork with key of value obj.
-func (g *GCESubnetworks) Insert(ctx context.Context, key *meta.Key, obj *ga.Subnetwork) error {
- klog.V(5).Infof("GCESubnetworks.Insert(%v, %v, %+v): called", ctx, key, obj)
+// Insert TargetHttpProxy with key of value obj.
+func (g *GCETargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *ga.TargetHttpProxy) error {
+ klog.V(5).Infof("GCETargetHttpProxies.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCESubnetworks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCETargetHttpProxies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Subnetworks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "TargetHttpProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
Version: meta.Version("ga"),
- Service: "Subnetworks",
+ Service: "TargetHttpProxies",
}
- klog.V(5).Infof("GCESubnetworks.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCETargetHttpProxies.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCESubnetworks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCETargetHttpProxies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.GA.Subnetworks.Insert(projectID, key.Region, obj)
+ call := g.s.GA.TargetHttpProxies.Insert(projectID, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCESubnetworks.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCETargetHttpProxies.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCESubnetworks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCETargetHttpProxies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
-// Delete the Subnetwork referenced by key.
-func (g *GCESubnetworks) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCESubnetworks.Delete(%v, %v): called", ctx, key)
+// Delete the TargetHttpProxy referenced by key.
+func (g *GCETargetHttpProxies) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCETargetHttpProxies.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCESubnetworks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCETargetHttpProxies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "Subnetworks")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "TargetHttpProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
Version: meta.Version("ga"),
- Service: "Subnetworks",
+ Service: "TargetHttpProxies",
}
- klog.V(5).Infof("GCESubnetworks.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCETargetHttpProxies.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCESubnetworks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCETargetHttpProxies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.GA.Subnetworks.Delete(projectID, key.Region, key.Name)
+ call := g.s.GA.TargetHttpProxies.Delete(projectID, key.Name)
+
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCESubnetworks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCETargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCESubnetworks.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCETargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// AlphaTargetHttpProxies is an interface that allows for mocking of TargetHttpProxies.
-type AlphaTargetHttpProxies interface {
+// SetUrlMap is a method on GCETargetHttpProxies.
+func (g *GCETargetHttpProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *ga.UrlMapReference) error {
+ klog.V(5).Infof("GCETargetHttpProxies.SetUrlMap(%v, %v, ...): called", ctx, key)
+
+ if !key.Valid() {
+ klog.V(2).Infof("GCETargetHttpProxies.SetUrlMap(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "TargetHttpProxies")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "SetUrlMap",
+ Version: meta.Version("ga"),
+ Service: "TargetHttpProxies",
+ }
+ klog.V(5).Infof("GCETargetHttpProxies.SetUrlMap(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCETargetHttpProxies.SetUrlMap(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ return err
+ }
+ call := g.s.GA.TargetHttpProxies.SetUrlMap(projectID, key.Name, arg0)
+ call.Context(ctx)
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCETargetHttpProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+ }
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCETargetHttpProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+}
+
+// AlphaRegionTargetHttpProxies is an interface that allows for mocking of RegionTargetHttpProxies.
+type AlphaRegionTargetHttpProxies interface {
Get(ctx context.Context, key *meta.Key) (*alpha.TargetHttpProxy, error)
- List(ctx context.Context, fl *filter.F) ([]*alpha.TargetHttpProxy, error)
+ List(ctx context.Context, region string, fl *filter.F) ([]*alpha.TargetHttpProxy, error)
Insert(ctx context.Context, key *meta.Key, obj *alpha.TargetHttpProxy) error
Delete(ctx context.Context, key *meta.Key) error
SetUrlMap(context.Context, *meta.Key, *alpha.UrlMapReference) error
}
-// NewMockAlphaTargetHttpProxies returns a new mock for TargetHttpProxies.
-func NewMockAlphaTargetHttpProxies(pr ProjectRouter, objs map[meta.Key]*MockTargetHttpProxiesObj) *MockAlphaTargetHttpProxies {
- mock := &MockAlphaTargetHttpProxies{
+// NewMockAlphaRegionTargetHttpProxies returns a new mock for RegionTargetHttpProxies.
+func NewMockAlphaRegionTargetHttpProxies(pr ProjectRouter, objs map[meta.Key]*MockRegionTargetHttpProxiesObj) *MockAlphaRegionTargetHttpProxies {
+ mock := &MockAlphaRegionTargetHttpProxies{
ProjectRouter: pr,
Objects: objs,
@@ -20984,14 +24058,14 @@ func NewMockAlphaTargetHttpProxies(pr ProjectRouter, objs map[meta.Key]*MockTarg
return mock
}
-// MockAlphaTargetHttpProxies is the mock for TargetHttpProxies.
-type MockAlphaTargetHttpProxies struct {
+// MockAlphaRegionTargetHttpProxies is the mock for RegionTargetHttpProxies.
+type MockAlphaRegionTargetHttpProxies struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
// Objects maintained by the mock.
- Objects map[meta.Key]*MockTargetHttpProxiesObj
+ Objects map[meta.Key]*MockRegionTargetHttpProxiesObj
// If an entry exists for the given key and operation, then the error
// will be returned instead of the operation.
@@ -21004,11 +24078,11 @@ type MockAlphaTargetHttpProxies struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaTargetHttpProxies) (bool, *alpha.TargetHttpProxy, error)
- ListHook func(ctx context.Context, fl *filter.F, m *MockAlphaTargetHttpProxies) (bool, []*alpha.TargetHttpProxy, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *alpha.TargetHttpProxy, m *MockAlphaTargetHttpProxies) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaTargetHttpProxies) (bool, error)
- SetUrlMapHook func(context.Context, *meta.Key, *alpha.UrlMapReference, *MockAlphaTargetHttpProxies) error
+ GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaRegionTargetHttpProxies) (bool, *alpha.TargetHttpProxy, error)
+ ListHook func(ctx context.Context, region string, fl *filter.F, m *MockAlphaRegionTargetHttpProxies) (bool, []*alpha.TargetHttpProxy, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *alpha.TargetHttpProxy, m *MockAlphaRegionTargetHttpProxies) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaRegionTargetHttpProxies) (bool, error)
+ SetUrlMapHook func(context.Context, *meta.Key, *alpha.UrlMapReference, *MockAlphaRegionTargetHttpProxies) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -21016,10 +24090,10 @@ type MockAlphaTargetHttpProxies struct {
}
// Get returns the object from the mock.
-func (m *MockAlphaTargetHttpProxies) Get(ctx context.Context, key *meta.Key) (*alpha.TargetHttpProxy, error) {
+func (m *MockAlphaRegionTargetHttpProxies) Get(ctx context.Context, key *meta.Key) (*alpha.TargetHttpProxy, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockAlphaTargetHttpProxies.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -21031,28 +24105,28 @@ func (m *MockAlphaTargetHttpProxies) Get(ctx context.Context, key *meta.Key) (*a
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockAlphaTargetHttpProxies.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
typedObj := obj.ToAlpha()
- klog.V(5).Infof("MockAlphaTargetHttpProxies.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockAlphaTargetHttpProxies %v not found", key),
+ Message: fmt.Sprintf("MockAlphaRegionTargetHttpProxies %v not found", key),
}
- klog.V(5).Infof("MockAlphaTargetHttpProxies.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
-// List all of the objects in the mock.
-func (m *MockAlphaTargetHttpProxies) List(ctx context.Context, fl *filter.F) ([]*alpha.TargetHttpProxy, error) {
+// List all of the objects in the mock in the given region.
+func (m *MockAlphaRegionTargetHttpProxies) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.TargetHttpProxy, error) {
if m.ListHook != nil {
- if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
- klog.V(5).Infof("MockAlphaTargetHttpProxies.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
+ if intercept, objs, err := m.ListHook(ctx, region, fl, m); intercept {
+ klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err)
return objs, err
}
}
@@ -21062,28 +24136,31 @@ func (m *MockAlphaTargetHttpProxies) List(ctx context.Context, fl *filter.F) ([]
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockAlphaTargetHttpProxies.List(%v, %v) = nil, %v", ctx, fl, err)
+ klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.List(%v, %q, %v) = nil, %v", ctx, region, fl, err)
return nil, *m.ListError
}
var objs []*alpha.TargetHttpProxy
- for _, obj := range m.Objects {
+ for key, obj := range m.Objects {
+ if key.Region != region {
+ continue
+ }
if !fl.Match(obj.ToAlpha()) {
continue
}
objs = append(objs, obj.ToAlpha())
}
- klog.V(5).Infof("MockAlphaTargetHttpProxies.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
+ klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockAlphaTargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *alpha.TargetHttpProxy) error {
+func (m *MockAlphaRegionTargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *alpha.TargetHttpProxy) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockAlphaTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -21095,15 +24172,15 @@ func (m *MockAlphaTargetHttpProxies) Insert(ctx context.Context, key *meta.Key,
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockAlphaTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockAlphaTargetHttpProxies %v exists", key),
+ Message: fmt.Sprintf("MockAlphaRegionTargetHttpProxies %v exists", key),
}
- klog.V(5).Infof("MockAlphaTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
@@ -21111,16 +24188,16 @@ func (m *MockAlphaTargetHttpProxies) Insert(ctx context.Context, key *meta.Key,
projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "targetHttpProxies")
obj.SelfLink = SelfLink(meta.VersionAlpha, projectID, "targetHttpProxies", key)
- m.Objects[*key] = &MockTargetHttpProxiesObj{obj}
- klog.V(5).Infof("MockAlphaTargetHttpProxies.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ m.Objects[*key] = &MockRegionTargetHttpProxiesObj{obj}
+ klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockAlphaTargetHttpProxies) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockAlphaRegionTargetHttpProxies) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockAlphaTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -21132,223 +24209,222 @@ func (m *MockAlphaTargetHttpProxies) Delete(ctx context.Context, key *meta.Key)
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockAlphaTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockAlphaTargetHttpProxies %v not found", key),
+ Message: fmt.Sprintf("MockAlphaRegionTargetHttpProxies %v not found", key),
}
- klog.V(5).Infof("MockAlphaTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockAlphaTargetHttpProxies.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockAlphaTargetHttpProxies) Obj(o *alpha.TargetHttpProxy) *MockTargetHttpProxiesObj {
- return &MockTargetHttpProxiesObj{o}
+func (m *MockAlphaRegionTargetHttpProxies) Obj(o *alpha.TargetHttpProxy) *MockRegionTargetHttpProxiesObj {
+ return &MockRegionTargetHttpProxiesObj{o}
}
// SetUrlMap is a mock for the corresponding method.
-func (m *MockAlphaTargetHttpProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *alpha.UrlMapReference) error {
+func (m *MockAlphaRegionTargetHttpProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *alpha.UrlMapReference) error {
if m.SetUrlMapHook != nil {
return m.SetUrlMapHook(ctx, key, arg0, m)
}
return nil
}
-// GCEAlphaTargetHttpProxies is a simplifying adapter for the GCE TargetHttpProxies.
-type GCEAlphaTargetHttpProxies struct {
+// GCEAlphaRegionTargetHttpProxies is a simplifying adapter for the GCE RegionTargetHttpProxies.
+type GCEAlphaRegionTargetHttpProxies struct {
s *Service
}
// Get the TargetHttpProxy named by key.
-func (g *GCEAlphaTargetHttpProxies) Get(ctx context.Context, key *meta.Key) (*alpha.TargetHttpProxy, error) {
- klog.V(5).Infof("GCEAlphaTargetHttpProxies.Get(%v, %v): called", ctx, key)
+func (g *GCEAlphaRegionTargetHttpProxies) Get(ctx context.Context, key *meta.Key) (*alpha.TargetHttpProxy, error) {
+ klog.V(5).Infof("GCEAlphaRegionTargetHttpProxies.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaTargetHttpProxies.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaRegionTargetHttpProxies.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "TargetHttpProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionTargetHttpProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
Version: meta.Version("alpha"),
- Service: "TargetHttpProxies",
+ Service: "RegionTargetHttpProxies",
}
- klog.V(5).Infof("GCEAlphaTargetHttpProxies.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaRegionTargetHttpProxies.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaTargetHttpProxies.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.Alpha.TargetHttpProxies.Get(projectID, key.Name)
+ call := g.s.Alpha.RegionTargetHttpProxies.Get(projectID, key.Region, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEAlphaTargetHttpProxies.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
// List all TargetHttpProxy objects.
-func (g *GCEAlphaTargetHttpProxies) List(ctx context.Context, fl *filter.F) ([]*alpha.TargetHttpProxy, error) {
- klog.V(5).Infof("GCEAlphaTargetHttpProxies.List(%v, %v) called", ctx, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "TargetHttpProxies")
+func (g *GCEAlphaRegionTargetHttpProxies) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.TargetHttpProxy, error) {
+ klog.V(5).Infof("GCEAlphaRegionTargetHttpProxies.List(%v, %v, %v) called", ctx, region, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionTargetHttpProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
Version: meta.Version("alpha"),
- Service: "TargetHttpProxies",
+ Service: "RegionTargetHttpProxies",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
- }
- klog.V(5).Infof("GCEAlphaTargetHttpProxies.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
- call := g.s.Alpha.TargetHttpProxies.List(projectID)
+ }
+ klog.V(5).Infof("GCEAlphaRegionTargetHttpProxies.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk)
+ call := g.s.Alpha.RegionTargetHttpProxies.List(projectID, region)
if fl != filter.None {
call.Filter(fl.String())
}
var all []*alpha.TargetHttpProxy
f := func(l *alpha.TargetHttpProxyList) error {
- klog.V(5).Infof("GCEAlphaTargetHttpProxies.List(%v, ..., %v): page %+v", ctx, fl, l)
+ klog.V(5).Infof("GCEAlphaRegionTargetHttpProxies.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEAlphaTargetHttpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEAlphaTargetHttpProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEAlphaTargetHttpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEAlphaRegionTargetHttpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
// Insert TargetHttpProxy with key of value obj.
-func (g *GCEAlphaTargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *alpha.TargetHttpProxy) error {
- klog.V(5).Infof("GCEAlphaTargetHttpProxies.Insert(%v, %v, %+v): called", ctx, key, obj)
+func (g *GCEAlphaRegionTargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *alpha.TargetHttpProxy) error {
+ klog.V(5).Infof("GCEAlphaRegionTargetHttpProxies.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaTargetHttpProxies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaRegionTargetHttpProxies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "TargetHttpProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionTargetHttpProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
Version: meta.Version("alpha"),
- Service: "TargetHttpProxies",
+ Service: "RegionTargetHttpProxies",
}
- klog.V(5).Infof("GCEAlphaTargetHttpProxies.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaRegionTargetHttpProxies.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaTargetHttpProxies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.Alpha.TargetHttpProxies.Insert(projectID, obj)
+ call := g.s.Alpha.RegionTargetHttpProxies.Insert(projectID, key.Region, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaTargetHttpProxies.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaTargetHttpProxies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
// Delete the TargetHttpProxy referenced by key.
-func (g *GCEAlphaTargetHttpProxies) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEAlphaTargetHttpProxies.Delete(%v, %v): called", ctx, key)
+func (g *GCEAlphaRegionTargetHttpProxies) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEAlphaRegionTargetHttpProxies.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaTargetHttpProxies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaRegionTargetHttpProxies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "TargetHttpProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionTargetHttpProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
Version: meta.Version("alpha"),
- Service: "TargetHttpProxies",
+ Service: "RegionTargetHttpProxies",
}
- klog.V(5).Infof("GCEAlphaTargetHttpProxies.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaRegionTargetHttpProxies.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaTargetHttpProxies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Alpha.TargetHttpProxies.Delete(projectID, key.Name)
-
+ call := g.s.Alpha.RegionTargetHttpProxies.Delete(projectID, key.Region, key.Name)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// SetUrlMap is a method on GCEAlphaTargetHttpProxies.
-func (g *GCEAlphaTargetHttpProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *alpha.UrlMapReference) error {
- klog.V(5).Infof("GCEAlphaTargetHttpProxies.SetUrlMap(%v, %v, ...): called", ctx, key)
+// SetUrlMap is a method on GCEAlphaRegionTargetHttpProxies.
+func (g *GCEAlphaRegionTargetHttpProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *alpha.UrlMapReference) error {
+ klog.V(5).Infof("GCEAlphaRegionTargetHttpProxies.SetUrlMap(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaTargetHttpProxies.SetUrlMap(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaRegionTargetHttpProxies.SetUrlMap(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "TargetHttpProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionTargetHttpProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "SetUrlMap",
Version: meta.Version("alpha"),
- Service: "TargetHttpProxies",
+ Service: "RegionTargetHttpProxies",
}
- klog.V(5).Infof("GCEAlphaTargetHttpProxies.SetUrlMap(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaRegionTargetHttpProxies.SetUrlMap(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaTargetHttpProxies.SetUrlMap(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.SetUrlMap(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Alpha.TargetHttpProxies.SetUrlMap(projectID, key.Name, arg0)
+ call := g.s.Alpha.RegionTargetHttpProxies.SetUrlMap(projectID, key.Region, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaTargetHttpProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaTargetHttpProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// BetaTargetHttpProxies is an interface that allows for mocking of TargetHttpProxies.
-type BetaTargetHttpProxies interface {
+// BetaRegionTargetHttpProxies is an interface that allows for mocking of RegionTargetHttpProxies.
+type BetaRegionTargetHttpProxies interface {
Get(ctx context.Context, key *meta.Key) (*beta.TargetHttpProxy, error)
- List(ctx context.Context, fl *filter.F) ([]*beta.TargetHttpProxy, error)
+ List(ctx context.Context, region string, fl *filter.F) ([]*beta.TargetHttpProxy, error)
Insert(ctx context.Context, key *meta.Key, obj *beta.TargetHttpProxy) error
Delete(ctx context.Context, key *meta.Key) error
SetUrlMap(context.Context, *meta.Key, *beta.UrlMapReference) error
}
-// NewMockBetaTargetHttpProxies returns a new mock for TargetHttpProxies.
-func NewMockBetaTargetHttpProxies(pr ProjectRouter, objs map[meta.Key]*MockTargetHttpProxiesObj) *MockBetaTargetHttpProxies {
- mock := &MockBetaTargetHttpProxies{
+// NewMockBetaRegionTargetHttpProxies returns a new mock for RegionTargetHttpProxies.
+func NewMockBetaRegionTargetHttpProxies(pr ProjectRouter, objs map[meta.Key]*MockRegionTargetHttpProxiesObj) *MockBetaRegionTargetHttpProxies {
+ mock := &MockBetaRegionTargetHttpProxies{
ProjectRouter: pr,
Objects: objs,
@@ -21359,14 +24435,14 @@ func NewMockBetaTargetHttpProxies(pr ProjectRouter, objs map[meta.Key]*MockTarge
return mock
}
-// MockBetaTargetHttpProxies is the mock for TargetHttpProxies.
-type MockBetaTargetHttpProxies struct {
+// MockBetaRegionTargetHttpProxies is the mock for RegionTargetHttpProxies.
+type MockBetaRegionTargetHttpProxies struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
// Objects maintained by the mock.
- Objects map[meta.Key]*MockTargetHttpProxiesObj
+ Objects map[meta.Key]*MockRegionTargetHttpProxiesObj
// If an entry exists for the given key and operation, then the error
// will be returned instead of the operation.
@@ -21379,11 +24455,11 @@ type MockBetaTargetHttpProxies struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockBetaTargetHttpProxies) (bool, *beta.TargetHttpProxy, error)
- ListHook func(ctx context.Context, fl *filter.F, m *MockBetaTargetHttpProxies) (bool, []*beta.TargetHttpProxy, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *beta.TargetHttpProxy, m *MockBetaTargetHttpProxies) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaTargetHttpProxies) (bool, error)
- SetUrlMapHook func(context.Context, *meta.Key, *beta.UrlMapReference, *MockBetaTargetHttpProxies) error
+ GetHook func(ctx context.Context, key *meta.Key, m *MockBetaRegionTargetHttpProxies) (bool, *beta.TargetHttpProxy, error)
+ ListHook func(ctx context.Context, region string, fl *filter.F, m *MockBetaRegionTargetHttpProxies) (bool, []*beta.TargetHttpProxy, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *beta.TargetHttpProxy, m *MockBetaRegionTargetHttpProxies) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaRegionTargetHttpProxies) (bool, error)
+ SetUrlMapHook func(context.Context, *meta.Key, *beta.UrlMapReference, *MockBetaRegionTargetHttpProxies) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -21391,10 +24467,10 @@ type MockBetaTargetHttpProxies struct {
}
// Get returns the object from the mock.
-func (m *MockBetaTargetHttpProxies) Get(ctx context.Context, key *meta.Key) (*beta.TargetHttpProxy, error) {
+func (m *MockBetaRegionTargetHttpProxies) Get(ctx context.Context, key *meta.Key) (*beta.TargetHttpProxy, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockBetaTargetHttpProxies.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaRegionTargetHttpProxies.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -21406,28 +24482,28 @@ func (m *MockBetaTargetHttpProxies) Get(ctx context.Context, key *meta.Key) (*be
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockBetaTargetHttpProxies.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaRegionTargetHttpProxies.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
typedObj := obj.ToBeta()
- klog.V(5).Infof("MockBetaTargetHttpProxies.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ klog.V(5).Infof("MockBetaRegionTargetHttpProxies.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockBetaTargetHttpProxies %v not found", key),
+ Message: fmt.Sprintf("MockBetaRegionTargetHttpProxies %v not found", key),
}
- klog.V(5).Infof("MockBetaTargetHttpProxies.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaRegionTargetHttpProxies.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
-// List all of the objects in the mock.
-func (m *MockBetaTargetHttpProxies) List(ctx context.Context, fl *filter.F) ([]*beta.TargetHttpProxy, error) {
+// List all of the objects in the mock in the given region.
+func (m *MockBetaRegionTargetHttpProxies) List(ctx context.Context, region string, fl *filter.F) ([]*beta.TargetHttpProxy, error) {
if m.ListHook != nil {
- if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
- klog.V(5).Infof("MockBetaTargetHttpProxies.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
+ if intercept, objs, err := m.ListHook(ctx, region, fl, m); intercept {
+ klog.V(5).Infof("MockBetaRegionTargetHttpProxies.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err)
return objs, err
}
}
@@ -21437,28 +24513,31 @@ func (m *MockBetaTargetHttpProxies) List(ctx context.Context, fl *filter.F) ([]*
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockBetaTargetHttpProxies.List(%v, %v) = nil, %v", ctx, fl, err)
+ klog.V(5).Infof("MockBetaRegionTargetHttpProxies.List(%v, %q, %v) = nil, %v", ctx, region, fl, err)
return nil, *m.ListError
}
var objs []*beta.TargetHttpProxy
- for _, obj := range m.Objects {
+ for key, obj := range m.Objects {
+ if key.Region != region {
+ continue
+ }
if !fl.Match(obj.ToBeta()) {
continue
}
objs = append(objs, obj.ToBeta())
}
- klog.V(5).Infof("MockBetaTargetHttpProxies.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
+ klog.V(5).Infof("MockBetaRegionTargetHttpProxies.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockBetaTargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *beta.TargetHttpProxy) error {
+func (m *MockBetaRegionTargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *beta.TargetHttpProxy) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockBetaTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaRegionTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -21470,15 +24549,15 @@ func (m *MockBetaTargetHttpProxies) Insert(ctx context.Context, key *meta.Key, o
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockBetaTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaRegionTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockBetaTargetHttpProxies %v exists", key),
+ Message: fmt.Sprintf("MockBetaRegionTargetHttpProxies %v exists", key),
}
- klog.V(5).Infof("MockBetaTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaRegionTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
@@ -21486,16 +24565,16 @@ func (m *MockBetaTargetHttpProxies) Insert(ctx context.Context, key *meta.Key, o
projectID := m.ProjectRouter.ProjectID(ctx, "beta", "targetHttpProxies")
obj.SelfLink = SelfLink(meta.VersionBeta, projectID, "targetHttpProxies", key)
- m.Objects[*key] = &MockTargetHttpProxiesObj{obj}
- klog.V(5).Infof("MockBetaTargetHttpProxies.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ m.Objects[*key] = &MockRegionTargetHttpProxiesObj{obj}
+ klog.V(5).Infof("MockBetaRegionTargetHttpProxies.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockBetaTargetHttpProxies) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockBetaRegionTargetHttpProxies) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockBetaTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaRegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -21507,223 +24586,222 @@ func (m *MockBetaTargetHttpProxies) Delete(ctx context.Context, key *meta.Key) e
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockBetaTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaRegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockBetaTargetHttpProxies %v not found", key),
+ Message: fmt.Sprintf("MockBetaRegionTargetHttpProxies %v not found", key),
}
- klog.V(5).Infof("MockBetaTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaRegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockBetaTargetHttpProxies.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockBetaRegionTargetHttpProxies.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockBetaTargetHttpProxies) Obj(o *beta.TargetHttpProxy) *MockTargetHttpProxiesObj {
- return &MockTargetHttpProxiesObj{o}
+func (m *MockBetaRegionTargetHttpProxies) Obj(o *beta.TargetHttpProxy) *MockRegionTargetHttpProxiesObj {
+ return &MockRegionTargetHttpProxiesObj{o}
}
// SetUrlMap is a mock for the corresponding method.
-func (m *MockBetaTargetHttpProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *beta.UrlMapReference) error {
+func (m *MockBetaRegionTargetHttpProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *beta.UrlMapReference) error {
if m.SetUrlMapHook != nil {
return m.SetUrlMapHook(ctx, key, arg0, m)
}
return nil
}
-// GCEBetaTargetHttpProxies is a simplifying adapter for the GCE TargetHttpProxies.
-type GCEBetaTargetHttpProxies struct {
+// GCEBetaRegionTargetHttpProxies is a simplifying adapter for the GCE RegionTargetHttpProxies.
+type GCEBetaRegionTargetHttpProxies struct {
s *Service
}
// Get the TargetHttpProxy named by key.
-func (g *GCEBetaTargetHttpProxies) Get(ctx context.Context, key *meta.Key) (*beta.TargetHttpProxy, error) {
- klog.V(5).Infof("GCEBetaTargetHttpProxies.Get(%v, %v): called", ctx, key)
+func (g *GCEBetaRegionTargetHttpProxies) Get(ctx context.Context, key *meta.Key) (*beta.TargetHttpProxy, error) {
+ klog.V(5).Infof("GCEBetaRegionTargetHttpProxies.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaTargetHttpProxies.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaRegionTargetHttpProxies.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "TargetHttpProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionTargetHttpProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
Version: meta.Version("beta"),
- Service: "TargetHttpProxies",
+ Service: "RegionTargetHttpProxies",
}
- klog.V(5).Infof("GCEBetaTargetHttpProxies.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaRegionTargetHttpProxies.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaTargetHttpProxies.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.Beta.TargetHttpProxies.Get(projectID, key.Name)
+ call := g.s.Beta.RegionTargetHttpProxies.Get(projectID, key.Region, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEBetaTargetHttpProxies.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
// List all TargetHttpProxy objects.
-func (g *GCEBetaTargetHttpProxies) List(ctx context.Context, fl *filter.F) ([]*beta.TargetHttpProxy, error) {
- klog.V(5).Infof("GCEBetaTargetHttpProxies.List(%v, %v) called", ctx, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "TargetHttpProxies")
+func (g *GCEBetaRegionTargetHttpProxies) List(ctx context.Context, region string, fl *filter.F) ([]*beta.TargetHttpProxy, error) {
+ klog.V(5).Infof("GCEBetaRegionTargetHttpProxies.List(%v, %v, %v) called", ctx, region, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionTargetHttpProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
Version: meta.Version("beta"),
- Service: "TargetHttpProxies",
+ Service: "RegionTargetHttpProxies",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCEBetaTargetHttpProxies.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
- call := g.s.Beta.TargetHttpProxies.List(projectID)
+ klog.V(5).Infof("GCEBetaRegionTargetHttpProxies.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk)
+ call := g.s.Beta.RegionTargetHttpProxies.List(projectID, region)
if fl != filter.None {
call.Filter(fl.String())
}
var all []*beta.TargetHttpProxy
f := func(l *beta.TargetHttpProxyList) error {
- klog.V(5).Infof("GCEBetaTargetHttpProxies.List(%v, ..., %v): page %+v", ctx, fl, l)
+ klog.V(5).Infof("GCEBetaRegionTargetHttpProxies.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEBetaTargetHttpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEBetaTargetHttpProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEBetaTargetHttpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEBetaRegionTargetHttpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
// Insert TargetHttpProxy with key of value obj.
-func (g *GCEBetaTargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *beta.TargetHttpProxy) error {
- klog.V(5).Infof("GCEBetaTargetHttpProxies.Insert(%v, %v, %+v): called", ctx, key, obj)
+func (g *GCEBetaRegionTargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *beta.TargetHttpProxy) error {
+ klog.V(5).Infof("GCEBetaRegionTargetHttpProxies.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaTargetHttpProxies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaRegionTargetHttpProxies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "TargetHttpProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionTargetHttpProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
Version: meta.Version("beta"),
- Service: "TargetHttpProxies",
+ Service: "RegionTargetHttpProxies",
}
- klog.V(5).Infof("GCEBetaTargetHttpProxies.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaRegionTargetHttpProxies.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaTargetHttpProxies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.Beta.TargetHttpProxies.Insert(projectID, obj)
+ call := g.s.Beta.RegionTargetHttpProxies.Insert(projectID, key.Region, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaTargetHttpProxies.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaTargetHttpProxies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
// Delete the TargetHttpProxy referenced by key.
-func (g *GCEBetaTargetHttpProxies) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEBetaTargetHttpProxies.Delete(%v, %v): called", ctx, key)
+func (g *GCEBetaRegionTargetHttpProxies) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEBetaRegionTargetHttpProxies.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaTargetHttpProxies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaRegionTargetHttpProxies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "TargetHttpProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionTargetHttpProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
Version: meta.Version("beta"),
- Service: "TargetHttpProxies",
+ Service: "RegionTargetHttpProxies",
}
- klog.V(5).Infof("GCEBetaTargetHttpProxies.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaRegionTargetHttpProxies.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaTargetHttpProxies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Beta.TargetHttpProxies.Delete(projectID, key.Name)
-
+ call := g.s.Beta.RegionTargetHttpProxies.Delete(projectID, key.Region, key.Name)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// SetUrlMap is a method on GCEBetaTargetHttpProxies.
-func (g *GCEBetaTargetHttpProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *beta.UrlMapReference) error {
- klog.V(5).Infof("GCEBetaTargetHttpProxies.SetUrlMap(%v, %v, ...): called", ctx, key)
+// SetUrlMap is a method on GCEBetaRegionTargetHttpProxies.
+func (g *GCEBetaRegionTargetHttpProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *beta.UrlMapReference) error {
+ klog.V(5).Infof("GCEBetaRegionTargetHttpProxies.SetUrlMap(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaTargetHttpProxies.SetUrlMap(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaRegionTargetHttpProxies.SetUrlMap(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "TargetHttpProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionTargetHttpProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "SetUrlMap",
Version: meta.Version("beta"),
- Service: "TargetHttpProxies",
+ Service: "RegionTargetHttpProxies",
}
- klog.V(5).Infof("GCEBetaTargetHttpProxies.SetUrlMap(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaRegionTargetHttpProxies.SetUrlMap(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaTargetHttpProxies.SetUrlMap(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.SetUrlMap(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Beta.TargetHttpProxies.SetUrlMap(projectID, key.Name, arg0)
+ call := g.s.Beta.RegionTargetHttpProxies.SetUrlMap(projectID, key.Region, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaTargetHttpProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaTargetHttpProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// TargetHttpProxies is an interface that allows for mocking of TargetHttpProxies.
-type TargetHttpProxies interface {
+// RegionTargetHttpProxies is an interface that allows for mocking of RegionTargetHttpProxies.
+type RegionTargetHttpProxies interface {
Get(ctx context.Context, key *meta.Key) (*ga.TargetHttpProxy, error)
- List(ctx context.Context, fl *filter.F) ([]*ga.TargetHttpProxy, error)
+ List(ctx context.Context, region string, fl *filter.F) ([]*ga.TargetHttpProxy, error)
Insert(ctx context.Context, key *meta.Key, obj *ga.TargetHttpProxy) error
Delete(ctx context.Context, key *meta.Key) error
SetUrlMap(context.Context, *meta.Key, *ga.UrlMapReference) error
}
-// NewMockTargetHttpProxies returns a new mock for TargetHttpProxies.
-func NewMockTargetHttpProxies(pr ProjectRouter, objs map[meta.Key]*MockTargetHttpProxiesObj) *MockTargetHttpProxies {
- mock := &MockTargetHttpProxies{
+// NewMockRegionTargetHttpProxies returns a new mock for RegionTargetHttpProxies.
+func NewMockRegionTargetHttpProxies(pr ProjectRouter, objs map[meta.Key]*MockRegionTargetHttpProxiesObj) *MockRegionTargetHttpProxies {
+ mock := &MockRegionTargetHttpProxies{
ProjectRouter: pr,
Objects: objs,
@@ -21734,14 +24812,14 @@ func NewMockTargetHttpProxies(pr ProjectRouter, objs map[meta.Key]*MockTargetHtt
return mock
}
-// MockTargetHttpProxies is the mock for TargetHttpProxies.
-type MockTargetHttpProxies struct {
+// MockRegionTargetHttpProxies is the mock for RegionTargetHttpProxies.
+type MockRegionTargetHttpProxies struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
// Objects maintained by the mock.
- Objects map[meta.Key]*MockTargetHttpProxiesObj
+ Objects map[meta.Key]*MockRegionTargetHttpProxiesObj
// If an entry exists for the given key and operation, then the error
// will be returned instead of the operation.
@@ -21754,11 +24832,11 @@ type MockTargetHttpProxies struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockTargetHttpProxies) (bool, *ga.TargetHttpProxy, error)
- ListHook func(ctx context.Context, fl *filter.F, m *MockTargetHttpProxies) (bool, []*ga.TargetHttpProxy, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *ga.TargetHttpProxy, m *MockTargetHttpProxies) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockTargetHttpProxies) (bool, error)
- SetUrlMapHook func(context.Context, *meta.Key, *ga.UrlMapReference, *MockTargetHttpProxies) error
+ GetHook func(ctx context.Context, key *meta.Key, m *MockRegionTargetHttpProxies) (bool, *ga.TargetHttpProxy, error)
+ ListHook func(ctx context.Context, region string, fl *filter.F, m *MockRegionTargetHttpProxies) (bool, []*ga.TargetHttpProxy, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *ga.TargetHttpProxy, m *MockRegionTargetHttpProxies) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockRegionTargetHttpProxies) (bool, error)
+ SetUrlMapHook func(context.Context, *meta.Key, *ga.UrlMapReference, *MockRegionTargetHttpProxies) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -21766,10 +24844,10 @@ type MockTargetHttpProxies struct {
}
// Get returns the object from the mock.
-func (m *MockTargetHttpProxies) Get(ctx context.Context, key *meta.Key) (*ga.TargetHttpProxy, error) {
+func (m *MockRegionTargetHttpProxies) Get(ctx context.Context, key *meta.Key) (*ga.TargetHttpProxy, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockTargetHttpProxies.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockRegionTargetHttpProxies.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -21781,28 +24859,28 @@ func (m *MockTargetHttpProxies) Get(ctx context.Context, key *meta.Key) (*ga.Tar
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockTargetHttpProxies.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockRegionTargetHttpProxies.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
typedObj := obj.ToGA()
- klog.V(5).Infof("MockTargetHttpProxies.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ klog.V(5).Infof("MockRegionTargetHttpProxies.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockTargetHttpProxies %v not found", key),
+ Message: fmt.Sprintf("MockRegionTargetHttpProxies %v not found", key),
}
- klog.V(5).Infof("MockTargetHttpProxies.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockRegionTargetHttpProxies.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
-// List all of the objects in the mock.
-func (m *MockTargetHttpProxies) List(ctx context.Context, fl *filter.F) ([]*ga.TargetHttpProxy, error) {
+// List all of the objects in the mock in the given region.
+func (m *MockRegionTargetHttpProxies) List(ctx context.Context, region string, fl *filter.F) ([]*ga.TargetHttpProxy, error) {
if m.ListHook != nil {
- if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
- klog.V(5).Infof("MockTargetHttpProxies.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
+ if intercept, objs, err := m.ListHook(ctx, region, fl, m); intercept {
+ klog.V(5).Infof("MockRegionTargetHttpProxies.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err)
return objs, err
}
}
@@ -21812,28 +24890,31 @@ func (m *MockTargetHttpProxies) List(ctx context.Context, fl *filter.F) ([]*ga.T
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockTargetHttpProxies.List(%v, %v) = nil, %v", ctx, fl, err)
+ klog.V(5).Infof("MockRegionTargetHttpProxies.List(%v, %q, %v) = nil, %v", ctx, region, fl, err)
return nil, *m.ListError
}
var objs []*ga.TargetHttpProxy
- for _, obj := range m.Objects {
+ for key, obj := range m.Objects {
+ if key.Region != region {
+ continue
+ }
if !fl.Match(obj.ToGA()) {
continue
}
objs = append(objs, obj.ToGA())
}
- klog.V(5).Infof("MockTargetHttpProxies.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
+ klog.V(5).Infof("MockRegionTargetHttpProxies.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockTargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *ga.TargetHttpProxy) error {
+func (m *MockRegionTargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *ga.TargetHttpProxy) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockRegionTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -21845,15 +24926,15 @@ func (m *MockTargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockRegionTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockTargetHttpProxies %v exists", key),
+ Message: fmt.Sprintf("MockRegionTargetHttpProxies %v exists", key),
}
- klog.V(5).Infof("MockTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockRegionTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
@@ -21861,16 +24942,16 @@ func (m *MockTargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *
projectID := m.ProjectRouter.ProjectID(ctx, "ga", "targetHttpProxies")
obj.SelfLink = SelfLink(meta.VersionGA, projectID, "targetHttpProxies", key)
- m.Objects[*key] = &MockTargetHttpProxiesObj{obj}
- klog.V(5).Infof("MockTargetHttpProxies.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ m.Objects[*key] = &MockRegionTargetHttpProxiesObj{obj}
+ klog.V(5).Infof("MockRegionTargetHttpProxies.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockTargetHttpProxies) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockRegionTargetHttpProxies) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockRegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -21882,223 +24963,224 @@ func (m *MockTargetHttpProxies) Delete(ctx context.Context, key *meta.Key) error
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockRegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockTargetHttpProxies %v not found", key),
+ Message: fmt.Sprintf("MockRegionTargetHttpProxies %v not found", key),
}
- klog.V(5).Infof("MockTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockRegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockTargetHttpProxies.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockRegionTargetHttpProxies.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockTargetHttpProxies) Obj(o *ga.TargetHttpProxy) *MockTargetHttpProxiesObj {
- return &MockTargetHttpProxiesObj{o}
+func (m *MockRegionTargetHttpProxies) Obj(o *ga.TargetHttpProxy) *MockRegionTargetHttpProxiesObj {
+ return &MockRegionTargetHttpProxiesObj{o}
}
// SetUrlMap is a mock for the corresponding method.
-func (m *MockTargetHttpProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *ga.UrlMapReference) error {
+func (m *MockRegionTargetHttpProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *ga.UrlMapReference) error {
if m.SetUrlMapHook != nil {
return m.SetUrlMapHook(ctx, key, arg0, m)
}
return nil
}
-// GCETargetHttpProxies is a simplifying adapter for the GCE TargetHttpProxies.
-type GCETargetHttpProxies struct {
+// GCERegionTargetHttpProxies is a simplifying adapter for the GCE RegionTargetHttpProxies.
+type GCERegionTargetHttpProxies struct {
s *Service
}
// Get the TargetHttpProxy named by key.
-func (g *GCETargetHttpProxies) Get(ctx context.Context, key *meta.Key) (*ga.TargetHttpProxy, error) {
- klog.V(5).Infof("GCETargetHttpProxies.Get(%v, %v): called", ctx, key)
+func (g *GCERegionTargetHttpProxies) Get(ctx context.Context, key *meta.Key) (*ga.TargetHttpProxy, error) {
+ klog.V(5).Infof("GCERegionTargetHttpProxies.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCETargetHttpProxies.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCERegionTargetHttpProxies.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "TargetHttpProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionTargetHttpProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
Version: meta.Version("ga"),
- Service: "TargetHttpProxies",
+ Service: "RegionTargetHttpProxies",
}
- klog.V(5).Infof("GCETargetHttpProxies.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCERegionTargetHttpProxies.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCETargetHttpProxies.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCERegionTargetHttpProxies.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.GA.TargetHttpProxies.Get(projectID, key.Name)
+ call := g.s.GA.RegionTargetHttpProxies.Get(projectID, key.Region, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCETargetHttpProxies.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCERegionTargetHttpProxies.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
// List all TargetHttpProxy objects.
-func (g *GCETargetHttpProxies) List(ctx context.Context, fl *filter.F) ([]*ga.TargetHttpProxy, error) {
- klog.V(5).Infof("GCETargetHttpProxies.List(%v, %v) called", ctx, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "TargetHttpProxies")
+func (g *GCERegionTargetHttpProxies) List(ctx context.Context, region string, fl *filter.F) ([]*ga.TargetHttpProxy, error) {
+ klog.V(5).Infof("GCERegionTargetHttpProxies.List(%v, %v, %v) called", ctx, region, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionTargetHttpProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
Version: meta.Version("ga"),
- Service: "TargetHttpProxies",
+ Service: "RegionTargetHttpProxies",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCETargetHttpProxies.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
- call := g.s.GA.TargetHttpProxies.List(projectID)
+ klog.V(5).Infof("GCERegionTargetHttpProxies.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk)
+ call := g.s.GA.RegionTargetHttpProxies.List(projectID, region)
if fl != filter.None {
call.Filter(fl.String())
}
var all []*ga.TargetHttpProxy
f := func(l *ga.TargetHttpProxyList) error {
- klog.V(5).Infof("GCETargetHttpProxies.List(%v, ..., %v): page %+v", ctx, fl, l)
+ klog.V(5).Infof("GCERegionTargetHttpProxies.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCETargetHttpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCERegionTargetHttpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCETargetHttpProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCERegionTargetHttpProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCETargetHttpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCERegionTargetHttpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
// Insert TargetHttpProxy with key of value obj.
-func (g *GCETargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *ga.TargetHttpProxy) error {
- klog.V(5).Infof("GCETargetHttpProxies.Insert(%v, %v, %+v): called", ctx, key, obj)
+func (g *GCERegionTargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *ga.TargetHttpProxy) error {
+ klog.V(5).Infof("GCERegionTargetHttpProxies.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCETargetHttpProxies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCERegionTargetHttpProxies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "TargetHttpProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionTargetHttpProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
Version: meta.Version("ga"),
- Service: "TargetHttpProxies",
+ Service: "RegionTargetHttpProxies",
}
- klog.V(5).Infof("GCETargetHttpProxies.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCERegionTargetHttpProxies.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCETargetHttpProxies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCERegionTargetHttpProxies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.GA.TargetHttpProxies.Insert(projectID, obj)
+ call := g.s.GA.RegionTargetHttpProxies.Insert(projectID, key.Region, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCETargetHttpProxies.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCERegionTargetHttpProxies.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCETargetHttpProxies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCERegionTargetHttpProxies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
// Delete the TargetHttpProxy referenced by key.
-func (g *GCETargetHttpProxies) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCETargetHttpProxies.Delete(%v, %v): called", ctx, key)
+func (g *GCERegionTargetHttpProxies) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCERegionTargetHttpProxies.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCETargetHttpProxies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCERegionTargetHttpProxies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "TargetHttpProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionTargetHttpProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
Version: meta.Version("ga"),
- Service: "TargetHttpProxies",
+ Service: "RegionTargetHttpProxies",
}
- klog.V(5).Infof("GCETargetHttpProxies.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCERegionTargetHttpProxies.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCETargetHttpProxies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCERegionTargetHttpProxies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.GA.TargetHttpProxies.Delete(projectID, key.Name)
-
+ call := g.s.GA.RegionTargetHttpProxies.Delete(projectID, key.Region, key.Name)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCETargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCERegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCETargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCERegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// SetUrlMap is a method on GCETargetHttpProxies.
-func (g *GCETargetHttpProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *ga.UrlMapReference) error {
- klog.V(5).Infof("GCETargetHttpProxies.SetUrlMap(%v, %v, ...): called", ctx, key)
+// SetUrlMap is a method on GCERegionTargetHttpProxies.
+func (g *GCERegionTargetHttpProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *ga.UrlMapReference) error {
+ klog.V(5).Infof("GCERegionTargetHttpProxies.SetUrlMap(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCETargetHttpProxies.SetUrlMap(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCERegionTargetHttpProxies.SetUrlMap(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "TargetHttpProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionTargetHttpProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "SetUrlMap",
Version: meta.Version("ga"),
- Service: "TargetHttpProxies",
+ Service: "RegionTargetHttpProxies",
}
- klog.V(5).Infof("GCETargetHttpProxies.SetUrlMap(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCERegionTargetHttpProxies.SetUrlMap(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCETargetHttpProxies.SetUrlMap(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCERegionTargetHttpProxies.SetUrlMap(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.GA.TargetHttpProxies.SetUrlMap(projectID, key.Name, arg0)
+ call := g.s.GA.RegionTargetHttpProxies.SetUrlMap(projectID, key.Region, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCETargetHttpProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCERegionTargetHttpProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCETargetHttpProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCERegionTargetHttpProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// AlphaRegionTargetHttpProxies is an interface that allows for mocking of RegionTargetHttpProxies.
-type AlphaRegionTargetHttpProxies interface {
- Get(ctx context.Context, key *meta.Key) (*alpha.TargetHttpProxy, error)
- List(ctx context.Context, region string, fl *filter.F) ([]*alpha.TargetHttpProxy, error)
- Insert(ctx context.Context, key *meta.Key, obj *alpha.TargetHttpProxy) error
+// TargetHttpsProxies is an interface that allows for mocking of TargetHttpsProxies.
+type TargetHttpsProxies interface {
+ Get(ctx context.Context, key *meta.Key) (*ga.TargetHttpsProxy, error)
+ List(ctx context.Context, fl *filter.F) ([]*ga.TargetHttpsProxy, error)
+ Insert(ctx context.Context, key *meta.Key, obj *ga.TargetHttpsProxy) error
Delete(ctx context.Context, key *meta.Key) error
- SetUrlMap(context.Context, *meta.Key, *alpha.UrlMapReference) error
+ SetSslCertificates(context.Context, *meta.Key, *ga.TargetHttpsProxiesSetSslCertificatesRequest) error
+ SetSslPolicy(context.Context, *meta.Key, *ga.SslPolicyReference) error
+ SetUrlMap(context.Context, *meta.Key, *ga.UrlMapReference) error
}
-// NewMockAlphaRegionTargetHttpProxies returns a new mock for RegionTargetHttpProxies.
-func NewMockAlphaRegionTargetHttpProxies(pr ProjectRouter, objs map[meta.Key]*MockRegionTargetHttpProxiesObj) *MockAlphaRegionTargetHttpProxies {
- mock := &MockAlphaRegionTargetHttpProxies{
+// NewMockTargetHttpsProxies returns a new mock for TargetHttpsProxies.
+func NewMockTargetHttpsProxies(pr ProjectRouter, objs map[meta.Key]*MockTargetHttpsProxiesObj) *MockTargetHttpsProxies {
+ mock := &MockTargetHttpsProxies{
ProjectRouter: pr,
Objects: objs,
@@ -22109,14 +25191,14 @@ func NewMockAlphaRegionTargetHttpProxies(pr ProjectRouter, objs map[meta.Key]*Mo
return mock
}
-// MockAlphaRegionTargetHttpProxies is the mock for RegionTargetHttpProxies.
-type MockAlphaRegionTargetHttpProxies struct {
+// MockTargetHttpsProxies is the mock for TargetHttpsProxies.
+type MockTargetHttpsProxies struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
// Objects maintained by the mock.
- Objects map[meta.Key]*MockRegionTargetHttpProxiesObj
+ Objects map[meta.Key]*MockTargetHttpsProxiesObj
// If an entry exists for the given key and operation, then the error
// will be returned instead of the operation.
@@ -22129,11 +25211,13 @@ type MockAlphaRegionTargetHttpProxies struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaRegionTargetHttpProxies) (bool, *alpha.TargetHttpProxy, error)
- ListHook func(ctx context.Context, region string, fl *filter.F, m *MockAlphaRegionTargetHttpProxies) (bool, []*alpha.TargetHttpProxy, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *alpha.TargetHttpProxy, m *MockAlphaRegionTargetHttpProxies) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaRegionTargetHttpProxies) (bool, error)
- SetUrlMapHook func(context.Context, *meta.Key, *alpha.UrlMapReference, *MockAlphaRegionTargetHttpProxies) error
+ GetHook func(ctx context.Context, key *meta.Key, m *MockTargetHttpsProxies) (bool, *ga.TargetHttpsProxy, error)
+ ListHook func(ctx context.Context, fl *filter.F, m *MockTargetHttpsProxies) (bool, []*ga.TargetHttpsProxy, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *ga.TargetHttpsProxy, m *MockTargetHttpsProxies) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockTargetHttpsProxies) (bool, error)
+ SetSslCertificatesHook func(context.Context, *meta.Key, *ga.TargetHttpsProxiesSetSslCertificatesRequest, *MockTargetHttpsProxies) error
+ SetSslPolicyHook func(context.Context, *meta.Key, *ga.SslPolicyReference, *MockTargetHttpsProxies) error
+ SetUrlMapHook func(context.Context, *meta.Key, *ga.UrlMapReference, *MockTargetHttpsProxies) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -22141,10 +25225,10 @@ type MockAlphaRegionTargetHttpProxies struct {
}
// Get returns the object from the mock.
-func (m *MockAlphaRegionTargetHttpProxies) Get(ctx context.Context, key *meta.Key) (*alpha.TargetHttpProxy, error) {
+func (m *MockTargetHttpsProxies) Get(ctx context.Context, key *meta.Key) (*ga.TargetHttpsProxy, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockTargetHttpsProxies.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -22156,28 +25240,28 @@ func (m *MockAlphaRegionTargetHttpProxies) Get(ctx context.Context, key *meta.Ke
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockTargetHttpsProxies.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
- typedObj := obj.ToAlpha()
- klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ typedObj := obj.ToGA()
+ klog.V(5).Infof("MockTargetHttpsProxies.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockAlphaRegionTargetHttpProxies %v not found", key),
+ Message: fmt.Sprintf("MockTargetHttpsProxies %v not found", key),
}
- klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockTargetHttpsProxies.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
-// List all of the objects in the mock in the given region.
-func (m *MockAlphaRegionTargetHttpProxies) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.TargetHttpProxy, error) {
+// List all of the objects in the mock.
+func (m *MockTargetHttpsProxies) List(ctx context.Context, fl *filter.F) ([]*ga.TargetHttpsProxy, error) {
if m.ListHook != nil {
- if intercept, objs, err := m.ListHook(ctx, region, fl, m); intercept {
- klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err)
+ if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
+ klog.V(5).Infof("MockTargetHttpsProxies.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
return objs, err
}
}
@@ -22187,31 +25271,28 @@ func (m *MockAlphaRegionTargetHttpProxies) List(ctx context.Context, region stri
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.List(%v, %q, %v) = nil, %v", ctx, region, fl, err)
+ klog.V(5).Infof("MockTargetHttpsProxies.List(%v, %v) = nil, %v", ctx, fl, err)
return nil, *m.ListError
}
- var objs []*alpha.TargetHttpProxy
- for key, obj := range m.Objects {
- if key.Region != region {
- continue
- }
- if !fl.Match(obj.ToAlpha()) {
+ var objs []*ga.TargetHttpsProxy
+ for _, obj := range m.Objects {
+ if !fl.Match(obj.ToGA()) {
continue
}
- objs = append(objs, obj.ToAlpha())
+ objs = append(objs, obj.ToGA())
}
- klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs))
+ klog.V(5).Infof("MockTargetHttpsProxies.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockAlphaRegionTargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *alpha.TargetHttpProxy) error {
+func (m *MockTargetHttpsProxies) Insert(ctx context.Context, key *meta.Key, obj *ga.TargetHttpsProxy) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -22223,32 +25304,32 @@ func (m *MockAlphaRegionTargetHttpProxies) Insert(ctx context.Context, key *meta
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockAlphaRegionTargetHttpProxies %v exists", key),
+ Message: fmt.Sprintf("MockTargetHttpsProxies %v exists", key),
}
- klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "targetHttpProxies")
- obj.SelfLink = SelfLink(meta.VersionAlpha, projectID, "targetHttpProxies", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "ga", "targetHttpsProxies")
+ obj.SelfLink = SelfLink(meta.VersionGA, projectID, "targetHttpsProxies", key)
- m.Objects[*key] = &MockRegionTargetHttpProxiesObj{obj}
- klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ m.Objects[*key] = &MockTargetHttpsProxiesObj{obj}
+ klog.V(5).Infof("MockTargetHttpsProxies.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockAlphaRegionTargetHttpProxies) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockTargetHttpsProxies) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -22260,222 +25341,307 @@ func (m *MockAlphaRegionTargetHttpProxies) Delete(ctx context.Context, key *meta
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockAlphaRegionTargetHttpProxies %v not found", key),
+ Message: fmt.Sprintf("MockTargetHttpsProxies %v not found", key),
}
- klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockTargetHttpsProxies.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockAlphaRegionTargetHttpProxies) Obj(o *alpha.TargetHttpProxy) *MockRegionTargetHttpProxiesObj {
- return &MockRegionTargetHttpProxiesObj{o}
+func (m *MockTargetHttpsProxies) Obj(o *ga.TargetHttpsProxy) *MockTargetHttpsProxiesObj {
+ return &MockTargetHttpsProxiesObj{o}
+}
+
+// SetSslCertificates is a mock for the corresponding method.
+func (m *MockTargetHttpsProxies) SetSslCertificates(ctx context.Context, key *meta.Key, arg0 *ga.TargetHttpsProxiesSetSslCertificatesRequest) error {
+ if m.SetSslCertificatesHook != nil {
+ return m.SetSslCertificatesHook(ctx, key, arg0, m)
+ }
+ return nil
+}
+
+// SetSslPolicy is a mock for the corresponding method.
+func (m *MockTargetHttpsProxies) SetSslPolicy(ctx context.Context, key *meta.Key, arg0 *ga.SslPolicyReference) error {
+ if m.SetSslPolicyHook != nil {
+ return m.SetSslPolicyHook(ctx, key, arg0, m)
+ }
+ return nil
}
// SetUrlMap is a mock for the corresponding method.
-func (m *MockAlphaRegionTargetHttpProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *alpha.UrlMapReference) error {
+func (m *MockTargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *ga.UrlMapReference) error {
if m.SetUrlMapHook != nil {
return m.SetUrlMapHook(ctx, key, arg0, m)
}
return nil
}
-// GCEAlphaRegionTargetHttpProxies is a simplifying adapter for the GCE RegionTargetHttpProxies.
-type GCEAlphaRegionTargetHttpProxies struct {
+// GCETargetHttpsProxies is a simplifying adapter for the GCE TargetHttpsProxies.
+type GCETargetHttpsProxies struct {
s *Service
}
-// Get the TargetHttpProxy named by key.
-func (g *GCEAlphaRegionTargetHttpProxies) Get(ctx context.Context, key *meta.Key) (*alpha.TargetHttpProxy, error) {
- klog.V(5).Infof("GCEAlphaRegionTargetHttpProxies.Get(%v, %v): called", ctx, key)
+// Get the TargetHttpsProxy named by key.
+func (g *GCETargetHttpsProxies) Get(ctx context.Context, key *meta.Key) (*ga.TargetHttpsProxy, error) {
+ klog.V(5).Infof("GCETargetHttpsProxies.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaRegionTargetHttpProxies.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCETargetHttpsProxies.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionTargetHttpProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "TargetHttpsProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
- Version: meta.Version("alpha"),
- Service: "RegionTargetHttpProxies",
+ Version: meta.Version("ga"),
+ Service: "TargetHttpsProxies",
}
- klog.V(5).Infof("GCEAlphaRegionTargetHttpProxies.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCETargetHttpsProxies.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCETargetHttpsProxies.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.Alpha.RegionTargetHttpProxies.Get(projectID, key.Region, key.Name)
+ call := g.s.GA.TargetHttpsProxies.Get(projectID, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCETargetHttpsProxies.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
-// List all TargetHttpProxy objects.
-func (g *GCEAlphaRegionTargetHttpProxies) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.TargetHttpProxy, error) {
- klog.V(5).Infof("GCEAlphaRegionTargetHttpProxies.List(%v, %v, %v) called", ctx, region, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionTargetHttpProxies")
+// List all TargetHttpsProxy objects.
+func (g *GCETargetHttpsProxies) List(ctx context.Context, fl *filter.F) ([]*ga.TargetHttpsProxy, error) {
+ klog.V(5).Infof("GCETargetHttpsProxies.List(%v, %v) called", ctx, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "TargetHttpsProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
- Version: meta.Version("alpha"),
- Service: "RegionTargetHttpProxies",
+ Version: meta.Version("ga"),
+ Service: "TargetHttpsProxies",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCEAlphaRegionTargetHttpProxies.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk)
- call := g.s.Alpha.RegionTargetHttpProxies.List(projectID, region)
+ klog.V(5).Infof("GCETargetHttpsProxies.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
+ call := g.s.GA.TargetHttpsProxies.List(projectID)
if fl != filter.None {
call.Filter(fl.String())
}
- var all []*alpha.TargetHttpProxy
- f := func(l *alpha.TargetHttpProxyList) error {
- klog.V(5).Infof("GCEAlphaRegionTargetHttpProxies.List(%v, ..., %v): page %+v", ctx, fl, l)
+ var all []*ga.TargetHttpsProxy
+ f := func(l *ga.TargetHttpsProxyList) error {
+ klog.V(5).Infof("GCETargetHttpsProxies.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCETargetHttpsProxies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCETargetHttpsProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEAlphaRegionTargetHttpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCETargetHttpsProxies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
-// Insert TargetHttpProxy with key of value obj.
-func (g *GCEAlphaRegionTargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *alpha.TargetHttpProxy) error {
- klog.V(5).Infof("GCEAlphaRegionTargetHttpProxies.Insert(%v, %v, %+v): called", ctx, key, obj)
+// Insert TargetHttpsProxy with key of value obj.
+func (g *GCETargetHttpsProxies) Insert(ctx context.Context, key *meta.Key, obj *ga.TargetHttpsProxy) error {
+ klog.V(5).Infof("GCETargetHttpsProxies.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaRegionTargetHttpProxies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCETargetHttpsProxies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionTargetHttpProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "TargetHttpsProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
- Version: meta.Version("alpha"),
- Service: "RegionTargetHttpProxies",
+ Version: meta.Version("ga"),
+ Service: "TargetHttpsProxies",
}
- klog.V(5).Infof("GCEAlphaRegionTargetHttpProxies.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCETargetHttpsProxies.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCETargetHttpsProxies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.Alpha.RegionTargetHttpProxies.Insert(projectID, key.Region, obj)
+ call := g.s.GA.TargetHttpsProxies.Insert(projectID, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCETargetHttpsProxies.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCETargetHttpsProxies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
-// Delete the TargetHttpProxy referenced by key.
-func (g *GCEAlphaRegionTargetHttpProxies) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEAlphaRegionTargetHttpProxies.Delete(%v, %v): called", ctx, key)
+// Delete the TargetHttpsProxy referenced by key.
+func (g *GCETargetHttpsProxies) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCETargetHttpsProxies.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaRegionTargetHttpProxies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCETargetHttpsProxies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionTargetHttpProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "TargetHttpsProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
- Version: meta.Version("alpha"),
- Service: "RegionTargetHttpProxies",
+ Version: meta.Version("ga"),
+ Service: "TargetHttpsProxies",
}
- klog.V(5).Infof("GCEAlphaRegionTargetHttpProxies.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCETargetHttpsProxies.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCETargetHttpsProxies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Alpha.RegionTargetHttpProxies.Delete(projectID, key.Region, key.Name)
+ call := g.s.GA.TargetHttpsProxies.Delete(projectID, key.Name)
+
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCETargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCETargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// SetUrlMap is a method on GCEAlphaRegionTargetHttpProxies.
-func (g *GCEAlphaRegionTargetHttpProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *alpha.UrlMapReference) error {
- klog.V(5).Infof("GCEAlphaRegionTargetHttpProxies.SetUrlMap(%v, %v, ...): called", ctx, key)
+// SetSslCertificates is a method on GCETargetHttpsProxies.
+func (g *GCETargetHttpsProxies) SetSslCertificates(ctx context.Context, key *meta.Key, arg0 *ga.TargetHttpsProxiesSetSslCertificatesRequest) error {
+ klog.V(5).Infof("GCETargetHttpsProxies.SetSslCertificates(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaRegionTargetHttpProxies.SetUrlMap(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCETargetHttpsProxies.SetSslCertificates(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionTargetHttpProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "TargetHttpsProxies")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "SetSslCertificates",
+ Version: meta.Version("ga"),
+ Service: "TargetHttpsProxies",
+ }
+ klog.V(5).Infof("GCETargetHttpsProxies.SetSslCertificates(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCETargetHttpsProxies.SetSslCertificates(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ return err
+ }
+ call := g.s.GA.TargetHttpsProxies.SetSslCertificates(projectID, key.Name, arg0)
+ call.Context(ctx)
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCETargetHttpsProxies.SetSslCertificates(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+ }
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCETargetHttpsProxies.SetSslCertificates(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+}
+
+// SetSslPolicy is a method on GCETargetHttpsProxies.
+func (g *GCETargetHttpsProxies) SetSslPolicy(ctx context.Context, key *meta.Key, arg0 *ga.SslPolicyReference) error {
+ klog.V(5).Infof("GCETargetHttpsProxies.SetSslPolicy(%v, %v, ...): called", ctx, key)
+
+ if !key.Valid() {
+ klog.V(2).Infof("GCETargetHttpsProxies.SetSslPolicy(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "TargetHttpsProxies")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "SetSslPolicy",
+ Version: meta.Version("ga"),
+ Service: "TargetHttpsProxies",
+ }
+ klog.V(5).Infof("GCETargetHttpsProxies.SetSslPolicy(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCETargetHttpsProxies.SetSslPolicy(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ return err
+ }
+ call := g.s.GA.TargetHttpsProxies.SetSslPolicy(projectID, key.Name, arg0)
+ call.Context(ctx)
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCETargetHttpsProxies.SetSslPolicy(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+ }
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCETargetHttpsProxies.SetSslPolicy(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+}
+
+// SetUrlMap is a method on GCETargetHttpsProxies.
+func (g *GCETargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *ga.UrlMapReference) error {
+ klog.V(5).Infof("GCETargetHttpsProxies.SetUrlMap(%v, %v, ...): called", ctx, key)
+
+ if !key.Valid() {
+ klog.V(2).Infof("GCETargetHttpsProxies.SetUrlMap(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "TargetHttpsProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "SetUrlMap",
- Version: meta.Version("alpha"),
- Service: "RegionTargetHttpProxies",
+ Version: meta.Version("ga"),
+ Service: "TargetHttpsProxies",
}
- klog.V(5).Infof("GCEAlphaRegionTargetHttpProxies.SetUrlMap(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCETargetHttpsProxies.SetUrlMap(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.SetUrlMap(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCETargetHttpsProxies.SetUrlMap(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Alpha.RegionTargetHttpProxies.SetUrlMap(projectID, key.Region, key.Name, arg0)
+ call := g.s.GA.TargetHttpsProxies.SetUrlMap(projectID, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCETargetHttpsProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCETargetHttpsProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// BetaRegionTargetHttpProxies is an interface that allows for mocking of RegionTargetHttpProxies.
-type BetaRegionTargetHttpProxies interface {
- Get(ctx context.Context, key *meta.Key) (*beta.TargetHttpProxy, error)
- List(ctx context.Context, region string, fl *filter.F) ([]*beta.TargetHttpProxy, error)
- Insert(ctx context.Context, key *meta.Key, obj *beta.TargetHttpProxy) error
+// AlphaTargetHttpsProxies is an interface that allows for mocking of TargetHttpsProxies.
+type AlphaTargetHttpsProxies interface {
+ Get(ctx context.Context, key *meta.Key) (*alpha.TargetHttpsProxy, error)
+ List(ctx context.Context, fl *filter.F) ([]*alpha.TargetHttpsProxy, error)
+ Insert(ctx context.Context, key *meta.Key, obj *alpha.TargetHttpsProxy) error
Delete(ctx context.Context, key *meta.Key) error
- SetUrlMap(context.Context, *meta.Key, *beta.UrlMapReference) error
+ SetSslCertificates(context.Context, *meta.Key, *alpha.TargetHttpsProxiesSetSslCertificatesRequest) error
+ SetSslPolicy(context.Context, *meta.Key, *alpha.SslPolicyReference) error
+ SetUrlMap(context.Context, *meta.Key, *alpha.UrlMapReference) error
}
-// NewMockBetaRegionTargetHttpProxies returns a new mock for RegionTargetHttpProxies.
-func NewMockBetaRegionTargetHttpProxies(pr ProjectRouter, objs map[meta.Key]*MockRegionTargetHttpProxiesObj) *MockBetaRegionTargetHttpProxies {
- mock := &MockBetaRegionTargetHttpProxies{
+// NewMockAlphaTargetHttpsProxies returns a new mock for TargetHttpsProxies.
+func NewMockAlphaTargetHttpsProxies(pr ProjectRouter, objs map[meta.Key]*MockTargetHttpsProxiesObj) *MockAlphaTargetHttpsProxies {
+ mock := &MockAlphaTargetHttpsProxies{
ProjectRouter: pr,
Objects: objs,
@@ -22486,14 +25652,14 @@ func NewMockBetaRegionTargetHttpProxies(pr ProjectRouter, objs map[meta.Key]*Moc
return mock
}
-// MockBetaRegionTargetHttpProxies is the mock for RegionTargetHttpProxies.
-type MockBetaRegionTargetHttpProxies struct {
+// MockAlphaTargetHttpsProxies is the mock for TargetHttpsProxies.
+type MockAlphaTargetHttpsProxies struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
// Objects maintained by the mock.
- Objects map[meta.Key]*MockRegionTargetHttpProxiesObj
+ Objects map[meta.Key]*MockTargetHttpsProxiesObj
// If an entry exists for the given key and operation, then the error
// will be returned instead of the operation.
@@ -22506,11 +25672,13 @@ type MockBetaRegionTargetHttpProxies struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockBetaRegionTargetHttpProxies) (bool, *beta.TargetHttpProxy, error)
- ListHook func(ctx context.Context, region string, fl *filter.F, m *MockBetaRegionTargetHttpProxies) (bool, []*beta.TargetHttpProxy, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *beta.TargetHttpProxy, m *MockBetaRegionTargetHttpProxies) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaRegionTargetHttpProxies) (bool, error)
- SetUrlMapHook func(context.Context, *meta.Key, *beta.UrlMapReference, *MockBetaRegionTargetHttpProxies) error
+ GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaTargetHttpsProxies) (bool, *alpha.TargetHttpsProxy, error)
+ ListHook func(ctx context.Context, fl *filter.F, m *MockAlphaTargetHttpsProxies) (bool, []*alpha.TargetHttpsProxy, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *alpha.TargetHttpsProxy, m *MockAlphaTargetHttpsProxies) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaTargetHttpsProxies) (bool, error)
+ SetSslCertificatesHook func(context.Context, *meta.Key, *alpha.TargetHttpsProxiesSetSslCertificatesRequest, *MockAlphaTargetHttpsProxies) error
+ SetSslPolicyHook func(context.Context, *meta.Key, *alpha.SslPolicyReference, *MockAlphaTargetHttpsProxies) error
+ SetUrlMapHook func(context.Context, *meta.Key, *alpha.UrlMapReference, *MockAlphaTargetHttpsProxies) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -22518,10 +25686,10 @@ type MockBetaRegionTargetHttpProxies struct {
}
// Get returns the object from the mock.
-func (m *MockBetaRegionTargetHttpProxies) Get(ctx context.Context, key *meta.Key) (*beta.TargetHttpProxy, error) {
+func (m *MockAlphaTargetHttpsProxies) Get(ctx context.Context, key *meta.Key) (*alpha.TargetHttpsProxy, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockBetaRegionTargetHttpProxies.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaTargetHttpsProxies.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -22533,28 +25701,28 @@ func (m *MockBetaRegionTargetHttpProxies) Get(ctx context.Context, key *meta.Key
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockBetaRegionTargetHttpProxies.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaTargetHttpsProxies.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
- typedObj := obj.ToBeta()
- klog.V(5).Infof("MockBetaRegionTargetHttpProxies.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ typedObj := obj.ToAlpha()
+ klog.V(5).Infof("MockAlphaTargetHttpsProxies.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockBetaRegionTargetHttpProxies %v not found", key),
+ Message: fmt.Sprintf("MockAlphaTargetHttpsProxies %v not found", key),
}
- klog.V(5).Infof("MockBetaRegionTargetHttpProxies.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaTargetHttpsProxies.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
-// List all of the objects in the mock in the given region.
-func (m *MockBetaRegionTargetHttpProxies) List(ctx context.Context, region string, fl *filter.F) ([]*beta.TargetHttpProxy, error) {
+// List all of the objects in the mock.
+func (m *MockAlphaTargetHttpsProxies) List(ctx context.Context, fl *filter.F) ([]*alpha.TargetHttpsProxy, error) {
if m.ListHook != nil {
- if intercept, objs, err := m.ListHook(ctx, region, fl, m); intercept {
- klog.V(5).Infof("MockBetaRegionTargetHttpProxies.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err)
+ if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
+ klog.V(5).Infof("MockAlphaTargetHttpsProxies.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
return objs, err
}
}
@@ -22564,31 +25732,28 @@ func (m *MockBetaRegionTargetHttpProxies) List(ctx context.Context, region strin
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockBetaRegionTargetHttpProxies.List(%v, %q, %v) = nil, %v", ctx, region, fl, err)
+ klog.V(5).Infof("MockAlphaTargetHttpsProxies.List(%v, %v) = nil, %v", ctx, fl, err)
return nil, *m.ListError
}
- var objs []*beta.TargetHttpProxy
- for key, obj := range m.Objects {
- if key.Region != region {
- continue
- }
- if !fl.Match(obj.ToBeta()) {
+ var objs []*alpha.TargetHttpsProxy
+ for _, obj := range m.Objects {
+ if !fl.Match(obj.ToAlpha()) {
continue
}
- objs = append(objs, obj.ToBeta())
+ objs = append(objs, obj.ToAlpha())
}
- klog.V(5).Infof("MockBetaRegionTargetHttpProxies.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs))
+ klog.V(5).Infof("MockAlphaTargetHttpsProxies.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockBetaRegionTargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *beta.TargetHttpProxy) error {
+func (m *MockAlphaTargetHttpsProxies) Insert(ctx context.Context, key *meta.Key, obj *alpha.TargetHttpsProxy) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockBetaRegionTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -22600,32 +25765,32 @@ func (m *MockBetaRegionTargetHttpProxies) Insert(ctx context.Context, key *meta.
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockBetaRegionTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockBetaRegionTargetHttpProxies %v exists", key),
+ Message: fmt.Sprintf("MockAlphaTargetHttpsProxies %v exists", key),
}
- klog.V(5).Infof("MockBetaRegionTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "beta", "targetHttpProxies")
- obj.SelfLink = SelfLink(meta.VersionBeta, projectID, "targetHttpProxies", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "targetHttpsProxies")
+ obj.SelfLink = SelfLink(meta.VersionAlpha, projectID, "targetHttpsProxies", key)
- m.Objects[*key] = &MockRegionTargetHttpProxiesObj{obj}
- klog.V(5).Infof("MockBetaRegionTargetHttpProxies.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ m.Objects[*key] = &MockTargetHttpsProxiesObj{obj}
+ klog.V(5).Infof("MockAlphaTargetHttpsProxies.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockBetaRegionTargetHttpProxies) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockAlphaTargetHttpsProxies) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockBetaRegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -22637,223 +25802,307 @@ func (m *MockBetaRegionTargetHttpProxies) Delete(ctx context.Context, key *meta.
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockBetaRegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockBetaRegionTargetHttpProxies %v not found", key),
+ Message: fmt.Sprintf("MockAlphaTargetHttpsProxies %v not found", key),
}
- klog.V(5).Infof("MockBetaRegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockBetaRegionTargetHttpProxies.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockAlphaTargetHttpsProxies.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockBetaRegionTargetHttpProxies) Obj(o *beta.TargetHttpProxy) *MockRegionTargetHttpProxiesObj {
- return &MockRegionTargetHttpProxiesObj{o}
+func (m *MockAlphaTargetHttpsProxies) Obj(o *alpha.TargetHttpsProxy) *MockTargetHttpsProxiesObj {
+ return &MockTargetHttpsProxiesObj{o}
+}
+
+// SetSslCertificates is a mock for the corresponding method.
+func (m *MockAlphaTargetHttpsProxies) SetSslCertificates(ctx context.Context, key *meta.Key, arg0 *alpha.TargetHttpsProxiesSetSslCertificatesRequest) error {
+ if m.SetSslCertificatesHook != nil {
+ return m.SetSslCertificatesHook(ctx, key, arg0, m)
+ }
+ return nil
+}
+
+// SetSslPolicy is a mock for the corresponding method.
+func (m *MockAlphaTargetHttpsProxies) SetSslPolicy(ctx context.Context, key *meta.Key, arg0 *alpha.SslPolicyReference) error {
+ if m.SetSslPolicyHook != nil {
+ return m.SetSslPolicyHook(ctx, key, arg0, m)
+ }
+ return nil
}
// SetUrlMap is a mock for the corresponding method.
-func (m *MockBetaRegionTargetHttpProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *beta.UrlMapReference) error {
+func (m *MockAlphaTargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *alpha.UrlMapReference) error {
if m.SetUrlMapHook != nil {
return m.SetUrlMapHook(ctx, key, arg0, m)
}
return nil
}
-// GCEBetaRegionTargetHttpProxies is a simplifying adapter for the GCE RegionTargetHttpProxies.
-type GCEBetaRegionTargetHttpProxies struct {
+// GCEAlphaTargetHttpsProxies is a simplifying adapter for the GCE TargetHttpsProxies.
+type GCEAlphaTargetHttpsProxies struct {
s *Service
}
-// Get the TargetHttpProxy named by key.
-func (g *GCEBetaRegionTargetHttpProxies) Get(ctx context.Context, key *meta.Key) (*beta.TargetHttpProxy, error) {
- klog.V(5).Infof("GCEBetaRegionTargetHttpProxies.Get(%v, %v): called", ctx, key)
+// Get the TargetHttpsProxy named by key.
+func (g *GCEAlphaTargetHttpsProxies) Get(ctx context.Context, key *meta.Key) (*alpha.TargetHttpsProxy, error) {
+ klog.V(5).Infof("GCEAlphaTargetHttpsProxies.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaRegionTargetHttpProxies.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaTargetHttpsProxies.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionTargetHttpProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "TargetHttpsProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
- Version: meta.Version("beta"),
- Service: "RegionTargetHttpProxies",
+ Version: meta.Version("alpha"),
+ Service: "TargetHttpsProxies",
}
- klog.V(5).Infof("GCEBetaRegionTargetHttpProxies.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaTargetHttpsProxies.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaTargetHttpsProxies.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.Beta.RegionTargetHttpProxies.Get(projectID, key.Region, key.Name)
+ call := g.s.Alpha.TargetHttpsProxies.Get(projectID, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEAlphaTargetHttpsProxies.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
-// List all TargetHttpProxy objects.
-func (g *GCEBetaRegionTargetHttpProxies) List(ctx context.Context, region string, fl *filter.F) ([]*beta.TargetHttpProxy, error) {
- klog.V(5).Infof("GCEBetaRegionTargetHttpProxies.List(%v, %v, %v) called", ctx, region, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionTargetHttpProxies")
+// List all TargetHttpsProxy objects.
+func (g *GCEAlphaTargetHttpsProxies) List(ctx context.Context, fl *filter.F) ([]*alpha.TargetHttpsProxy, error) {
+ klog.V(5).Infof("GCEAlphaTargetHttpsProxies.List(%v, %v) called", ctx, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "TargetHttpsProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
- Version: meta.Version("beta"),
- Service: "RegionTargetHttpProxies",
+ Version: meta.Version("alpha"),
+ Service: "TargetHttpsProxies",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCEBetaRegionTargetHttpProxies.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk)
- call := g.s.Beta.RegionTargetHttpProxies.List(projectID, region)
+ klog.V(5).Infof("GCEAlphaTargetHttpsProxies.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
+ call := g.s.Alpha.TargetHttpsProxies.List(projectID)
if fl != filter.None {
call.Filter(fl.String())
}
- var all []*beta.TargetHttpProxy
- f := func(l *beta.TargetHttpProxyList) error {
- klog.V(5).Infof("GCEBetaRegionTargetHttpProxies.List(%v, ..., %v): page %+v", ctx, fl, l)
+ var all []*alpha.TargetHttpsProxy
+ f := func(l *alpha.TargetHttpsProxyList) error {
+ klog.V(5).Infof("GCEAlphaTargetHttpsProxies.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEAlphaTargetHttpsProxies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEAlphaTargetHttpsProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEBetaRegionTargetHttpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEAlphaTargetHttpsProxies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
-// Insert TargetHttpProxy with key of value obj.
-func (g *GCEBetaRegionTargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *beta.TargetHttpProxy) error {
- klog.V(5).Infof("GCEBetaRegionTargetHttpProxies.Insert(%v, %v, %+v): called", ctx, key, obj)
+// Insert TargetHttpsProxy with key of value obj.
+func (g *GCEAlphaTargetHttpsProxies) Insert(ctx context.Context, key *meta.Key, obj *alpha.TargetHttpsProxy) error {
+ klog.V(5).Infof("GCEAlphaTargetHttpsProxies.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaRegionTargetHttpProxies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaTargetHttpsProxies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionTargetHttpProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "TargetHttpsProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
- Version: meta.Version("beta"),
- Service: "RegionTargetHttpProxies",
+ Version: meta.Version("alpha"),
+ Service: "TargetHttpsProxies",
}
- klog.V(5).Infof("GCEBetaRegionTargetHttpProxies.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaTargetHttpsProxies.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaTargetHttpsProxies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.Beta.RegionTargetHttpProxies.Insert(projectID, key.Region, obj)
+ call := g.s.Alpha.TargetHttpsProxies.Insert(projectID, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaTargetHttpsProxies.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCEAlphaTargetHttpsProxies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
-// Delete the TargetHttpProxy referenced by key.
-func (g *GCEBetaRegionTargetHttpProxies) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEBetaRegionTargetHttpProxies.Delete(%v, %v): called", ctx, key)
+// Delete the TargetHttpsProxy referenced by key.
+func (g *GCEAlphaTargetHttpsProxies) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEAlphaTargetHttpsProxies.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaRegionTargetHttpProxies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaTargetHttpsProxies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionTargetHttpProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "TargetHttpsProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
- Version: meta.Version("beta"),
- Service: "RegionTargetHttpProxies",
+ Version: meta.Version("alpha"),
+ Service: "TargetHttpsProxies",
}
- klog.V(5).Infof("GCEBetaRegionTargetHttpProxies.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaTargetHttpsProxies.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaTargetHttpsProxies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Beta.RegionTargetHttpProxies.Delete(projectID, key.Region, key.Name)
+ call := g.s.Alpha.TargetHttpsProxies.Delete(projectID, key.Name)
+
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// SetUrlMap is a method on GCEBetaRegionTargetHttpProxies.
-func (g *GCEBetaRegionTargetHttpProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *beta.UrlMapReference) error {
- klog.V(5).Infof("GCEBetaRegionTargetHttpProxies.SetUrlMap(%v, %v, ...): called", ctx, key)
+// SetSslCertificates is a method on GCEAlphaTargetHttpsProxies.
+func (g *GCEAlphaTargetHttpsProxies) SetSslCertificates(ctx context.Context, key *meta.Key, arg0 *alpha.TargetHttpsProxiesSetSslCertificatesRequest) error {
+ klog.V(5).Infof("GCEAlphaTargetHttpsProxies.SetSslCertificates(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaRegionTargetHttpProxies.SetUrlMap(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaTargetHttpsProxies.SetSslCertificates(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionTargetHttpProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "TargetHttpsProxies")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "SetSslCertificates",
+ Version: meta.Version("alpha"),
+ Service: "TargetHttpsProxies",
+ }
+ klog.V(5).Infof("GCEAlphaTargetHttpsProxies.SetSslCertificates(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCEAlphaTargetHttpsProxies.SetSslCertificates(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ return err
+ }
+ call := g.s.Alpha.TargetHttpsProxies.SetSslCertificates(projectID, key.Name, arg0)
+ call.Context(ctx)
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCEAlphaTargetHttpsProxies.SetSslCertificates(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+ }
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCEAlphaTargetHttpsProxies.SetSslCertificates(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+}
+
+// SetSslPolicy is a method on GCEAlphaTargetHttpsProxies.
+func (g *GCEAlphaTargetHttpsProxies) SetSslPolicy(ctx context.Context, key *meta.Key, arg0 *alpha.SslPolicyReference) error {
+ klog.V(5).Infof("GCEAlphaTargetHttpsProxies.SetSslPolicy(%v, %v, ...): called", ctx, key)
+
+ if !key.Valid() {
+ klog.V(2).Infof("GCEAlphaTargetHttpsProxies.SetSslPolicy(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "TargetHttpsProxies")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "SetSslPolicy",
+ Version: meta.Version("alpha"),
+ Service: "TargetHttpsProxies",
+ }
+ klog.V(5).Infof("GCEAlphaTargetHttpsProxies.SetSslPolicy(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCEAlphaTargetHttpsProxies.SetSslPolicy(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ return err
+ }
+ call := g.s.Alpha.TargetHttpsProxies.SetSslPolicy(projectID, key.Name, arg0)
+ call.Context(ctx)
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCEAlphaTargetHttpsProxies.SetSslPolicy(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+ }
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCEAlphaTargetHttpsProxies.SetSslPolicy(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+}
+
+// SetUrlMap is a method on GCEAlphaTargetHttpsProxies.
+func (g *GCEAlphaTargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *alpha.UrlMapReference) error {
+ klog.V(5).Infof("GCEAlphaTargetHttpsProxies.SetUrlMap(%v, %v, ...): called", ctx, key)
+
+ if !key.Valid() {
+ klog.V(2).Infof("GCEAlphaTargetHttpsProxies.SetUrlMap(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "TargetHttpsProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "SetUrlMap",
- Version: meta.Version("beta"),
- Service: "RegionTargetHttpProxies",
+ Version: meta.Version("alpha"),
+ Service: "TargetHttpsProxies",
}
- klog.V(5).Infof("GCEBetaRegionTargetHttpProxies.SetUrlMap(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaTargetHttpsProxies.SetUrlMap(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.SetUrlMap(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaTargetHttpsProxies.SetUrlMap(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Beta.RegionTargetHttpProxies.SetUrlMap(projectID, key.Region, key.Name, arg0)
+ call := g.s.Alpha.TargetHttpsProxies.SetUrlMap(projectID, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaTargetHttpsProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaTargetHttpsProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// TargetHttpsProxies is an interface that allows for mocking of TargetHttpsProxies.
-type TargetHttpsProxies interface {
- Get(ctx context.Context, key *meta.Key) (*ga.TargetHttpsProxy, error)
- List(ctx context.Context, fl *filter.F) ([]*ga.TargetHttpsProxy, error)
- Insert(ctx context.Context, key *meta.Key, obj *ga.TargetHttpsProxy) error
+// BetaTargetHttpsProxies is an interface that allows for mocking of TargetHttpsProxies.
+type BetaTargetHttpsProxies interface {
+ Get(ctx context.Context, key *meta.Key) (*beta.TargetHttpsProxy, error)
+ List(ctx context.Context, fl *filter.F) ([]*beta.TargetHttpsProxy, error)
+ Insert(ctx context.Context, key *meta.Key, obj *beta.TargetHttpsProxy) error
Delete(ctx context.Context, key *meta.Key) error
- SetSslCertificates(context.Context, *meta.Key, *ga.TargetHttpsProxiesSetSslCertificatesRequest) error
- SetUrlMap(context.Context, *meta.Key, *ga.UrlMapReference) error
+ SetSslCertificates(context.Context, *meta.Key, *beta.TargetHttpsProxiesSetSslCertificatesRequest) error
+ SetSslPolicy(context.Context, *meta.Key, *beta.SslPolicyReference) error
+ SetUrlMap(context.Context, *meta.Key, *beta.UrlMapReference) error
}
-// NewMockTargetHttpsProxies returns a new mock for TargetHttpsProxies.
-func NewMockTargetHttpsProxies(pr ProjectRouter, objs map[meta.Key]*MockTargetHttpsProxiesObj) *MockTargetHttpsProxies {
- mock := &MockTargetHttpsProxies{
+// NewMockBetaTargetHttpsProxies returns a new mock for TargetHttpsProxies.
+func NewMockBetaTargetHttpsProxies(pr ProjectRouter, objs map[meta.Key]*MockTargetHttpsProxiesObj) *MockBetaTargetHttpsProxies {
+ mock := &MockBetaTargetHttpsProxies{
ProjectRouter: pr,
Objects: objs,
@@ -22864,8 +26113,8 @@ func NewMockTargetHttpsProxies(pr ProjectRouter, objs map[meta.Key]*MockTargetHt
return mock
}
-// MockTargetHttpsProxies is the mock for TargetHttpsProxies.
-type MockTargetHttpsProxies struct {
+// MockBetaTargetHttpsProxies is the mock for TargetHttpsProxies.
+type MockBetaTargetHttpsProxies struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
@@ -22884,12 +26133,13 @@ type MockTargetHttpsProxies struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockTargetHttpsProxies) (bool, *ga.TargetHttpsProxy, error)
- ListHook func(ctx context.Context, fl *filter.F, m *MockTargetHttpsProxies) (bool, []*ga.TargetHttpsProxy, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *ga.TargetHttpsProxy, m *MockTargetHttpsProxies) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockTargetHttpsProxies) (bool, error)
- SetSslCertificatesHook func(context.Context, *meta.Key, *ga.TargetHttpsProxiesSetSslCertificatesRequest, *MockTargetHttpsProxies) error
- SetUrlMapHook func(context.Context, *meta.Key, *ga.UrlMapReference, *MockTargetHttpsProxies) error
+ GetHook func(ctx context.Context, key *meta.Key, m *MockBetaTargetHttpsProxies) (bool, *beta.TargetHttpsProxy, error)
+ ListHook func(ctx context.Context, fl *filter.F, m *MockBetaTargetHttpsProxies) (bool, []*beta.TargetHttpsProxy, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *beta.TargetHttpsProxy, m *MockBetaTargetHttpsProxies) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaTargetHttpsProxies) (bool, error)
+ SetSslCertificatesHook func(context.Context, *meta.Key, *beta.TargetHttpsProxiesSetSslCertificatesRequest, *MockBetaTargetHttpsProxies) error
+ SetSslPolicyHook func(context.Context, *meta.Key, *beta.SslPolicyReference, *MockBetaTargetHttpsProxies) error
+ SetUrlMapHook func(context.Context, *meta.Key, *beta.UrlMapReference, *MockBetaTargetHttpsProxies) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -22897,10 +26147,10 @@ type MockTargetHttpsProxies struct {
}
// Get returns the object from the mock.
-func (m *MockTargetHttpsProxies) Get(ctx context.Context, key *meta.Key) (*ga.TargetHttpsProxy, error) {
+func (m *MockBetaTargetHttpsProxies) Get(ctx context.Context, key *meta.Key) (*beta.TargetHttpsProxy, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockTargetHttpsProxies.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaTargetHttpsProxies.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -22912,28 +26162,28 @@ func (m *MockTargetHttpsProxies) Get(ctx context.Context, key *meta.Key) (*ga.Ta
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockTargetHttpsProxies.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaTargetHttpsProxies.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
- typedObj := obj.ToGA()
- klog.V(5).Infof("MockTargetHttpsProxies.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ typedObj := obj.ToBeta()
+ klog.V(5).Infof("MockBetaTargetHttpsProxies.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockTargetHttpsProxies %v not found", key),
+ Message: fmt.Sprintf("MockBetaTargetHttpsProxies %v not found", key),
}
- klog.V(5).Infof("MockTargetHttpsProxies.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaTargetHttpsProxies.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
// List all of the objects in the mock.
-func (m *MockTargetHttpsProxies) List(ctx context.Context, fl *filter.F) ([]*ga.TargetHttpsProxy, error) {
+func (m *MockBetaTargetHttpsProxies) List(ctx context.Context, fl *filter.F) ([]*beta.TargetHttpsProxy, error) {
if m.ListHook != nil {
if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
- klog.V(5).Infof("MockTargetHttpsProxies.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
+ klog.V(5).Infof("MockBetaTargetHttpsProxies.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
return objs, err
}
}
@@ -22943,28 +26193,28 @@ func (m *MockTargetHttpsProxies) List(ctx context.Context, fl *filter.F) ([]*ga.
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockTargetHttpsProxies.List(%v, %v) = nil, %v", ctx, fl, err)
+ klog.V(5).Infof("MockBetaTargetHttpsProxies.List(%v, %v) = nil, %v", ctx, fl, err)
return nil, *m.ListError
}
- var objs []*ga.TargetHttpsProxy
+ var objs []*beta.TargetHttpsProxy
for _, obj := range m.Objects {
- if !fl.Match(obj.ToGA()) {
+ if !fl.Match(obj.ToBeta()) {
continue
}
- objs = append(objs, obj.ToGA())
+ objs = append(objs, obj.ToBeta())
}
- klog.V(5).Infof("MockTargetHttpsProxies.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
+ klog.V(5).Infof("MockBetaTargetHttpsProxies.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockTargetHttpsProxies) Insert(ctx context.Context, key *meta.Key, obj *ga.TargetHttpsProxy) error {
+func (m *MockBetaTargetHttpsProxies) Insert(ctx context.Context, key *meta.Key, obj *beta.TargetHttpsProxy) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -22976,32 +26226,32 @@ func (m *MockTargetHttpsProxies) Insert(ctx context.Context, key *meta.Key, obj
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockTargetHttpsProxies %v exists", key),
+ Message: fmt.Sprintf("MockBetaTargetHttpsProxies %v exists", key),
}
- klog.V(5).Infof("MockTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "ga", "targetHttpsProxies")
- obj.SelfLink = SelfLink(meta.VersionGA, projectID, "targetHttpsProxies", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "beta", "targetHttpsProxies")
+ obj.SelfLink = SelfLink(meta.VersionBeta, projectID, "targetHttpsProxies", key)
m.Objects[*key] = &MockTargetHttpsProxiesObj{obj}
- klog.V(5).Infof("MockTargetHttpsProxies.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ klog.V(5).Infof("MockBetaTargetHttpsProxies.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockTargetHttpsProxies) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockBetaTargetHttpsProxies) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -23013,265 +26263,306 @@ func (m *MockTargetHttpsProxies) Delete(ctx context.Context, key *meta.Key) erro
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockTargetHttpsProxies %v not found", key),
+ Message: fmt.Sprintf("MockBetaTargetHttpsProxies %v not found", key),
}
- klog.V(5).Infof("MockTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockTargetHttpsProxies.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockBetaTargetHttpsProxies.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockTargetHttpsProxies) Obj(o *ga.TargetHttpsProxy) *MockTargetHttpsProxiesObj {
+func (m *MockBetaTargetHttpsProxies) Obj(o *beta.TargetHttpsProxy) *MockTargetHttpsProxiesObj {
return &MockTargetHttpsProxiesObj{o}
}
// SetSslCertificates is a mock for the corresponding method.
-func (m *MockTargetHttpsProxies) SetSslCertificates(ctx context.Context, key *meta.Key, arg0 *ga.TargetHttpsProxiesSetSslCertificatesRequest) error {
+func (m *MockBetaTargetHttpsProxies) SetSslCertificates(ctx context.Context, key *meta.Key, arg0 *beta.TargetHttpsProxiesSetSslCertificatesRequest) error {
if m.SetSslCertificatesHook != nil {
return m.SetSslCertificatesHook(ctx, key, arg0, m)
}
return nil
}
+// SetSslPolicy is a mock for the corresponding method.
+func (m *MockBetaTargetHttpsProxies) SetSslPolicy(ctx context.Context, key *meta.Key, arg0 *beta.SslPolicyReference) error {
+ if m.SetSslPolicyHook != nil {
+ return m.SetSslPolicyHook(ctx, key, arg0, m)
+ }
+ return nil
+}
+
// SetUrlMap is a mock for the corresponding method.
-func (m *MockTargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *ga.UrlMapReference) error {
+func (m *MockBetaTargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *beta.UrlMapReference) error {
if m.SetUrlMapHook != nil {
return m.SetUrlMapHook(ctx, key, arg0, m)
}
return nil
}
-// GCETargetHttpsProxies is a simplifying adapter for the GCE TargetHttpsProxies.
-type GCETargetHttpsProxies struct {
+// GCEBetaTargetHttpsProxies is a simplifying adapter for the GCE TargetHttpsProxies.
+type GCEBetaTargetHttpsProxies struct {
s *Service
}
// Get the TargetHttpsProxy named by key.
-func (g *GCETargetHttpsProxies) Get(ctx context.Context, key *meta.Key) (*ga.TargetHttpsProxy, error) {
- klog.V(5).Infof("GCETargetHttpsProxies.Get(%v, %v): called", ctx, key)
+func (g *GCEBetaTargetHttpsProxies) Get(ctx context.Context, key *meta.Key) (*beta.TargetHttpsProxy, error) {
+ klog.V(5).Infof("GCEBetaTargetHttpsProxies.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCETargetHttpsProxies.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaTargetHttpsProxies.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "TargetHttpsProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "TargetHttpsProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
- Version: meta.Version("ga"),
+ Version: meta.Version("beta"),
Service: "TargetHttpsProxies",
}
- klog.V(5).Infof("GCETargetHttpsProxies.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaTargetHttpsProxies.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCETargetHttpsProxies.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaTargetHttpsProxies.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.GA.TargetHttpsProxies.Get(projectID, key.Name)
+ call := g.s.Beta.TargetHttpsProxies.Get(projectID, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCETargetHttpsProxies.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEBetaTargetHttpsProxies.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
// List all TargetHttpsProxy objects.
-func (g *GCETargetHttpsProxies) List(ctx context.Context, fl *filter.F) ([]*ga.TargetHttpsProxy, error) {
- klog.V(5).Infof("GCETargetHttpsProxies.List(%v, %v) called", ctx, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "TargetHttpsProxies")
+func (g *GCEBetaTargetHttpsProxies) List(ctx context.Context, fl *filter.F) ([]*beta.TargetHttpsProxy, error) {
+ klog.V(5).Infof("GCEBetaTargetHttpsProxies.List(%v, %v) called", ctx, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "TargetHttpsProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
- Version: meta.Version("ga"),
+ Version: meta.Version("beta"),
Service: "TargetHttpsProxies",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCETargetHttpsProxies.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
- call := g.s.GA.TargetHttpsProxies.List(projectID)
+ klog.V(5).Infof("GCEBetaTargetHttpsProxies.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
+ call := g.s.Beta.TargetHttpsProxies.List(projectID)
if fl != filter.None {
call.Filter(fl.String())
}
- var all []*ga.TargetHttpsProxy
- f := func(l *ga.TargetHttpsProxyList) error {
- klog.V(5).Infof("GCETargetHttpsProxies.List(%v, ..., %v): page %+v", ctx, fl, l)
+ var all []*beta.TargetHttpsProxy
+ f := func(l *beta.TargetHttpsProxyList) error {
+ klog.V(5).Infof("GCEBetaTargetHttpsProxies.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCETargetHttpsProxies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEBetaTargetHttpsProxies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCETargetHttpsProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEBetaTargetHttpsProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCETargetHttpsProxies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEBetaTargetHttpsProxies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
// Insert TargetHttpsProxy with key of value obj.
-func (g *GCETargetHttpsProxies) Insert(ctx context.Context, key *meta.Key, obj *ga.TargetHttpsProxy) error {
- klog.V(5).Infof("GCETargetHttpsProxies.Insert(%v, %v, %+v): called", ctx, key, obj)
+func (g *GCEBetaTargetHttpsProxies) Insert(ctx context.Context, key *meta.Key, obj *beta.TargetHttpsProxy) error {
+ klog.V(5).Infof("GCEBetaTargetHttpsProxies.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCETargetHttpsProxies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaTargetHttpsProxies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "TargetHttpsProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "TargetHttpsProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
- Version: meta.Version("ga"),
+ Version: meta.Version("beta"),
Service: "TargetHttpsProxies",
}
- klog.V(5).Infof("GCETargetHttpsProxies.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaTargetHttpsProxies.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCETargetHttpsProxies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaTargetHttpsProxies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.GA.TargetHttpsProxies.Insert(projectID, obj)
+ call := g.s.Beta.TargetHttpsProxies.Insert(projectID, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCETargetHttpsProxies.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaTargetHttpsProxies.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCETargetHttpsProxies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCEBetaTargetHttpsProxies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
// Delete the TargetHttpsProxy referenced by key.
-func (g *GCETargetHttpsProxies) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCETargetHttpsProxies.Delete(%v, %v): called", ctx, key)
+func (g *GCEBetaTargetHttpsProxies) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEBetaTargetHttpsProxies.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCETargetHttpsProxies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaTargetHttpsProxies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "TargetHttpsProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "TargetHttpsProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
- Version: meta.Version("ga"),
+ Version: meta.Version("beta"),
Service: "TargetHttpsProxies",
}
- klog.V(5).Infof("GCETargetHttpsProxies.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaTargetHttpsProxies.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCETargetHttpsProxies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaTargetHttpsProxies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.GA.TargetHttpsProxies.Delete(projectID, key.Name)
+ call := g.s.Beta.TargetHttpsProxies.Delete(projectID, key.Name)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCETargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCETargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// SetSslCertificates is a method on GCETargetHttpsProxies.
-func (g *GCETargetHttpsProxies) SetSslCertificates(ctx context.Context, key *meta.Key, arg0 *ga.TargetHttpsProxiesSetSslCertificatesRequest) error {
- klog.V(5).Infof("GCETargetHttpsProxies.SetSslCertificates(%v, %v, ...): called", ctx, key)
+// SetSslCertificates is a method on GCEBetaTargetHttpsProxies.
+func (g *GCEBetaTargetHttpsProxies) SetSslCertificates(ctx context.Context, key *meta.Key, arg0 *beta.TargetHttpsProxiesSetSslCertificatesRequest) error {
+ klog.V(5).Infof("GCEBetaTargetHttpsProxies.SetSslCertificates(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCETargetHttpsProxies.SetSslCertificates(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaTargetHttpsProxies.SetSslCertificates(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "TargetHttpsProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "TargetHttpsProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "SetSslCertificates",
- Version: meta.Version("ga"),
+ Version: meta.Version("beta"),
Service: "TargetHttpsProxies",
}
- klog.V(5).Infof("GCETargetHttpsProxies.SetSslCertificates(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaTargetHttpsProxies.SetSslCertificates(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCETargetHttpsProxies.SetSslCertificates(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaTargetHttpsProxies.SetSslCertificates(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.GA.TargetHttpsProxies.SetSslCertificates(projectID, key.Name, arg0)
+ call := g.s.Beta.TargetHttpsProxies.SetSslCertificates(projectID, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCETargetHttpsProxies.SetSslCertificates(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaTargetHttpsProxies.SetSslCertificates(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCETargetHttpsProxies.SetSslCertificates(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaTargetHttpsProxies.SetSslCertificates(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// SetUrlMap is a method on GCETargetHttpsProxies.
-func (g *GCETargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *ga.UrlMapReference) error {
- klog.V(5).Infof("GCETargetHttpsProxies.SetUrlMap(%v, %v, ...): called", ctx, key)
+// SetSslPolicy is a method on GCEBetaTargetHttpsProxies.
+func (g *GCEBetaTargetHttpsProxies) SetSslPolicy(ctx context.Context, key *meta.Key, arg0 *beta.SslPolicyReference) error {
+ klog.V(5).Infof("GCEBetaTargetHttpsProxies.SetSslPolicy(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCETargetHttpsProxies.SetUrlMap(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaTargetHttpsProxies.SetSslPolicy(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "TargetHttpsProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "TargetHttpsProxies")
+ rk := &RateLimitKey{
+ ProjectID: projectID,
+ Operation: "SetSslPolicy",
+ Version: meta.Version("beta"),
+ Service: "TargetHttpsProxies",
+ }
+ klog.V(5).Infof("GCEBetaTargetHttpsProxies.SetSslPolicy(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+
+ if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
+ klog.V(4).Infof("GCEBetaTargetHttpsProxies.SetSslPolicy(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ return err
+ }
+ call := g.s.Beta.TargetHttpsProxies.SetSslPolicy(projectID, key.Name, arg0)
+ call.Context(ctx)
+ op, err := call.Do()
+ if err != nil {
+ klog.V(4).Infof("GCEBetaTargetHttpsProxies.SetSslPolicy(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+ }
+ err = g.s.WaitForCompletion(ctx, op)
+ klog.V(4).Infof("GCEBetaTargetHttpsProxies.SetSslPolicy(%v, %v, ...) = %+v", ctx, key, err)
+ return err
+}
+
+// SetUrlMap is a method on GCEBetaTargetHttpsProxies.
+func (g *GCEBetaTargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *beta.UrlMapReference) error {
+ klog.V(5).Infof("GCEBetaTargetHttpsProxies.SetUrlMap(%v, %v, ...): called", ctx, key)
+
+ if !key.Valid() {
+ klog.V(2).Infof("GCEBetaTargetHttpsProxies.SetUrlMap(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ return fmt.Errorf("invalid GCE key (%+v)", key)
+ }
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "TargetHttpsProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "SetUrlMap",
- Version: meta.Version("ga"),
+ Version: meta.Version("beta"),
Service: "TargetHttpsProxies",
}
- klog.V(5).Infof("GCETargetHttpsProxies.SetUrlMap(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaTargetHttpsProxies.SetUrlMap(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCETargetHttpsProxies.SetUrlMap(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaTargetHttpsProxies.SetUrlMap(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.GA.TargetHttpsProxies.SetUrlMap(projectID, key.Name, arg0)
+ call := g.s.Beta.TargetHttpsProxies.SetUrlMap(projectID, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCETargetHttpsProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaTargetHttpsProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCETargetHttpsProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaTargetHttpsProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// AlphaTargetHttpsProxies is an interface that allows for mocking of TargetHttpsProxies.
-type AlphaTargetHttpsProxies interface {
+// AlphaRegionTargetHttpsProxies is an interface that allows for mocking of RegionTargetHttpsProxies.
+type AlphaRegionTargetHttpsProxies interface {
Get(ctx context.Context, key *meta.Key) (*alpha.TargetHttpsProxy, error)
- List(ctx context.Context, fl *filter.F) ([]*alpha.TargetHttpsProxy, error)
+ List(ctx context.Context, region string, fl *filter.F) ([]*alpha.TargetHttpsProxy, error)
Insert(ctx context.Context, key *meta.Key, obj *alpha.TargetHttpsProxy) error
Delete(ctx context.Context, key *meta.Key) error
- SetSslCertificates(context.Context, *meta.Key, *alpha.TargetHttpsProxiesSetSslCertificatesRequest) error
+ SetSslCertificates(context.Context, *meta.Key, *alpha.RegionTargetHttpsProxiesSetSslCertificatesRequest) error
SetUrlMap(context.Context, *meta.Key, *alpha.UrlMapReference) error
}
-// NewMockAlphaTargetHttpsProxies returns a new mock for TargetHttpsProxies.
-func NewMockAlphaTargetHttpsProxies(pr ProjectRouter, objs map[meta.Key]*MockTargetHttpsProxiesObj) *MockAlphaTargetHttpsProxies {
- mock := &MockAlphaTargetHttpsProxies{
+// NewMockAlphaRegionTargetHttpsProxies returns a new mock for RegionTargetHttpsProxies.
+func NewMockAlphaRegionTargetHttpsProxies(pr ProjectRouter, objs map[meta.Key]*MockRegionTargetHttpsProxiesObj) *MockAlphaRegionTargetHttpsProxies {
+ mock := &MockAlphaRegionTargetHttpsProxies{
ProjectRouter: pr,
Objects: objs,
@@ -23282,14 +26573,14 @@ func NewMockAlphaTargetHttpsProxies(pr ProjectRouter, objs map[meta.Key]*MockTar
return mock
}
-// MockAlphaTargetHttpsProxies is the mock for TargetHttpsProxies.
-type MockAlphaTargetHttpsProxies struct {
+// MockAlphaRegionTargetHttpsProxies is the mock for RegionTargetHttpsProxies.
+type MockAlphaRegionTargetHttpsProxies struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
// Objects maintained by the mock.
- Objects map[meta.Key]*MockTargetHttpsProxiesObj
+ Objects map[meta.Key]*MockRegionTargetHttpsProxiesObj
// If an entry exists for the given key and operation, then the error
// will be returned instead of the operation.
@@ -23302,12 +26593,12 @@ type MockAlphaTargetHttpsProxies struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaTargetHttpsProxies) (bool, *alpha.TargetHttpsProxy, error)
- ListHook func(ctx context.Context, fl *filter.F, m *MockAlphaTargetHttpsProxies) (bool, []*alpha.TargetHttpsProxy, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *alpha.TargetHttpsProxy, m *MockAlphaTargetHttpsProxies) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaTargetHttpsProxies) (bool, error)
- SetSslCertificatesHook func(context.Context, *meta.Key, *alpha.TargetHttpsProxiesSetSslCertificatesRequest, *MockAlphaTargetHttpsProxies) error
- SetUrlMapHook func(context.Context, *meta.Key, *alpha.UrlMapReference, *MockAlphaTargetHttpsProxies) error
+ GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaRegionTargetHttpsProxies) (bool, *alpha.TargetHttpsProxy, error)
+ ListHook func(ctx context.Context, region string, fl *filter.F, m *MockAlphaRegionTargetHttpsProxies) (bool, []*alpha.TargetHttpsProxy, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *alpha.TargetHttpsProxy, m *MockAlphaRegionTargetHttpsProxies) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaRegionTargetHttpsProxies) (bool, error)
+ SetSslCertificatesHook func(context.Context, *meta.Key, *alpha.RegionTargetHttpsProxiesSetSslCertificatesRequest, *MockAlphaRegionTargetHttpsProxies) error
+ SetUrlMapHook func(context.Context, *meta.Key, *alpha.UrlMapReference, *MockAlphaRegionTargetHttpsProxies) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -23315,10 +26606,10 @@ type MockAlphaTargetHttpsProxies struct {
}
// Get returns the object from the mock.
-func (m *MockAlphaTargetHttpsProxies) Get(ctx context.Context, key *meta.Key) (*alpha.TargetHttpsProxy, error) {
+func (m *MockAlphaRegionTargetHttpsProxies) Get(ctx context.Context, key *meta.Key) (*alpha.TargetHttpsProxy, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockAlphaTargetHttpsProxies.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -23330,28 +26621,28 @@ func (m *MockAlphaTargetHttpsProxies) Get(ctx context.Context, key *meta.Key) (*
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockAlphaTargetHttpsProxies.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
typedObj := obj.ToAlpha()
- klog.V(5).Infof("MockAlphaTargetHttpsProxies.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockAlphaTargetHttpsProxies %v not found", key),
+ Message: fmt.Sprintf("MockAlphaRegionTargetHttpsProxies %v not found", key),
}
- klog.V(5).Infof("MockAlphaTargetHttpsProxies.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
-// List all of the objects in the mock.
-func (m *MockAlphaTargetHttpsProxies) List(ctx context.Context, fl *filter.F) ([]*alpha.TargetHttpsProxy, error) {
+// List all of the objects in the mock in the given region.
+func (m *MockAlphaRegionTargetHttpsProxies) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.TargetHttpsProxy, error) {
if m.ListHook != nil {
- if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
- klog.V(5).Infof("MockAlphaTargetHttpsProxies.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
+ if intercept, objs, err := m.ListHook(ctx, region, fl, m); intercept {
+ klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err)
return objs, err
}
}
@@ -23361,28 +26652,31 @@ func (m *MockAlphaTargetHttpsProxies) List(ctx context.Context, fl *filter.F) ([
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockAlphaTargetHttpsProxies.List(%v, %v) = nil, %v", ctx, fl, err)
+ klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.List(%v, %q, %v) = nil, %v", ctx, region, fl, err)
return nil, *m.ListError
}
var objs []*alpha.TargetHttpsProxy
- for _, obj := range m.Objects {
+ for key, obj := range m.Objects {
+ if key.Region != region {
+ continue
+ }
if !fl.Match(obj.ToAlpha()) {
continue
}
objs = append(objs, obj.ToAlpha())
}
- klog.V(5).Infof("MockAlphaTargetHttpsProxies.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
+ klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockAlphaTargetHttpsProxies) Insert(ctx context.Context, key *meta.Key, obj *alpha.TargetHttpsProxy) error {
+func (m *MockAlphaRegionTargetHttpsProxies) Insert(ctx context.Context, key *meta.Key, obj *alpha.TargetHttpsProxy) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockAlphaTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -23394,15 +26688,15 @@ func (m *MockAlphaTargetHttpsProxies) Insert(ctx context.Context, key *meta.Key,
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockAlphaTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockAlphaTargetHttpsProxies %v exists", key),
+ Message: fmt.Sprintf("MockAlphaRegionTargetHttpsProxies %v exists", key),
}
- klog.V(5).Infof("MockAlphaTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
@@ -23410,16 +26704,16 @@ func (m *MockAlphaTargetHttpsProxies) Insert(ctx context.Context, key *meta.Key,
projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "targetHttpsProxies")
obj.SelfLink = SelfLink(meta.VersionAlpha, projectID, "targetHttpsProxies", key)
- m.Objects[*key] = &MockTargetHttpsProxiesObj{obj}
- klog.V(5).Infof("MockAlphaTargetHttpsProxies.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ m.Objects[*key] = &MockRegionTargetHttpsProxiesObj{obj}
+ klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockAlphaTargetHttpsProxies) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockAlphaRegionTargetHttpsProxies) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockAlphaTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -23431,30 +26725,30 @@ func (m *MockAlphaTargetHttpsProxies) Delete(ctx context.Context, key *meta.Key)
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockAlphaTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockAlphaTargetHttpsProxies %v not found", key),
+ Message: fmt.Sprintf("MockAlphaRegionTargetHttpsProxies %v not found", key),
}
- klog.V(5).Infof("MockAlphaTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockAlphaTargetHttpsProxies.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockAlphaTargetHttpsProxies) Obj(o *alpha.TargetHttpsProxy) *MockTargetHttpsProxiesObj {
- return &MockTargetHttpsProxiesObj{o}
+func (m *MockAlphaRegionTargetHttpsProxies) Obj(o *alpha.TargetHttpsProxy) *MockRegionTargetHttpsProxiesObj {
+ return &MockRegionTargetHttpsProxiesObj{o}
}
// SetSslCertificates is a mock for the corresponding method.
-func (m *MockAlphaTargetHttpsProxies) SetSslCertificates(ctx context.Context, key *meta.Key, arg0 *alpha.TargetHttpsProxiesSetSslCertificatesRequest) error {
+func (m *MockAlphaRegionTargetHttpsProxies) SetSslCertificates(ctx context.Context, key *meta.Key, arg0 *alpha.RegionTargetHttpsProxiesSetSslCertificatesRequest) error {
if m.SetSslCertificatesHook != nil {
return m.SetSslCertificatesHook(ctx, key, arg0, m)
}
@@ -23462,234 +26756,233 @@ func (m *MockAlphaTargetHttpsProxies) SetSslCertificates(ctx context.Context, ke
}
// SetUrlMap is a mock for the corresponding method.
-func (m *MockAlphaTargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *alpha.UrlMapReference) error {
+func (m *MockAlphaRegionTargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *alpha.UrlMapReference) error {
if m.SetUrlMapHook != nil {
return m.SetUrlMapHook(ctx, key, arg0, m)
}
return nil
}
-// GCEAlphaTargetHttpsProxies is a simplifying adapter for the GCE TargetHttpsProxies.
-type GCEAlphaTargetHttpsProxies struct {
+// GCEAlphaRegionTargetHttpsProxies is a simplifying adapter for the GCE RegionTargetHttpsProxies.
+type GCEAlphaRegionTargetHttpsProxies struct {
s *Service
}
// Get the TargetHttpsProxy named by key.
-func (g *GCEAlphaTargetHttpsProxies) Get(ctx context.Context, key *meta.Key) (*alpha.TargetHttpsProxy, error) {
- klog.V(5).Infof("GCEAlphaTargetHttpsProxies.Get(%v, %v): called", ctx, key)
+func (g *GCEAlphaRegionTargetHttpsProxies) Get(ctx context.Context, key *meta.Key) (*alpha.TargetHttpsProxy, error) {
+ klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaTargetHttpsProxies.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaRegionTargetHttpsProxies.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "TargetHttpsProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionTargetHttpsProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
Version: meta.Version("alpha"),
- Service: "TargetHttpsProxies",
+ Service: "RegionTargetHttpsProxies",
}
- klog.V(5).Infof("GCEAlphaTargetHttpsProxies.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaTargetHttpsProxies.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.Alpha.TargetHttpsProxies.Get(projectID, key.Name)
+ call := g.s.Alpha.RegionTargetHttpsProxies.Get(projectID, key.Region, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEAlphaTargetHttpsProxies.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
// List all TargetHttpsProxy objects.
-func (g *GCEAlphaTargetHttpsProxies) List(ctx context.Context, fl *filter.F) ([]*alpha.TargetHttpsProxy, error) {
- klog.V(5).Infof("GCEAlphaTargetHttpsProxies.List(%v, %v) called", ctx, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "TargetHttpsProxies")
+func (g *GCEAlphaRegionTargetHttpsProxies) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.TargetHttpsProxy, error) {
+ klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.List(%v, %v, %v) called", ctx, region, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionTargetHttpsProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
Version: meta.Version("alpha"),
- Service: "TargetHttpsProxies",
+ Service: "RegionTargetHttpsProxies",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCEAlphaTargetHttpsProxies.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
- call := g.s.Alpha.TargetHttpsProxies.List(projectID)
+ klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk)
+ call := g.s.Alpha.RegionTargetHttpsProxies.List(projectID, region)
if fl != filter.None {
call.Filter(fl.String())
}
var all []*alpha.TargetHttpsProxy
f := func(l *alpha.TargetHttpsProxyList) error {
- klog.V(5).Infof("GCEAlphaTargetHttpsProxies.List(%v, ..., %v): page %+v", ctx, fl, l)
+ klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEAlphaTargetHttpsProxies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEAlphaTargetHttpsProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEAlphaTargetHttpsProxies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
// Insert TargetHttpsProxy with key of value obj.
-func (g *GCEAlphaTargetHttpsProxies) Insert(ctx context.Context, key *meta.Key, obj *alpha.TargetHttpsProxy) error {
- klog.V(5).Infof("GCEAlphaTargetHttpsProxies.Insert(%v, %v, %+v): called", ctx, key, obj)
+func (g *GCEAlphaRegionTargetHttpsProxies) Insert(ctx context.Context, key *meta.Key, obj *alpha.TargetHttpsProxy) error {
+ klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaTargetHttpsProxies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaRegionTargetHttpsProxies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "TargetHttpsProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionTargetHttpsProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
Version: meta.Version("alpha"),
- Service: "TargetHttpsProxies",
+ Service: "RegionTargetHttpsProxies",
}
- klog.V(5).Infof("GCEAlphaTargetHttpsProxies.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaTargetHttpsProxies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.Alpha.TargetHttpsProxies.Insert(projectID, obj)
+ call := g.s.Alpha.RegionTargetHttpsProxies.Insert(projectID, key.Region, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaTargetHttpsProxies.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaTargetHttpsProxies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
// Delete the TargetHttpsProxy referenced by key.
-func (g *GCEAlphaTargetHttpsProxies) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEAlphaTargetHttpsProxies.Delete(%v, %v): called", ctx, key)
+func (g *GCEAlphaRegionTargetHttpsProxies) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaTargetHttpsProxies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaRegionTargetHttpsProxies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "TargetHttpsProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionTargetHttpsProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
Version: meta.Version("alpha"),
- Service: "TargetHttpsProxies",
+ Service: "RegionTargetHttpsProxies",
}
- klog.V(5).Infof("GCEAlphaTargetHttpsProxies.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaTargetHttpsProxies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Alpha.TargetHttpsProxies.Delete(projectID, key.Name)
-
+ call := g.s.Alpha.RegionTargetHttpsProxies.Delete(projectID, key.Region, key.Name)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// SetSslCertificates is a method on GCEAlphaTargetHttpsProxies.
-func (g *GCEAlphaTargetHttpsProxies) SetSslCertificates(ctx context.Context, key *meta.Key, arg0 *alpha.TargetHttpsProxiesSetSslCertificatesRequest) error {
- klog.V(5).Infof("GCEAlphaTargetHttpsProxies.SetSslCertificates(%v, %v, ...): called", ctx, key)
+// SetSslCertificates is a method on GCEAlphaRegionTargetHttpsProxies.
+func (g *GCEAlphaRegionTargetHttpsProxies) SetSslCertificates(ctx context.Context, key *meta.Key, arg0 *alpha.RegionTargetHttpsProxiesSetSslCertificatesRequest) error {
+ klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaTargetHttpsProxies.SetSslCertificates(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaRegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "TargetHttpsProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionTargetHttpsProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "SetSslCertificates",
Version: meta.Version("alpha"),
- Service: "TargetHttpsProxies",
+ Service: "RegionTargetHttpsProxies",
}
- klog.V(5).Infof("GCEAlphaTargetHttpsProxies.SetSslCertificates(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaTargetHttpsProxies.SetSslCertificates(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Alpha.TargetHttpsProxies.SetSslCertificates(projectID, key.Name, arg0)
+ call := g.s.Alpha.RegionTargetHttpsProxies.SetSslCertificates(projectID, key.Region, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaTargetHttpsProxies.SetSslCertificates(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaTargetHttpsProxies.SetSslCertificates(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// SetUrlMap is a method on GCEAlphaTargetHttpsProxies.
-func (g *GCEAlphaTargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *alpha.UrlMapReference) error {
- klog.V(5).Infof("GCEAlphaTargetHttpsProxies.SetUrlMap(%v, %v, ...): called", ctx, key)
+// SetUrlMap is a method on GCEAlphaRegionTargetHttpsProxies.
+func (g *GCEAlphaRegionTargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *alpha.UrlMapReference) error {
+ klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.SetUrlMap(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaTargetHttpsProxies.SetUrlMap(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaRegionTargetHttpsProxies.SetUrlMap(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "TargetHttpsProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionTargetHttpsProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "SetUrlMap",
Version: meta.Version("alpha"),
- Service: "TargetHttpsProxies",
+ Service: "RegionTargetHttpsProxies",
}
- klog.V(5).Infof("GCEAlphaTargetHttpsProxies.SetUrlMap(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.SetUrlMap(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaTargetHttpsProxies.SetUrlMap(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.SetUrlMap(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Alpha.TargetHttpsProxies.SetUrlMap(projectID, key.Name, arg0)
+ call := g.s.Alpha.RegionTargetHttpsProxies.SetUrlMap(projectID, key.Region, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaTargetHttpsProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaTargetHttpsProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// BetaTargetHttpsProxies is an interface that allows for mocking of TargetHttpsProxies.
-type BetaTargetHttpsProxies interface {
+// BetaRegionTargetHttpsProxies is an interface that allows for mocking of RegionTargetHttpsProxies.
+type BetaRegionTargetHttpsProxies interface {
Get(ctx context.Context, key *meta.Key) (*beta.TargetHttpsProxy, error)
- List(ctx context.Context, fl *filter.F) ([]*beta.TargetHttpsProxy, error)
+ List(ctx context.Context, region string, fl *filter.F) ([]*beta.TargetHttpsProxy, error)
Insert(ctx context.Context, key *meta.Key, obj *beta.TargetHttpsProxy) error
Delete(ctx context.Context, key *meta.Key) error
- SetSslCertificates(context.Context, *meta.Key, *beta.TargetHttpsProxiesSetSslCertificatesRequest) error
+ SetSslCertificates(context.Context, *meta.Key, *beta.RegionTargetHttpsProxiesSetSslCertificatesRequest) error
SetUrlMap(context.Context, *meta.Key, *beta.UrlMapReference) error
}
-// NewMockBetaTargetHttpsProxies returns a new mock for TargetHttpsProxies.
-func NewMockBetaTargetHttpsProxies(pr ProjectRouter, objs map[meta.Key]*MockTargetHttpsProxiesObj) *MockBetaTargetHttpsProxies {
- mock := &MockBetaTargetHttpsProxies{
+// NewMockBetaRegionTargetHttpsProxies returns a new mock for RegionTargetHttpsProxies.
+func NewMockBetaRegionTargetHttpsProxies(pr ProjectRouter, objs map[meta.Key]*MockRegionTargetHttpsProxiesObj) *MockBetaRegionTargetHttpsProxies {
+ mock := &MockBetaRegionTargetHttpsProxies{
ProjectRouter: pr,
Objects: objs,
@@ -23700,14 +26993,14 @@ func NewMockBetaTargetHttpsProxies(pr ProjectRouter, objs map[meta.Key]*MockTarg
return mock
}
-// MockBetaTargetHttpsProxies is the mock for TargetHttpsProxies.
-type MockBetaTargetHttpsProxies struct {
+// MockBetaRegionTargetHttpsProxies is the mock for RegionTargetHttpsProxies.
+type MockBetaRegionTargetHttpsProxies struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
// Objects maintained by the mock.
- Objects map[meta.Key]*MockTargetHttpsProxiesObj
+ Objects map[meta.Key]*MockRegionTargetHttpsProxiesObj
// If an entry exists for the given key and operation, then the error
// will be returned instead of the operation.
@@ -23720,12 +27013,12 @@ type MockBetaTargetHttpsProxies struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockBetaTargetHttpsProxies) (bool, *beta.TargetHttpsProxy, error)
- ListHook func(ctx context.Context, fl *filter.F, m *MockBetaTargetHttpsProxies) (bool, []*beta.TargetHttpsProxy, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *beta.TargetHttpsProxy, m *MockBetaTargetHttpsProxies) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaTargetHttpsProxies) (bool, error)
- SetSslCertificatesHook func(context.Context, *meta.Key, *beta.TargetHttpsProxiesSetSslCertificatesRequest, *MockBetaTargetHttpsProxies) error
- SetUrlMapHook func(context.Context, *meta.Key, *beta.UrlMapReference, *MockBetaTargetHttpsProxies) error
+ GetHook func(ctx context.Context, key *meta.Key, m *MockBetaRegionTargetHttpsProxies) (bool, *beta.TargetHttpsProxy, error)
+ ListHook func(ctx context.Context, region string, fl *filter.F, m *MockBetaRegionTargetHttpsProxies) (bool, []*beta.TargetHttpsProxy, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *beta.TargetHttpsProxy, m *MockBetaRegionTargetHttpsProxies) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaRegionTargetHttpsProxies) (bool, error)
+ SetSslCertificatesHook func(context.Context, *meta.Key, *beta.RegionTargetHttpsProxiesSetSslCertificatesRequest, *MockBetaRegionTargetHttpsProxies) error
+ SetUrlMapHook func(context.Context, *meta.Key, *beta.UrlMapReference, *MockBetaRegionTargetHttpsProxies) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -23733,10 +27026,10 @@ type MockBetaTargetHttpsProxies struct {
}
// Get returns the object from the mock.
-func (m *MockBetaTargetHttpsProxies) Get(ctx context.Context, key *meta.Key) (*beta.TargetHttpsProxy, error) {
+func (m *MockBetaRegionTargetHttpsProxies) Get(ctx context.Context, key *meta.Key) (*beta.TargetHttpsProxy, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockBetaTargetHttpsProxies.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -23748,28 +27041,28 @@ func (m *MockBetaTargetHttpsProxies) Get(ctx context.Context, key *meta.Key) (*b
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockBetaTargetHttpsProxies.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
typedObj := obj.ToBeta()
- klog.V(5).Infof("MockBetaTargetHttpsProxies.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockBetaTargetHttpsProxies %v not found", key),
+ Message: fmt.Sprintf("MockBetaRegionTargetHttpsProxies %v not found", key),
}
- klog.V(5).Infof("MockBetaTargetHttpsProxies.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
-// List all of the objects in the mock.
-func (m *MockBetaTargetHttpsProxies) List(ctx context.Context, fl *filter.F) ([]*beta.TargetHttpsProxy, error) {
+// List all of the objects in the mock in the given region.
+func (m *MockBetaRegionTargetHttpsProxies) List(ctx context.Context, region string, fl *filter.F) ([]*beta.TargetHttpsProxy, error) {
if m.ListHook != nil {
- if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
- klog.V(5).Infof("MockBetaTargetHttpsProxies.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
+ if intercept, objs, err := m.ListHook(ctx, region, fl, m); intercept {
+ klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err)
return objs, err
}
}
@@ -23779,28 +27072,31 @@ func (m *MockBetaTargetHttpsProxies) List(ctx context.Context, fl *filter.F) ([]
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockBetaTargetHttpsProxies.List(%v, %v) = nil, %v", ctx, fl, err)
+ klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.List(%v, %q, %v) = nil, %v", ctx, region, fl, err)
return nil, *m.ListError
}
var objs []*beta.TargetHttpsProxy
- for _, obj := range m.Objects {
+ for key, obj := range m.Objects {
+ if key.Region != region {
+ continue
+ }
if !fl.Match(obj.ToBeta()) {
continue
}
objs = append(objs, obj.ToBeta())
}
- klog.V(5).Infof("MockBetaTargetHttpsProxies.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
+ klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockBetaTargetHttpsProxies) Insert(ctx context.Context, key *meta.Key, obj *beta.TargetHttpsProxy) error {
+func (m *MockBetaRegionTargetHttpsProxies) Insert(ctx context.Context, key *meta.Key, obj *beta.TargetHttpsProxy) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockBetaTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -23812,15 +27108,15 @@ func (m *MockBetaTargetHttpsProxies) Insert(ctx context.Context, key *meta.Key,
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockBetaTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockBetaTargetHttpsProxies %v exists", key),
+ Message: fmt.Sprintf("MockBetaRegionTargetHttpsProxies %v exists", key),
}
- klog.V(5).Infof("MockBetaTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
@@ -23828,16 +27124,16 @@ func (m *MockBetaTargetHttpsProxies) Insert(ctx context.Context, key *meta.Key,
projectID := m.ProjectRouter.ProjectID(ctx, "beta", "targetHttpsProxies")
obj.SelfLink = SelfLink(meta.VersionBeta, projectID, "targetHttpsProxies", key)
- m.Objects[*key] = &MockTargetHttpsProxiesObj{obj}
- klog.V(5).Infof("MockBetaTargetHttpsProxies.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ m.Objects[*key] = &MockRegionTargetHttpsProxiesObj{obj}
+ klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockBetaTargetHttpsProxies) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockBetaRegionTargetHttpsProxies) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockBetaTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -23849,30 +27145,30 @@ func (m *MockBetaTargetHttpsProxies) Delete(ctx context.Context, key *meta.Key)
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockBetaTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockBetaTargetHttpsProxies %v not found", key),
+ Message: fmt.Sprintf("MockBetaRegionTargetHttpsProxies %v not found", key),
}
- klog.V(5).Infof("MockBetaTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockBetaTargetHttpsProxies.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockBetaTargetHttpsProxies) Obj(o *beta.TargetHttpsProxy) *MockTargetHttpsProxiesObj {
- return &MockTargetHttpsProxiesObj{o}
+func (m *MockBetaRegionTargetHttpsProxies) Obj(o *beta.TargetHttpsProxy) *MockRegionTargetHttpsProxiesObj {
+ return &MockRegionTargetHttpsProxiesObj{o}
}
// SetSslCertificates is a mock for the corresponding method.
-func (m *MockBetaTargetHttpsProxies) SetSslCertificates(ctx context.Context, key *meta.Key, arg0 *beta.TargetHttpsProxiesSetSslCertificatesRequest) error {
+func (m *MockBetaRegionTargetHttpsProxies) SetSslCertificates(ctx context.Context, key *meta.Key, arg0 *beta.RegionTargetHttpsProxiesSetSslCertificatesRequest) error {
if m.SetSslCertificatesHook != nil {
return m.SetSslCertificatesHook(ctx, key, arg0, m)
}
@@ -23880,234 +27176,233 @@ func (m *MockBetaTargetHttpsProxies) SetSslCertificates(ctx context.Context, key
}
// SetUrlMap is a mock for the corresponding method.
-func (m *MockBetaTargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *beta.UrlMapReference) error {
+func (m *MockBetaRegionTargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *beta.UrlMapReference) error {
if m.SetUrlMapHook != nil {
return m.SetUrlMapHook(ctx, key, arg0, m)
}
return nil
}
-// GCEBetaTargetHttpsProxies is a simplifying adapter for the GCE TargetHttpsProxies.
-type GCEBetaTargetHttpsProxies struct {
+// GCEBetaRegionTargetHttpsProxies is a simplifying adapter for the GCE RegionTargetHttpsProxies.
+type GCEBetaRegionTargetHttpsProxies struct {
s *Service
}
// Get the TargetHttpsProxy named by key.
-func (g *GCEBetaTargetHttpsProxies) Get(ctx context.Context, key *meta.Key) (*beta.TargetHttpsProxy, error) {
- klog.V(5).Infof("GCEBetaTargetHttpsProxies.Get(%v, %v): called", ctx, key)
+func (g *GCEBetaRegionTargetHttpsProxies) Get(ctx context.Context, key *meta.Key) (*beta.TargetHttpsProxy, error) {
+ klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaTargetHttpsProxies.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaRegionTargetHttpsProxies.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "TargetHttpsProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionTargetHttpsProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
Version: meta.Version("beta"),
- Service: "TargetHttpsProxies",
+ Service: "RegionTargetHttpsProxies",
}
- klog.V(5).Infof("GCEBetaTargetHttpsProxies.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaTargetHttpsProxies.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.Beta.TargetHttpsProxies.Get(projectID, key.Name)
+ call := g.s.Beta.RegionTargetHttpsProxies.Get(projectID, key.Region, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEBetaTargetHttpsProxies.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
// List all TargetHttpsProxy objects.
-func (g *GCEBetaTargetHttpsProxies) List(ctx context.Context, fl *filter.F) ([]*beta.TargetHttpsProxy, error) {
- klog.V(5).Infof("GCEBetaTargetHttpsProxies.List(%v, %v) called", ctx, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "TargetHttpsProxies")
+func (g *GCEBetaRegionTargetHttpsProxies) List(ctx context.Context, region string, fl *filter.F) ([]*beta.TargetHttpsProxy, error) {
+ klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.List(%v, %v, %v) called", ctx, region, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionTargetHttpsProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
Version: meta.Version("beta"),
- Service: "TargetHttpsProxies",
+ Service: "RegionTargetHttpsProxies",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCEBetaTargetHttpsProxies.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
- call := g.s.Beta.TargetHttpsProxies.List(projectID)
+ klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk)
+ call := g.s.Beta.RegionTargetHttpsProxies.List(projectID, region)
if fl != filter.None {
call.Filter(fl.String())
}
var all []*beta.TargetHttpsProxy
f := func(l *beta.TargetHttpsProxyList) error {
- klog.V(5).Infof("GCEBetaTargetHttpsProxies.List(%v, ..., %v): page %+v", ctx, fl, l)
+ klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEBetaTargetHttpsProxies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEBetaTargetHttpsProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEBetaTargetHttpsProxies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
// Insert TargetHttpsProxy with key of value obj.
-func (g *GCEBetaTargetHttpsProxies) Insert(ctx context.Context, key *meta.Key, obj *beta.TargetHttpsProxy) error {
- klog.V(5).Infof("GCEBetaTargetHttpsProxies.Insert(%v, %v, %+v): called", ctx, key, obj)
+func (g *GCEBetaRegionTargetHttpsProxies) Insert(ctx context.Context, key *meta.Key, obj *beta.TargetHttpsProxy) error {
+ klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaTargetHttpsProxies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaRegionTargetHttpsProxies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "TargetHttpsProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionTargetHttpsProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
Version: meta.Version("beta"),
- Service: "TargetHttpsProxies",
+ Service: "RegionTargetHttpsProxies",
}
- klog.V(5).Infof("GCEBetaTargetHttpsProxies.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaTargetHttpsProxies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.Beta.TargetHttpsProxies.Insert(projectID, obj)
+ call := g.s.Beta.RegionTargetHttpsProxies.Insert(projectID, key.Region, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaTargetHttpsProxies.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaTargetHttpsProxies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
// Delete the TargetHttpsProxy referenced by key.
-func (g *GCEBetaTargetHttpsProxies) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEBetaTargetHttpsProxies.Delete(%v, %v): called", ctx, key)
+func (g *GCEBetaRegionTargetHttpsProxies) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaTargetHttpsProxies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaRegionTargetHttpsProxies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "TargetHttpsProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionTargetHttpsProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
Version: meta.Version("beta"),
- Service: "TargetHttpsProxies",
+ Service: "RegionTargetHttpsProxies",
}
- klog.V(5).Infof("GCEBetaTargetHttpsProxies.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaTargetHttpsProxies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Beta.TargetHttpsProxies.Delete(projectID, key.Name)
-
+ call := g.s.Beta.RegionTargetHttpsProxies.Delete(projectID, key.Region, key.Name)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// SetSslCertificates is a method on GCEBetaTargetHttpsProxies.
-func (g *GCEBetaTargetHttpsProxies) SetSslCertificates(ctx context.Context, key *meta.Key, arg0 *beta.TargetHttpsProxiesSetSslCertificatesRequest) error {
- klog.V(5).Infof("GCEBetaTargetHttpsProxies.SetSslCertificates(%v, %v, ...): called", ctx, key)
+// SetSslCertificates is a method on GCEBetaRegionTargetHttpsProxies.
+func (g *GCEBetaRegionTargetHttpsProxies) SetSslCertificates(ctx context.Context, key *meta.Key, arg0 *beta.RegionTargetHttpsProxiesSetSslCertificatesRequest) error {
+ klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaTargetHttpsProxies.SetSslCertificates(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaRegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "TargetHttpsProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionTargetHttpsProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "SetSslCertificates",
Version: meta.Version("beta"),
- Service: "TargetHttpsProxies",
+ Service: "RegionTargetHttpsProxies",
}
- klog.V(5).Infof("GCEBetaTargetHttpsProxies.SetSslCertificates(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaTargetHttpsProxies.SetSslCertificates(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Beta.TargetHttpsProxies.SetSslCertificates(projectID, key.Name, arg0)
+ call := g.s.Beta.RegionTargetHttpsProxies.SetSslCertificates(projectID, key.Region, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaTargetHttpsProxies.SetSslCertificates(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaTargetHttpsProxies.SetSslCertificates(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// SetUrlMap is a method on GCEBetaTargetHttpsProxies.
-func (g *GCEBetaTargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *beta.UrlMapReference) error {
- klog.V(5).Infof("GCEBetaTargetHttpsProxies.SetUrlMap(%v, %v, ...): called", ctx, key)
+// SetUrlMap is a method on GCEBetaRegionTargetHttpsProxies.
+func (g *GCEBetaRegionTargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *beta.UrlMapReference) error {
+ klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.SetUrlMap(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaTargetHttpsProxies.SetUrlMap(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaRegionTargetHttpsProxies.SetUrlMap(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "TargetHttpsProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionTargetHttpsProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "SetUrlMap",
Version: meta.Version("beta"),
- Service: "TargetHttpsProxies",
+ Service: "RegionTargetHttpsProxies",
}
- klog.V(5).Infof("GCEBetaTargetHttpsProxies.SetUrlMap(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.SetUrlMap(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaTargetHttpsProxies.SetUrlMap(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.SetUrlMap(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Beta.TargetHttpsProxies.SetUrlMap(projectID, key.Name, arg0)
+ call := g.s.Beta.RegionTargetHttpsProxies.SetUrlMap(projectID, key.Region, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaTargetHttpsProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaTargetHttpsProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// AlphaRegionTargetHttpsProxies is an interface that allows for mocking of RegionTargetHttpsProxies.
-type AlphaRegionTargetHttpsProxies interface {
- Get(ctx context.Context, key *meta.Key) (*alpha.TargetHttpsProxy, error)
- List(ctx context.Context, region string, fl *filter.F) ([]*alpha.TargetHttpsProxy, error)
- Insert(ctx context.Context, key *meta.Key, obj *alpha.TargetHttpsProxy) error
+// RegionTargetHttpsProxies is an interface that allows for mocking of RegionTargetHttpsProxies.
+type RegionTargetHttpsProxies interface {
+ Get(ctx context.Context, key *meta.Key) (*ga.TargetHttpsProxy, error)
+ List(ctx context.Context, region string, fl *filter.F) ([]*ga.TargetHttpsProxy, error)
+ Insert(ctx context.Context, key *meta.Key, obj *ga.TargetHttpsProxy) error
Delete(ctx context.Context, key *meta.Key) error
- SetSslCertificates(context.Context, *meta.Key, *alpha.RegionTargetHttpsProxiesSetSslCertificatesRequest) error
- SetUrlMap(context.Context, *meta.Key, *alpha.UrlMapReference) error
+ SetSslCertificates(context.Context, *meta.Key, *ga.RegionTargetHttpsProxiesSetSslCertificatesRequest) error
+ SetUrlMap(context.Context, *meta.Key, *ga.UrlMapReference) error
}
-// NewMockAlphaRegionTargetHttpsProxies returns a new mock for RegionTargetHttpsProxies.
-func NewMockAlphaRegionTargetHttpsProxies(pr ProjectRouter, objs map[meta.Key]*MockRegionTargetHttpsProxiesObj) *MockAlphaRegionTargetHttpsProxies {
- mock := &MockAlphaRegionTargetHttpsProxies{
+// NewMockRegionTargetHttpsProxies returns a new mock for RegionTargetHttpsProxies.
+func NewMockRegionTargetHttpsProxies(pr ProjectRouter, objs map[meta.Key]*MockRegionTargetHttpsProxiesObj) *MockRegionTargetHttpsProxies {
+ mock := &MockRegionTargetHttpsProxies{
ProjectRouter: pr,
Objects: objs,
@@ -24118,8 +27413,8 @@ func NewMockAlphaRegionTargetHttpsProxies(pr ProjectRouter, objs map[meta.Key]*M
return mock
}
-// MockAlphaRegionTargetHttpsProxies is the mock for RegionTargetHttpsProxies.
-type MockAlphaRegionTargetHttpsProxies struct {
+// MockRegionTargetHttpsProxies is the mock for RegionTargetHttpsProxies.
+type MockRegionTargetHttpsProxies struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
@@ -24138,12 +27433,12 @@ type MockAlphaRegionTargetHttpsProxies struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaRegionTargetHttpsProxies) (bool, *alpha.TargetHttpsProxy, error)
- ListHook func(ctx context.Context, region string, fl *filter.F, m *MockAlphaRegionTargetHttpsProxies) (bool, []*alpha.TargetHttpsProxy, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *alpha.TargetHttpsProxy, m *MockAlphaRegionTargetHttpsProxies) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaRegionTargetHttpsProxies) (bool, error)
- SetSslCertificatesHook func(context.Context, *meta.Key, *alpha.RegionTargetHttpsProxiesSetSslCertificatesRequest, *MockAlphaRegionTargetHttpsProxies) error
- SetUrlMapHook func(context.Context, *meta.Key, *alpha.UrlMapReference, *MockAlphaRegionTargetHttpsProxies) error
+ GetHook func(ctx context.Context, key *meta.Key, m *MockRegionTargetHttpsProxies) (bool, *ga.TargetHttpsProxy, error)
+ ListHook func(ctx context.Context, region string, fl *filter.F, m *MockRegionTargetHttpsProxies) (bool, []*ga.TargetHttpsProxy, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *ga.TargetHttpsProxy, m *MockRegionTargetHttpsProxies) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockRegionTargetHttpsProxies) (bool, error)
+ SetSslCertificatesHook func(context.Context, *meta.Key, *ga.RegionTargetHttpsProxiesSetSslCertificatesRequest, *MockRegionTargetHttpsProxies) error
+ SetUrlMapHook func(context.Context, *meta.Key, *ga.UrlMapReference, *MockRegionTargetHttpsProxies) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -24151,10 +27446,10 @@ type MockAlphaRegionTargetHttpsProxies struct {
}
// Get returns the object from the mock.
-func (m *MockAlphaRegionTargetHttpsProxies) Get(ctx context.Context, key *meta.Key) (*alpha.TargetHttpsProxy, error) {
+func (m *MockRegionTargetHttpsProxies) Get(ctx context.Context, key *meta.Key) (*ga.TargetHttpsProxy, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockRegionTargetHttpsProxies.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -24166,28 +27461,28 @@ func (m *MockAlphaRegionTargetHttpsProxies) Get(ctx context.Context, key *meta.K
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockRegionTargetHttpsProxies.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
- typedObj := obj.ToAlpha()
- klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ typedObj := obj.ToGA()
+ klog.V(5).Infof("MockRegionTargetHttpsProxies.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockAlphaRegionTargetHttpsProxies %v not found", key),
+ Message: fmt.Sprintf("MockRegionTargetHttpsProxies %v not found", key),
}
- klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockRegionTargetHttpsProxies.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
// List all of the objects in the mock in the given region.
-func (m *MockAlphaRegionTargetHttpsProxies) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.TargetHttpsProxy, error) {
+func (m *MockRegionTargetHttpsProxies) List(ctx context.Context, region string, fl *filter.F) ([]*ga.TargetHttpsProxy, error) {
if m.ListHook != nil {
if intercept, objs, err := m.ListHook(ctx, region, fl, m); intercept {
- klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err)
+ klog.V(5).Infof("MockRegionTargetHttpsProxies.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err)
return objs, err
}
}
@@ -24197,31 +27492,31 @@ func (m *MockAlphaRegionTargetHttpsProxies) List(ctx context.Context, region str
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.List(%v, %q, %v) = nil, %v", ctx, region, fl, err)
+ klog.V(5).Infof("MockRegionTargetHttpsProxies.List(%v, %q, %v) = nil, %v", ctx, region, fl, err)
return nil, *m.ListError
}
- var objs []*alpha.TargetHttpsProxy
+ var objs []*ga.TargetHttpsProxy
for key, obj := range m.Objects {
if key.Region != region {
continue
}
- if !fl.Match(obj.ToAlpha()) {
+ if !fl.Match(obj.ToGA()) {
continue
}
- objs = append(objs, obj.ToAlpha())
+ objs = append(objs, obj.ToGA())
}
- klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs))
+ klog.V(5).Infof("MockRegionTargetHttpsProxies.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockAlphaRegionTargetHttpsProxies) Insert(ctx context.Context, key *meta.Key, obj *alpha.TargetHttpsProxy) error {
+func (m *MockRegionTargetHttpsProxies) Insert(ctx context.Context, key *meta.Key, obj *ga.TargetHttpsProxy) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockRegionTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -24233,32 +27528,32 @@ func (m *MockAlphaRegionTargetHttpsProxies) Insert(ctx context.Context, key *met
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockRegionTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockAlphaRegionTargetHttpsProxies %v exists", key),
+ Message: fmt.Sprintf("MockRegionTargetHttpsProxies %v exists", key),
}
- klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockRegionTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "targetHttpsProxies")
- obj.SelfLink = SelfLink(meta.VersionAlpha, projectID, "targetHttpsProxies", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "ga", "targetHttpsProxies")
+ obj.SelfLink = SelfLink(meta.VersionGA, projectID, "targetHttpsProxies", key)
m.Objects[*key] = &MockRegionTargetHttpsProxiesObj{obj}
- klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ klog.V(5).Infof("MockRegionTargetHttpsProxies.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockAlphaRegionTargetHttpsProxies) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockRegionTargetHttpsProxies) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockRegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -24270,30 +27565,30 @@ func (m *MockAlphaRegionTargetHttpsProxies) Delete(ctx context.Context, key *met
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockRegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockAlphaRegionTargetHttpsProxies %v not found", key),
+ Message: fmt.Sprintf("MockRegionTargetHttpsProxies %v not found", key),
}
- klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockRegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockRegionTargetHttpsProxies.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockAlphaRegionTargetHttpsProxies) Obj(o *alpha.TargetHttpsProxy) *MockRegionTargetHttpsProxiesObj {
+func (m *MockRegionTargetHttpsProxies) Obj(o *ga.TargetHttpsProxy) *MockRegionTargetHttpsProxiesObj {
return &MockRegionTargetHttpsProxiesObj{o}
}
// SetSslCertificates is a mock for the corresponding method.
-func (m *MockAlphaRegionTargetHttpsProxies) SetSslCertificates(ctx context.Context, key *meta.Key, arg0 *alpha.RegionTargetHttpsProxiesSetSslCertificatesRequest) error {
+func (m *MockRegionTargetHttpsProxies) SetSslCertificates(ctx context.Context, key *meta.Key, arg0 *ga.RegionTargetHttpsProxiesSetSslCertificatesRequest) error {
if m.SetSslCertificatesHook != nil {
return m.SetSslCertificatesHook(ctx, key, arg0, m)
}
@@ -24301,233 +27596,233 @@ func (m *MockAlphaRegionTargetHttpsProxies) SetSslCertificates(ctx context.Conte
}
// SetUrlMap is a mock for the corresponding method.
-func (m *MockAlphaRegionTargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *alpha.UrlMapReference) error {
+func (m *MockRegionTargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *ga.UrlMapReference) error {
if m.SetUrlMapHook != nil {
return m.SetUrlMapHook(ctx, key, arg0, m)
}
return nil
}
-// GCEAlphaRegionTargetHttpsProxies is a simplifying adapter for the GCE RegionTargetHttpsProxies.
-type GCEAlphaRegionTargetHttpsProxies struct {
+// GCERegionTargetHttpsProxies is a simplifying adapter for the GCE RegionTargetHttpsProxies.
+type GCERegionTargetHttpsProxies struct {
s *Service
}
// Get the TargetHttpsProxy named by key.
-func (g *GCEAlphaRegionTargetHttpsProxies) Get(ctx context.Context, key *meta.Key) (*alpha.TargetHttpsProxy, error) {
- klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.Get(%v, %v): called", ctx, key)
+func (g *GCERegionTargetHttpsProxies) Get(ctx context.Context, key *meta.Key) (*ga.TargetHttpsProxy, error) {
+ klog.V(5).Infof("GCERegionTargetHttpsProxies.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaRegionTargetHttpsProxies.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCERegionTargetHttpsProxies.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionTargetHttpsProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionTargetHttpsProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
- Version: meta.Version("alpha"),
+ Version: meta.Version("ga"),
Service: "RegionTargetHttpsProxies",
}
- klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCERegionTargetHttpsProxies.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCERegionTargetHttpsProxies.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.Alpha.RegionTargetHttpsProxies.Get(projectID, key.Region, key.Name)
+ call := g.s.GA.RegionTargetHttpsProxies.Get(projectID, key.Region, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCERegionTargetHttpsProxies.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
// List all TargetHttpsProxy objects.
-func (g *GCEAlphaRegionTargetHttpsProxies) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.TargetHttpsProxy, error) {
- klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.List(%v, %v, %v) called", ctx, region, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionTargetHttpsProxies")
+func (g *GCERegionTargetHttpsProxies) List(ctx context.Context, region string, fl *filter.F) ([]*ga.TargetHttpsProxy, error) {
+ klog.V(5).Infof("GCERegionTargetHttpsProxies.List(%v, %v, %v) called", ctx, region, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionTargetHttpsProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
- Version: meta.Version("alpha"),
+ Version: meta.Version("ga"),
Service: "RegionTargetHttpsProxies",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk)
- call := g.s.Alpha.RegionTargetHttpsProxies.List(projectID, region)
+ klog.V(5).Infof("GCERegionTargetHttpsProxies.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk)
+ call := g.s.GA.RegionTargetHttpsProxies.List(projectID, region)
if fl != filter.None {
call.Filter(fl.String())
}
- var all []*alpha.TargetHttpsProxy
- f := func(l *alpha.TargetHttpsProxyList) error {
- klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.List(%v, ..., %v): page %+v", ctx, fl, l)
+ var all []*ga.TargetHttpsProxy
+ f := func(l *ga.TargetHttpsProxyList) error {
+ klog.V(5).Infof("GCERegionTargetHttpsProxies.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCERegionTargetHttpsProxies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCERegionTargetHttpsProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCERegionTargetHttpsProxies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
// Insert TargetHttpsProxy with key of value obj.
-func (g *GCEAlphaRegionTargetHttpsProxies) Insert(ctx context.Context, key *meta.Key, obj *alpha.TargetHttpsProxy) error {
- klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.Insert(%v, %v, %+v): called", ctx, key, obj)
+func (g *GCERegionTargetHttpsProxies) Insert(ctx context.Context, key *meta.Key, obj *ga.TargetHttpsProxy) error {
+ klog.V(5).Infof("GCERegionTargetHttpsProxies.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaRegionTargetHttpsProxies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCERegionTargetHttpsProxies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionTargetHttpsProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionTargetHttpsProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
- Version: meta.Version("alpha"),
+ Version: meta.Version("ga"),
Service: "RegionTargetHttpsProxies",
}
- klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCERegionTargetHttpsProxies.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCERegionTargetHttpsProxies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.Alpha.RegionTargetHttpsProxies.Insert(projectID, key.Region, obj)
+ call := g.s.GA.RegionTargetHttpsProxies.Insert(projectID, key.Region, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCERegionTargetHttpsProxies.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCERegionTargetHttpsProxies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
// Delete the TargetHttpsProxy referenced by key.
-func (g *GCEAlphaRegionTargetHttpsProxies) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.Delete(%v, %v): called", ctx, key)
+func (g *GCERegionTargetHttpsProxies) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCERegionTargetHttpsProxies.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaRegionTargetHttpsProxies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCERegionTargetHttpsProxies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionTargetHttpsProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionTargetHttpsProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
- Version: meta.Version("alpha"),
+ Version: meta.Version("ga"),
Service: "RegionTargetHttpsProxies",
}
- klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCERegionTargetHttpsProxies.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCERegionTargetHttpsProxies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Alpha.RegionTargetHttpsProxies.Delete(projectID, key.Region, key.Name)
+ call := g.s.GA.RegionTargetHttpsProxies.Delete(projectID, key.Region, key.Name)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCERegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCERegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// SetSslCertificates is a method on GCEAlphaRegionTargetHttpsProxies.
-func (g *GCEAlphaRegionTargetHttpsProxies) SetSslCertificates(ctx context.Context, key *meta.Key, arg0 *alpha.RegionTargetHttpsProxiesSetSslCertificatesRequest) error {
- klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...): called", ctx, key)
+// SetSslCertificates is a method on GCERegionTargetHttpsProxies.
+func (g *GCERegionTargetHttpsProxies) SetSslCertificates(ctx context.Context, key *meta.Key, arg0 *ga.RegionTargetHttpsProxiesSetSslCertificatesRequest) error {
+ klog.V(5).Infof("GCERegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaRegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCERegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionTargetHttpsProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionTargetHttpsProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "SetSslCertificates",
- Version: meta.Version("alpha"),
+ Version: meta.Version("ga"),
Service: "RegionTargetHttpsProxies",
}
- klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCERegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCERegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Alpha.RegionTargetHttpsProxies.SetSslCertificates(projectID, key.Region, key.Name, arg0)
+ call := g.s.GA.RegionTargetHttpsProxies.SetSslCertificates(projectID, key.Region, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCERegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCERegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// SetUrlMap is a method on GCEAlphaRegionTargetHttpsProxies.
-func (g *GCEAlphaRegionTargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *alpha.UrlMapReference) error {
- klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.SetUrlMap(%v, %v, ...): called", ctx, key)
+// SetUrlMap is a method on GCERegionTargetHttpsProxies.
+func (g *GCERegionTargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *ga.UrlMapReference) error {
+ klog.V(5).Infof("GCERegionTargetHttpsProxies.SetUrlMap(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaRegionTargetHttpsProxies.SetUrlMap(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCERegionTargetHttpsProxies.SetUrlMap(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionTargetHttpsProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionTargetHttpsProxies")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "SetUrlMap",
- Version: meta.Version("alpha"),
+ Version: meta.Version("ga"),
Service: "RegionTargetHttpsProxies",
}
- klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.SetUrlMap(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCERegionTargetHttpsProxies.SetUrlMap(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.SetUrlMap(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCERegionTargetHttpsProxies.SetUrlMap(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Alpha.RegionTargetHttpsProxies.SetUrlMap(projectID, key.Region, key.Name, arg0)
+ call := g.s.GA.RegionTargetHttpsProxies.SetUrlMap(projectID, key.Region, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCERegionTargetHttpsProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCERegionTargetHttpsProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// BetaRegionTargetHttpsProxies is an interface that allows for mocking of RegionTargetHttpsProxies.
-type BetaRegionTargetHttpsProxies interface {
- Get(ctx context.Context, key *meta.Key) (*beta.TargetHttpsProxy, error)
- List(ctx context.Context, region string, fl *filter.F) ([]*beta.TargetHttpsProxy, error)
- Insert(ctx context.Context, key *meta.Key, obj *beta.TargetHttpsProxy) error
+// TargetPools is an interface that allows for mocking of TargetPools.
+type TargetPools interface {
+ Get(ctx context.Context, key *meta.Key) (*ga.TargetPool, error)
+ List(ctx context.Context, region string, fl *filter.F) ([]*ga.TargetPool, error)
+ Insert(ctx context.Context, key *meta.Key, obj *ga.TargetPool) error
Delete(ctx context.Context, key *meta.Key) error
- SetSslCertificates(context.Context, *meta.Key, *beta.RegionTargetHttpsProxiesSetSslCertificatesRequest) error
- SetUrlMap(context.Context, *meta.Key, *beta.UrlMapReference) error
+ AddInstance(context.Context, *meta.Key, *ga.TargetPoolsAddInstanceRequest) error
+ RemoveInstance(context.Context, *meta.Key, *ga.TargetPoolsRemoveInstanceRequest) error
}
-// NewMockBetaRegionTargetHttpsProxies returns a new mock for RegionTargetHttpsProxies.
-func NewMockBetaRegionTargetHttpsProxies(pr ProjectRouter, objs map[meta.Key]*MockRegionTargetHttpsProxiesObj) *MockBetaRegionTargetHttpsProxies {
- mock := &MockBetaRegionTargetHttpsProxies{
+// NewMockTargetPools returns a new mock for TargetPools.
+func NewMockTargetPools(pr ProjectRouter, objs map[meta.Key]*MockTargetPoolsObj) *MockTargetPools {
+ mock := &MockTargetPools{
ProjectRouter: pr,
Objects: objs,
@@ -24538,14 +27833,14 @@ func NewMockBetaRegionTargetHttpsProxies(pr ProjectRouter, objs map[meta.Key]*Mo
return mock
}
-// MockBetaRegionTargetHttpsProxies is the mock for RegionTargetHttpsProxies.
-type MockBetaRegionTargetHttpsProxies struct {
+// MockTargetPools is the mock for TargetPools.
+type MockTargetPools struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
// Objects maintained by the mock.
- Objects map[meta.Key]*MockRegionTargetHttpsProxiesObj
+ Objects map[meta.Key]*MockTargetPoolsObj
// If an entry exists for the given key and operation, then the error
// will be returned instead of the operation.
@@ -24558,12 +27853,12 @@ type MockBetaRegionTargetHttpsProxies struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockBetaRegionTargetHttpsProxies) (bool, *beta.TargetHttpsProxy, error)
- ListHook func(ctx context.Context, region string, fl *filter.F, m *MockBetaRegionTargetHttpsProxies) (bool, []*beta.TargetHttpsProxy, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *beta.TargetHttpsProxy, m *MockBetaRegionTargetHttpsProxies) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaRegionTargetHttpsProxies) (bool, error)
- SetSslCertificatesHook func(context.Context, *meta.Key, *beta.RegionTargetHttpsProxiesSetSslCertificatesRequest, *MockBetaRegionTargetHttpsProxies) error
- SetUrlMapHook func(context.Context, *meta.Key, *beta.UrlMapReference, *MockBetaRegionTargetHttpsProxies) error
+ GetHook func(ctx context.Context, key *meta.Key, m *MockTargetPools) (bool, *ga.TargetPool, error)
+ ListHook func(ctx context.Context, region string, fl *filter.F, m *MockTargetPools) (bool, []*ga.TargetPool, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *ga.TargetPool, m *MockTargetPools) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockTargetPools) (bool, error)
+ AddInstanceHook func(context.Context, *meta.Key, *ga.TargetPoolsAddInstanceRequest, *MockTargetPools) error
+ RemoveInstanceHook func(context.Context, *meta.Key, *ga.TargetPoolsRemoveInstanceRequest, *MockTargetPools) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -24571,10 +27866,10 @@ type MockBetaRegionTargetHttpsProxies struct {
}
// Get returns the object from the mock.
-func (m *MockBetaRegionTargetHttpsProxies) Get(ctx context.Context, key *meta.Key) (*beta.TargetHttpsProxy, error) {
+func (m *MockTargetPools) Get(ctx context.Context, key *meta.Key) (*ga.TargetPool, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockTargetPools.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -24586,28 +27881,28 @@ func (m *MockBetaRegionTargetHttpsProxies) Get(ctx context.Context, key *meta.Ke
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockTargetPools.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
- typedObj := obj.ToBeta()
- klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ typedObj := obj.ToGA()
+ klog.V(5).Infof("MockTargetPools.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockBetaRegionTargetHttpsProxies %v not found", key),
+ Message: fmt.Sprintf("MockTargetPools %v not found", key),
}
- klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockTargetPools.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
// List all of the objects in the mock in the given region.
-func (m *MockBetaRegionTargetHttpsProxies) List(ctx context.Context, region string, fl *filter.F) ([]*beta.TargetHttpsProxy, error) {
+func (m *MockTargetPools) List(ctx context.Context, region string, fl *filter.F) ([]*ga.TargetPool, error) {
if m.ListHook != nil {
if intercept, objs, err := m.ListHook(ctx, region, fl, m); intercept {
- klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err)
+ klog.V(5).Infof("MockTargetPools.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err)
return objs, err
}
}
@@ -24617,31 +27912,31 @@ func (m *MockBetaRegionTargetHttpsProxies) List(ctx context.Context, region stri
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.List(%v, %q, %v) = nil, %v", ctx, region, fl, err)
+ klog.V(5).Infof("MockTargetPools.List(%v, %q, %v) = nil, %v", ctx, region, fl, err)
return nil, *m.ListError
}
- var objs []*beta.TargetHttpsProxy
+ var objs []*ga.TargetPool
for key, obj := range m.Objects {
if key.Region != region {
continue
}
- if !fl.Match(obj.ToBeta()) {
+ if !fl.Match(obj.ToGA()) {
continue
}
- objs = append(objs, obj.ToBeta())
+ objs = append(objs, obj.ToGA())
}
- klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs))
+ klog.V(5).Infof("MockTargetPools.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockBetaRegionTargetHttpsProxies) Insert(ctx context.Context, key *meta.Key, obj *beta.TargetHttpsProxy) error {
+func (m *MockTargetPools) Insert(ctx context.Context, key *meta.Key, obj *ga.TargetPool) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockTargetPools.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -24653,32 +27948,32 @@ func (m *MockBetaRegionTargetHttpsProxies) Insert(ctx context.Context, key *meta
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockTargetPools.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockBetaRegionTargetHttpsProxies %v exists", key),
+ Message: fmt.Sprintf("MockTargetPools %v exists", key),
}
- klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockTargetPools.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "beta", "targetHttpsProxies")
- obj.SelfLink = SelfLink(meta.VersionBeta, projectID, "targetHttpsProxies", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "ga", "targetPools")
+ obj.SelfLink = SelfLink(meta.VersionGA, projectID, "targetPools", key)
- m.Objects[*key] = &MockRegionTargetHttpsProxiesObj{obj}
- klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ m.Objects[*key] = &MockTargetPoolsObj{obj}
+ klog.V(5).Infof("MockTargetPools.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockBetaRegionTargetHttpsProxies) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockTargetPools) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockTargetPools.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -24690,264 +27985,263 @@ func (m *MockBetaRegionTargetHttpsProxies) Delete(ctx context.Context, key *meta
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockTargetPools.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockBetaRegionTargetHttpsProxies %v not found", key),
+ Message: fmt.Sprintf("MockTargetPools %v not found", key),
}
- klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockTargetPools.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockTargetPools.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockBetaRegionTargetHttpsProxies) Obj(o *beta.TargetHttpsProxy) *MockRegionTargetHttpsProxiesObj {
- return &MockRegionTargetHttpsProxiesObj{o}
+func (m *MockTargetPools) Obj(o *ga.TargetPool) *MockTargetPoolsObj {
+ return &MockTargetPoolsObj{o}
}
-// SetSslCertificates is a mock for the corresponding method.
-func (m *MockBetaRegionTargetHttpsProxies) SetSslCertificates(ctx context.Context, key *meta.Key, arg0 *beta.RegionTargetHttpsProxiesSetSslCertificatesRequest) error {
- if m.SetSslCertificatesHook != nil {
- return m.SetSslCertificatesHook(ctx, key, arg0, m)
+// AddInstance is a mock for the corresponding method.
+func (m *MockTargetPools) AddInstance(ctx context.Context, key *meta.Key, arg0 *ga.TargetPoolsAddInstanceRequest) error {
+ if m.AddInstanceHook != nil {
+ return m.AddInstanceHook(ctx, key, arg0, m)
}
return nil
}
-// SetUrlMap is a mock for the corresponding method.
-func (m *MockBetaRegionTargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *beta.UrlMapReference) error {
- if m.SetUrlMapHook != nil {
- return m.SetUrlMapHook(ctx, key, arg0, m)
+// RemoveInstance is a mock for the corresponding method.
+func (m *MockTargetPools) RemoveInstance(ctx context.Context, key *meta.Key, arg0 *ga.TargetPoolsRemoveInstanceRequest) error {
+ if m.RemoveInstanceHook != nil {
+ return m.RemoveInstanceHook(ctx, key, arg0, m)
}
return nil
}
-// GCEBetaRegionTargetHttpsProxies is a simplifying adapter for the GCE RegionTargetHttpsProxies.
-type GCEBetaRegionTargetHttpsProxies struct {
+// GCETargetPools is a simplifying adapter for the GCE TargetPools.
+type GCETargetPools struct {
s *Service
}
-// Get the TargetHttpsProxy named by key.
-func (g *GCEBetaRegionTargetHttpsProxies) Get(ctx context.Context, key *meta.Key) (*beta.TargetHttpsProxy, error) {
- klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.Get(%v, %v): called", ctx, key)
+// Get the TargetPool named by key.
+func (g *GCETargetPools) Get(ctx context.Context, key *meta.Key) (*ga.TargetPool, error) {
+ klog.V(5).Infof("GCETargetPools.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaRegionTargetHttpsProxies.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCETargetPools.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionTargetHttpsProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "TargetPools")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
- Version: meta.Version("beta"),
- Service: "RegionTargetHttpsProxies",
+ Version: meta.Version("ga"),
+ Service: "TargetPools",
}
- klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCETargetPools.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCETargetPools.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.Beta.RegionTargetHttpsProxies.Get(projectID, key.Region, key.Name)
+ call := g.s.GA.TargetPools.Get(projectID, key.Region, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCETargetPools.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
-// List all TargetHttpsProxy objects.
-func (g *GCEBetaRegionTargetHttpsProxies) List(ctx context.Context, region string, fl *filter.F) ([]*beta.TargetHttpsProxy, error) {
- klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.List(%v, %v, %v) called", ctx, region, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionTargetHttpsProxies")
+// List all TargetPool objects.
+func (g *GCETargetPools) List(ctx context.Context, region string, fl *filter.F) ([]*ga.TargetPool, error) {
+ klog.V(5).Infof("GCETargetPools.List(%v, %v, %v) called", ctx, region, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "TargetPools")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
- Version: meta.Version("beta"),
- Service: "RegionTargetHttpsProxies",
+ Version: meta.Version("ga"),
+ Service: "TargetPools",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk)
- call := g.s.Beta.RegionTargetHttpsProxies.List(projectID, region)
+ klog.V(5).Infof("GCETargetPools.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk)
+ call := g.s.GA.TargetPools.List(projectID, region)
if fl != filter.None {
call.Filter(fl.String())
}
- var all []*beta.TargetHttpsProxy
- f := func(l *beta.TargetHttpsProxyList) error {
- klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.List(%v, ..., %v): page %+v", ctx, fl, l)
+ var all []*ga.TargetPool
+ f := func(l *ga.TargetPoolList) error {
+ klog.V(5).Infof("GCETargetPools.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCETargetPools.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCETargetPools.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCETargetPools.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
-// Insert TargetHttpsProxy with key of value obj.
-func (g *GCEBetaRegionTargetHttpsProxies) Insert(ctx context.Context, key *meta.Key, obj *beta.TargetHttpsProxy) error {
- klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.Insert(%v, %v, %+v): called", ctx, key, obj)
+// Insert TargetPool with key of value obj.
+func (g *GCETargetPools) Insert(ctx context.Context, key *meta.Key, obj *ga.TargetPool) error {
+ klog.V(5).Infof("GCETargetPools.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaRegionTargetHttpsProxies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCETargetPools.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionTargetHttpsProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "TargetPools")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
- Version: meta.Version("beta"),
- Service: "RegionTargetHttpsProxies",
+ Version: meta.Version("ga"),
+ Service: "TargetPools",
}
- klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCETargetPools.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCETargetPools.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.Beta.RegionTargetHttpsProxies.Insert(projectID, key.Region, obj)
+ call := g.s.GA.TargetPools.Insert(projectID, key.Region, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCETargetPools.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCETargetPools.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
-// Delete the TargetHttpsProxy referenced by key.
-func (g *GCEBetaRegionTargetHttpsProxies) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.Delete(%v, %v): called", ctx, key)
+// Delete the TargetPool referenced by key.
+func (g *GCETargetPools) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCETargetPools.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaRegionTargetHttpsProxies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCETargetPools.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionTargetHttpsProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "TargetPools")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
- Version: meta.Version("beta"),
- Service: "RegionTargetHttpsProxies",
+ Version: meta.Version("ga"),
+ Service: "TargetPools",
}
- klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCETargetPools.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCETargetPools.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Beta.RegionTargetHttpsProxies.Delete(projectID, key.Region, key.Name)
+ call := g.s.GA.TargetPools.Delete(projectID, key.Region, key.Name)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCETargetPools.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCETargetPools.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// SetSslCertificates is a method on GCEBetaRegionTargetHttpsProxies.
-func (g *GCEBetaRegionTargetHttpsProxies) SetSslCertificates(ctx context.Context, key *meta.Key, arg0 *beta.RegionTargetHttpsProxiesSetSslCertificatesRequest) error {
- klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...): called", ctx, key)
+// AddInstance is a method on GCETargetPools.
+func (g *GCETargetPools) AddInstance(ctx context.Context, key *meta.Key, arg0 *ga.TargetPoolsAddInstanceRequest) error {
+ klog.V(5).Infof("GCETargetPools.AddInstance(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaRegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCETargetPools.AddInstance(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionTargetHttpsProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "TargetPools")
rk := &RateLimitKey{
- ProjectID: projectID,
- Operation: "SetSslCertificates",
- Version: meta.Version("beta"),
- Service: "RegionTargetHttpsProxies",
+ ProjectID: projectID,
+ Operation: "AddInstance",
+ Version: meta.Version("ga"),
+ Service: "TargetPools",
}
- klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCETargetPools.AddInstance(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCETargetPools.AddInstance(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Beta.RegionTargetHttpsProxies.SetSslCertificates(projectID, key.Region, key.Name, arg0)
+ call := g.s.GA.TargetPools.AddInstance(projectID, key.Region, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCETargetPools.AddInstance(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCETargetPools.AddInstance(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// SetUrlMap is a method on GCEBetaRegionTargetHttpsProxies.
-func (g *GCEBetaRegionTargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *beta.UrlMapReference) error {
- klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.SetUrlMap(%v, %v, ...): called", ctx, key)
+// RemoveInstance is a method on GCETargetPools.
+func (g *GCETargetPools) RemoveInstance(ctx context.Context, key *meta.Key, arg0 *ga.TargetPoolsRemoveInstanceRequest) error {
+ klog.V(5).Infof("GCETargetPools.RemoveInstance(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaRegionTargetHttpsProxies.SetUrlMap(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCETargetPools.RemoveInstance(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionTargetHttpsProxies")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "TargetPools")
rk := &RateLimitKey{
ProjectID: projectID,
- Operation: "SetUrlMap",
- Version: meta.Version("beta"),
- Service: "RegionTargetHttpsProxies",
+ Operation: "RemoveInstance",
+ Version: meta.Version("ga"),
+ Service: "TargetPools",
}
- klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.SetUrlMap(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCETargetPools.RemoveInstance(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.SetUrlMap(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCETargetPools.RemoveInstance(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Beta.RegionTargetHttpsProxies.SetUrlMap(projectID, key.Region, key.Name, arg0)
+ call := g.s.GA.TargetPools.RemoveInstance(projectID, key.Region, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCETargetPools.RemoveInstance(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCETargetPools.RemoveInstance(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// TargetPools is an interface that allows for mocking of TargetPools.
-type TargetPools interface {
- Get(ctx context.Context, key *meta.Key) (*ga.TargetPool, error)
- List(ctx context.Context, region string, fl *filter.F) ([]*ga.TargetPool, error)
- Insert(ctx context.Context, key *meta.Key, obj *ga.TargetPool) error
+// AlphaUrlMaps is an interface that allows for mocking of UrlMaps.
+type AlphaUrlMaps interface {
+ Get(ctx context.Context, key *meta.Key) (*alpha.UrlMap, error)
+ List(ctx context.Context, fl *filter.F) ([]*alpha.UrlMap, error)
+ Insert(ctx context.Context, key *meta.Key, obj *alpha.UrlMap) error
Delete(ctx context.Context, key *meta.Key) error
- AddInstance(context.Context, *meta.Key, *ga.TargetPoolsAddInstanceRequest) error
- RemoveInstance(context.Context, *meta.Key, *ga.TargetPoolsRemoveInstanceRequest) error
+ Update(context.Context, *meta.Key, *alpha.UrlMap) error
}
-// NewMockTargetPools returns a new mock for TargetPools.
-func NewMockTargetPools(pr ProjectRouter, objs map[meta.Key]*MockTargetPoolsObj) *MockTargetPools {
- mock := &MockTargetPools{
+// NewMockAlphaUrlMaps returns a new mock for UrlMaps.
+func NewMockAlphaUrlMaps(pr ProjectRouter, objs map[meta.Key]*MockUrlMapsObj) *MockAlphaUrlMaps {
+ mock := &MockAlphaUrlMaps{
ProjectRouter: pr,
Objects: objs,
@@ -24958,14 +28252,14 @@ func NewMockTargetPools(pr ProjectRouter, objs map[meta.Key]*MockTargetPoolsObj)
return mock
}
-// MockTargetPools is the mock for TargetPools.
-type MockTargetPools struct {
+// MockAlphaUrlMaps is the mock for UrlMaps.
+type MockAlphaUrlMaps struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
// Objects maintained by the mock.
- Objects map[meta.Key]*MockTargetPoolsObj
+ Objects map[meta.Key]*MockUrlMapsObj
// If an entry exists for the given key and operation, then the error
// will be returned instead of the operation.
@@ -24978,12 +28272,11 @@ type MockTargetPools struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockTargetPools) (bool, *ga.TargetPool, error)
- ListHook func(ctx context.Context, region string, fl *filter.F, m *MockTargetPools) (bool, []*ga.TargetPool, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *ga.TargetPool, m *MockTargetPools) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockTargetPools) (bool, error)
- AddInstanceHook func(context.Context, *meta.Key, *ga.TargetPoolsAddInstanceRequest, *MockTargetPools) error
- RemoveInstanceHook func(context.Context, *meta.Key, *ga.TargetPoolsRemoveInstanceRequest, *MockTargetPools) error
+ GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaUrlMaps) (bool, *alpha.UrlMap, error)
+ ListHook func(ctx context.Context, fl *filter.F, m *MockAlphaUrlMaps) (bool, []*alpha.UrlMap, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *alpha.UrlMap, m *MockAlphaUrlMaps) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaUrlMaps) (bool, error)
+ UpdateHook func(context.Context, *meta.Key, *alpha.UrlMap, *MockAlphaUrlMaps) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -24991,10 +28284,10 @@ type MockTargetPools struct {
}
// Get returns the object from the mock.
-func (m *MockTargetPools) Get(ctx context.Context, key *meta.Key) (*ga.TargetPool, error) {
+func (m *MockAlphaUrlMaps) Get(ctx context.Context, key *meta.Key) (*alpha.UrlMap, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockTargetPools.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaUrlMaps.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -25006,28 +28299,28 @@ func (m *MockTargetPools) Get(ctx context.Context, key *meta.Key) (*ga.TargetPoo
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockTargetPools.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaUrlMaps.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
- typedObj := obj.ToGA()
- klog.V(5).Infof("MockTargetPools.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ typedObj := obj.ToAlpha()
+ klog.V(5).Infof("MockAlphaUrlMaps.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockTargetPools %v not found", key),
+ Message: fmt.Sprintf("MockAlphaUrlMaps %v not found", key),
}
- klog.V(5).Infof("MockTargetPools.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaUrlMaps.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
-// List all of the objects in the mock in the given region.
-func (m *MockTargetPools) List(ctx context.Context, region string, fl *filter.F) ([]*ga.TargetPool, error) {
+// List all of the objects in the mock.
+func (m *MockAlphaUrlMaps) List(ctx context.Context, fl *filter.F) ([]*alpha.UrlMap, error) {
if m.ListHook != nil {
- if intercept, objs, err := m.ListHook(ctx, region, fl, m); intercept {
- klog.V(5).Infof("MockTargetPools.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err)
+ if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
+ klog.V(5).Infof("MockAlphaUrlMaps.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
return objs, err
}
}
@@ -25037,31 +28330,28 @@ func (m *MockTargetPools) List(ctx context.Context, region string, fl *filter.F)
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockTargetPools.List(%v, %q, %v) = nil, %v", ctx, region, fl, err)
+ klog.V(5).Infof("MockAlphaUrlMaps.List(%v, %v) = nil, %v", ctx, fl, err)
return nil, *m.ListError
}
- var objs []*ga.TargetPool
- for key, obj := range m.Objects {
- if key.Region != region {
- continue
- }
- if !fl.Match(obj.ToGA()) {
+ var objs []*alpha.UrlMap
+ for _, obj := range m.Objects {
+ if !fl.Match(obj.ToAlpha()) {
continue
}
- objs = append(objs, obj.ToGA())
+ objs = append(objs, obj.ToAlpha())
}
- klog.V(5).Infof("MockTargetPools.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs))
+ klog.V(5).Infof("MockAlphaUrlMaps.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockTargetPools) Insert(ctx context.Context, key *meta.Key, obj *ga.TargetPool) error {
+func (m *MockAlphaUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *alpha.UrlMap) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockTargetPools.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -25073,32 +28363,32 @@ func (m *MockTargetPools) Insert(ctx context.Context, key *meta.Key, obj *ga.Tar
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockTargetPools.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockTargetPools %v exists", key),
+ Message: fmt.Sprintf("MockAlphaUrlMaps %v exists", key),
}
- klog.V(5).Infof("MockTargetPools.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "ga", "targetPools")
- obj.SelfLink = SelfLink(meta.VersionGA, projectID, "targetPools", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "urlMaps")
+ obj.SelfLink = SelfLink(meta.VersionAlpha, projectID, "urlMaps", key)
- m.Objects[*key] = &MockTargetPoolsObj{obj}
- klog.V(5).Infof("MockTargetPools.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ m.Objects[*key] = &MockUrlMapsObj{obj}
+ klog.V(5).Infof("MockAlphaUrlMaps.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockTargetPools) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockAlphaUrlMaps) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockTargetPools.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -25110,263 +28400,223 @@ func (m *MockTargetPools) Delete(ctx context.Context, key *meta.Key) error {
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockTargetPools.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockTargetPools %v not found", key),
+ Message: fmt.Sprintf("MockAlphaUrlMaps %v not found", key),
}
- klog.V(5).Infof("MockTargetPools.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockTargetPools.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockAlphaUrlMaps.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockTargetPools) Obj(o *ga.TargetPool) *MockTargetPoolsObj {
- return &MockTargetPoolsObj{o}
-}
-
-// AddInstance is a mock for the corresponding method.
-func (m *MockTargetPools) AddInstance(ctx context.Context, key *meta.Key, arg0 *ga.TargetPoolsAddInstanceRequest) error {
- if m.AddInstanceHook != nil {
- return m.AddInstanceHook(ctx, key, arg0, m)
- }
- return nil
+func (m *MockAlphaUrlMaps) Obj(o *alpha.UrlMap) *MockUrlMapsObj {
+ return &MockUrlMapsObj{o}
}
-// RemoveInstance is a mock for the corresponding method.
-func (m *MockTargetPools) RemoveInstance(ctx context.Context, key *meta.Key, arg0 *ga.TargetPoolsRemoveInstanceRequest) error {
- if m.RemoveInstanceHook != nil {
- return m.RemoveInstanceHook(ctx, key, arg0, m)
+// Update is a mock for the corresponding method.
+func (m *MockAlphaUrlMaps) Update(ctx context.Context, key *meta.Key, arg0 *alpha.UrlMap) error {
+ if m.UpdateHook != nil {
+ return m.UpdateHook(ctx, key, arg0, m)
}
return nil
}
-// GCETargetPools is a simplifying adapter for the GCE TargetPools.
-type GCETargetPools struct {
+// GCEAlphaUrlMaps is a simplifying adapter for the GCE UrlMaps.
+type GCEAlphaUrlMaps struct {
s *Service
}
-// Get the TargetPool named by key.
-func (g *GCETargetPools) Get(ctx context.Context, key *meta.Key) (*ga.TargetPool, error) {
- klog.V(5).Infof("GCETargetPools.Get(%v, %v): called", ctx, key)
+// Get the UrlMap named by key.
+func (g *GCEAlphaUrlMaps) Get(ctx context.Context, key *meta.Key) (*alpha.UrlMap, error) {
+ klog.V(5).Infof("GCEAlphaUrlMaps.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCETargetPools.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaUrlMaps.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "TargetPools")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "UrlMaps")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
- Version: meta.Version("ga"),
- Service: "TargetPools",
+ Version: meta.Version("alpha"),
+ Service: "UrlMaps",
}
- klog.V(5).Infof("GCETargetPools.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaUrlMaps.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCETargetPools.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaUrlMaps.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.GA.TargetPools.Get(projectID, key.Region, key.Name)
+ call := g.s.Alpha.UrlMaps.Get(projectID, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCETargetPools.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEAlphaUrlMaps.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
-// List all TargetPool objects.
-func (g *GCETargetPools) List(ctx context.Context, region string, fl *filter.F) ([]*ga.TargetPool, error) {
- klog.V(5).Infof("GCETargetPools.List(%v, %v, %v) called", ctx, region, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "TargetPools")
+// List all UrlMap objects.
+func (g *GCEAlphaUrlMaps) List(ctx context.Context, fl *filter.F) ([]*alpha.UrlMap, error) {
+ klog.V(5).Infof("GCEAlphaUrlMaps.List(%v, %v) called", ctx, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "UrlMaps")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
- Version: meta.Version("ga"),
- Service: "TargetPools",
+ Version: meta.Version("alpha"),
+ Service: "UrlMaps",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCETargetPools.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk)
- call := g.s.GA.TargetPools.List(projectID, region)
+ klog.V(5).Infof("GCEAlphaUrlMaps.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
+ call := g.s.Alpha.UrlMaps.List(projectID)
if fl != filter.None {
call.Filter(fl.String())
}
- var all []*ga.TargetPool
- f := func(l *ga.TargetPoolList) error {
- klog.V(5).Infof("GCETargetPools.List(%v, ..., %v): page %+v", ctx, fl, l)
+ var all []*alpha.UrlMap
+ f := func(l *alpha.UrlMapList) error {
+ klog.V(5).Infof("GCEAlphaUrlMaps.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCETargetPools.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEAlphaUrlMaps.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCETargetPools.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEAlphaUrlMaps.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCETargetPools.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEAlphaUrlMaps.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
-// Insert TargetPool with key of value obj.
-func (g *GCETargetPools) Insert(ctx context.Context, key *meta.Key, obj *ga.TargetPool) error {
- klog.V(5).Infof("GCETargetPools.Insert(%v, %v, %+v): called", ctx, key, obj)
- if !key.Valid() {
- klog.V(2).Infof("GCETargetPools.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
- return fmt.Errorf("invalid GCE key (%+v)", key)
- }
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "TargetPools")
- rk := &RateLimitKey{
- ProjectID: projectID,
- Operation: "Insert",
- Version: meta.Version("ga"),
- Service: "TargetPools",
- }
- klog.V(5).Infof("GCETargetPools.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
- if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCETargetPools.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
- return err
- }
- obj.Name = key.Name
- call := g.s.GA.TargetPools.Insert(projectID, key.Region, obj)
- call.Context(ctx)
-
- op, err := call.Do()
- if err != nil {
- klog.V(4).Infof("GCETargetPools.Insert(%v, %v, ...) = %+v", ctx, key, err)
- return err
- }
-
- err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCETargetPools.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
- return err
-}
-
-// Delete the TargetPool referenced by key.
-func (g *GCETargetPools) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCETargetPools.Delete(%v, %v): called", ctx, key)
+// Insert UrlMap with key of value obj.
+func (g *GCEAlphaUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *alpha.UrlMap) error {
+ klog.V(5).Infof("GCEAlphaUrlMaps.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCETargetPools.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaUrlMaps.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "TargetPools")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "UrlMaps")
rk := &RateLimitKey{
ProjectID: projectID,
- Operation: "Delete",
- Version: meta.Version("ga"),
- Service: "TargetPools",
+ Operation: "Insert",
+ Version: meta.Version("alpha"),
+ Service: "UrlMaps",
}
- klog.V(5).Infof("GCETargetPools.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaUrlMaps.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCETargetPools.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaUrlMaps.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.GA.TargetPools.Delete(projectID, key.Region, key.Name)
+ obj.Name = key.Name
+ call := g.s.Alpha.UrlMaps.Insert(projectID, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCETargetPools.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaUrlMaps.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCETargetPools.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaUrlMaps.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
-// AddInstance is a method on GCETargetPools.
-func (g *GCETargetPools) AddInstance(ctx context.Context, key *meta.Key, arg0 *ga.TargetPoolsAddInstanceRequest) error {
- klog.V(5).Infof("GCETargetPools.AddInstance(%v, %v, ...): called", ctx, key)
-
+// Delete the UrlMap referenced by key.
+func (g *GCEAlphaUrlMaps) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEAlphaUrlMaps.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCETargetPools.AddInstance(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaUrlMaps.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "TargetPools")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "UrlMaps")
rk := &RateLimitKey{
ProjectID: projectID,
- Operation: "AddInstance",
- Version: meta.Version("ga"),
- Service: "TargetPools",
+ Operation: "Delete",
+ Version: meta.Version("alpha"),
+ Service: "UrlMaps",
}
- klog.V(5).Infof("GCETargetPools.AddInstance(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
-
+ klog.V(5).Infof("GCEAlphaUrlMaps.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCETargetPools.AddInstance(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaUrlMaps.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.GA.TargetPools.AddInstance(projectID, key.Region, key.Name, arg0)
+ call := g.s.Alpha.UrlMaps.Delete(projectID, key.Name)
+
call.Context(ctx)
+
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCETargetPools.AddInstance(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
return err
}
+
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCETargetPools.AddInstance(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// RemoveInstance is a method on GCETargetPools.
-func (g *GCETargetPools) RemoveInstance(ctx context.Context, key *meta.Key, arg0 *ga.TargetPoolsRemoveInstanceRequest) error {
- klog.V(5).Infof("GCETargetPools.RemoveInstance(%v, %v, ...): called", ctx, key)
+// Update is a method on GCEAlphaUrlMaps.
+func (g *GCEAlphaUrlMaps) Update(ctx context.Context, key *meta.Key, arg0 *alpha.UrlMap) error {
+ klog.V(5).Infof("GCEAlphaUrlMaps.Update(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCETargetPools.RemoveInstance(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaUrlMaps.Update(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "TargetPools")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "UrlMaps")
rk := &RateLimitKey{
ProjectID: projectID,
- Operation: "RemoveInstance",
- Version: meta.Version("ga"),
- Service: "TargetPools",
+ Operation: "Update",
+ Version: meta.Version("alpha"),
+ Service: "UrlMaps",
}
- klog.V(5).Infof("GCETargetPools.RemoveInstance(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaUrlMaps.Update(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCETargetPools.RemoveInstance(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaUrlMaps.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.GA.TargetPools.RemoveInstance(projectID, key.Region, key.Name, arg0)
+ call := g.s.Alpha.UrlMaps.Update(projectID, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCETargetPools.RemoveInstance(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaUrlMaps.Update(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCETargetPools.RemoveInstance(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaUrlMaps.Update(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// AlphaUrlMaps is an interface that allows for mocking of UrlMaps.
-type AlphaUrlMaps interface {
- Get(ctx context.Context, key *meta.Key) (*alpha.UrlMap, error)
- List(ctx context.Context, fl *filter.F) ([]*alpha.UrlMap, error)
- Insert(ctx context.Context, key *meta.Key, obj *alpha.UrlMap) error
+// BetaUrlMaps is an interface that allows for mocking of UrlMaps.
+type BetaUrlMaps interface {
+ Get(ctx context.Context, key *meta.Key) (*beta.UrlMap, error)
+ List(ctx context.Context, fl *filter.F) ([]*beta.UrlMap, error)
+ Insert(ctx context.Context, key *meta.Key, obj *beta.UrlMap) error
Delete(ctx context.Context, key *meta.Key) error
- Update(context.Context, *meta.Key, *alpha.UrlMap) error
+ Update(context.Context, *meta.Key, *beta.UrlMap) error
}
-// NewMockAlphaUrlMaps returns a new mock for UrlMaps.
-func NewMockAlphaUrlMaps(pr ProjectRouter, objs map[meta.Key]*MockUrlMapsObj) *MockAlphaUrlMaps {
- mock := &MockAlphaUrlMaps{
+// NewMockBetaUrlMaps returns a new mock for UrlMaps.
+func NewMockBetaUrlMaps(pr ProjectRouter, objs map[meta.Key]*MockUrlMapsObj) *MockBetaUrlMaps {
+ mock := &MockBetaUrlMaps{
ProjectRouter: pr,
Objects: objs,
@@ -25377,8 +28627,8 @@ func NewMockAlphaUrlMaps(pr ProjectRouter, objs map[meta.Key]*MockUrlMapsObj) *M
return mock
}
-// MockAlphaUrlMaps is the mock for UrlMaps.
-type MockAlphaUrlMaps struct {
+// MockBetaUrlMaps is the mock for UrlMaps.
+type MockBetaUrlMaps struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
@@ -25397,11 +28647,11 @@ type MockAlphaUrlMaps struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaUrlMaps) (bool, *alpha.UrlMap, error)
- ListHook func(ctx context.Context, fl *filter.F, m *MockAlphaUrlMaps) (bool, []*alpha.UrlMap, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *alpha.UrlMap, m *MockAlphaUrlMaps) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaUrlMaps) (bool, error)
- UpdateHook func(context.Context, *meta.Key, *alpha.UrlMap, *MockAlphaUrlMaps) error
+ GetHook func(ctx context.Context, key *meta.Key, m *MockBetaUrlMaps) (bool, *beta.UrlMap, error)
+ ListHook func(ctx context.Context, fl *filter.F, m *MockBetaUrlMaps) (bool, []*beta.UrlMap, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *beta.UrlMap, m *MockBetaUrlMaps) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaUrlMaps) (bool, error)
+ UpdateHook func(context.Context, *meta.Key, *beta.UrlMap, *MockBetaUrlMaps) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -25409,10 +28659,10 @@ type MockAlphaUrlMaps struct {
}
// Get returns the object from the mock.
-func (m *MockAlphaUrlMaps) Get(ctx context.Context, key *meta.Key) (*alpha.UrlMap, error) {
+func (m *MockBetaUrlMaps) Get(ctx context.Context, key *meta.Key) (*beta.UrlMap, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockAlphaUrlMaps.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaUrlMaps.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -25424,28 +28674,28 @@ func (m *MockAlphaUrlMaps) Get(ctx context.Context, key *meta.Key) (*alpha.UrlMa
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockAlphaUrlMaps.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaUrlMaps.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
- typedObj := obj.ToAlpha()
- klog.V(5).Infof("MockAlphaUrlMaps.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ typedObj := obj.ToBeta()
+ klog.V(5).Infof("MockBetaUrlMaps.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockAlphaUrlMaps %v not found", key),
+ Message: fmt.Sprintf("MockBetaUrlMaps %v not found", key),
}
- klog.V(5).Infof("MockAlphaUrlMaps.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaUrlMaps.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
// List all of the objects in the mock.
-func (m *MockAlphaUrlMaps) List(ctx context.Context, fl *filter.F) ([]*alpha.UrlMap, error) {
+func (m *MockBetaUrlMaps) List(ctx context.Context, fl *filter.F) ([]*beta.UrlMap, error) {
if m.ListHook != nil {
if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
- klog.V(5).Infof("MockAlphaUrlMaps.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
+ klog.V(5).Infof("MockBetaUrlMaps.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
return objs, err
}
}
@@ -25455,28 +28705,28 @@ func (m *MockAlphaUrlMaps) List(ctx context.Context, fl *filter.F) ([]*alpha.Url
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockAlphaUrlMaps.List(%v, %v) = nil, %v", ctx, fl, err)
+ klog.V(5).Infof("MockBetaUrlMaps.List(%v, %v) = nil, %v", ctx, fl, err)
return nil, *m.ListError
}
- var objs []*alpha.UrlMap
+ var objs []*beta.UrlMap
for _, obj := range m.Objects {
- if !fl.Match(obj.ToAlpha()) {
+ if !fl.Match(obj.ToBeta()) {
continue
}
- objs = append(objs, obj.ToAlpha())
+ objs = append(objs, obj.ToBeta())
}
- klog.V(5).Infof("MockAlphaUrlMaps.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
+ klog.V(5).Infof("MockBetaUrlMaps.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockAlphaUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *alpha.UrlMap) error {
+func (m *MockBetaUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *beta.UrlMap) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockAlphaUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -25488,32 +28738,32 @@ func (m *MockAlphaUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *alpha
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockAlphaUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockAlphaUrlMaps %v exists", key),
+ Message: fmt.Sprintf("MockBetaUrlMaps %v exists", key),
}
- klog.V(5).Infof("MockAlphaUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "urlMaps")
- obj.SelfLink = SelfLink(meta.VersionAlpha, projectID, "urlMaps", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "beta", "urlMaps")
+ obj.SelfLink = SelfLink(meta.VersionBeta, projectID, "urlMaps", key)
m.Objects[*key] = &MockUrlMapsObj{obj}
- klog.V(5).Infof("MockAlphaUrlMaps.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ klog.V(5).Infof("MockBetaUrlMaps.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockAlphaUrlMaps) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockBetaUrlMaps) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockAlphaUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -25525,223 +28775,223 @@ func (m *MockAlphaUrlMaps) Delete(ctx context.Context, key *meta.Key) error {
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockAlphaUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockAlphaUrlMaps %v not found", key),
+ Message: fmt.Sprintf("MockBetaUrlMaps %v not found", key),
}
- klog.V(5).Infof("MockAlphaUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockAlphaUrlMaps.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockBetaUrlMaps.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockAlphaUrlMaps) Obj(o *alpha.UrlMap) *MockUrlMapsObj {
+func (m *MockBetaUrlMaps) Obj(o *beta.UrlMap) *MockUrlMapsObj {
return &MockUrlMapsObj{o}
}
// Update is a mock for the corresponding method.
-func (m *MockAlphaUrlMaps) Update(ctx context.Context, key *meta.Key, arg0 *alpha.UrlMap) error {
+func (m *MockBetaUrlMaps) Update(ctx context.Context, key *meta.Key, arg0 *beta.UrlMap) error {
if m.UpdateHook != nil {
return m.UpdateHook(ctx, key, arg0, m)
}
return nil
}
-// GCEAlphaUrlMaps is a simplifying adapter for the GCE UrlMaps.
-type GCEAlphaUrlMaps struct {
+// GCEBetaUrlMaps is a simplifying adapter for the GCE UrlMaps.
+type GCEBetaUrlMaps struct {
s *Service
}
// Get the UrlMap named by key.
-func (g *GCEAlphaUrlMaps) Get(ctx context.Context, key *meta.Key) (*alpha.UrlMap, error) {
- klog.V(5).Infof("GCEAlphaUrlMaps.Get(%v, %v): called", ctx, key)
+func (g *GCEBetaUrlMaps) Get(ctx context.Context, key *meta.Key) (*beta.UrlMap, error) {
+ klog.V(5).Infof("GCEBetaUrlMaps.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaUrlMaps.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaUrlMaps.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "UrlMaps")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "UrlMaps")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
- Version: meta.Version("alpha"),
+ Version: meta.Version("beta"),
Service: "UrlMaps",
}
- klog.V(5).Infof("GCEAlphaUrlMaps.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaUrlMaps.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaUrlMaps.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaUrlMaps.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.Alpha.UrlMaps.Get(projectID, key.Name)
+ call := g.s.Beta.UrlMaps.Get(projectID, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEAlphaUrlMaps.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEBetaUrlMaps.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
// List all UrlMap objects.
-func (g *GCEAlphaUrlMaps) List(ctx context.Context, fl *filter.F) ([]*alpha.UrlMap, error) {
- klog.V(5).Infof("GCEAlphaUrlMaps.List(%v, %v) called", ctx, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "UrlMaps")
+func (g *GCEBetaUrlMaps) List(ctx context.Context, fl *filter.F) ([]*beta.UrlMap, error) {
+ klog.V(5).Infof("GCEBetaUrlMaps.List(%v, %v) called", ctx, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "UrlMaps")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
- Version: meta.Version("alpha"),
+ Version: meta.Version("beta"),
Service: "UrlMaps",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCEAlphaUrlMaps.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
- call := g.s.Alpha.UrlMaps.List(projectID)
+ klog.V(5).Infof("GCEBetaUrlMaps.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
+ call := g.s.Beta.UrlMaps.List(projectID)
if fl != filter.None {
call.Filter(fl.String())
}
- var all []*alpha.UrlMap
- f := func(l *alpha.UrlMapList) error {
- klog.V(5).Infof("GCEAlphaUrlMaps.List(%v, ..., %v): page %+v", ctx, fl, l)
+ var all []*beta.UrlMap
+ f := func(l *beta.UrlMapList) error {
+ klog.V(5).Infof("GCEBetaUrlMaps.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEAlphaUrlMaps.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEBetaUrlMaps.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEAlphaUrlMaps.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEBetaUrlMaps.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEAlphaUrlMaps.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEBetaUrlMaps.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
// Insert UrlMap with key of value obj.
-func (g *GCEAlphaUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *alpha.UrlMap) error {
- klog.V(5).Infof("GCEAlphaUrlMaps.Insert(%v, %v, %+v): called", ctx, key, obj)
+func (g *GCEBetaUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *beta.UrlMap) error {
+ klog.V(5).Infof("GCEBetaUrlMaps.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaUrlMaps.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaUrlMaps.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "UrlMaps")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "UrlMaps")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
- Version: meta.Version("alpha"),
+ Version: meta.Version("beta"),
Service: "UrlMaps",
}
- klog.V(5).Infof("GCEAlphaUrlMaps.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaUrlMaps.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaUrlMaps.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaUrlMaps.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.Alpha.UrlMaps.Insert(projectID, obj)
+ call := g.s.Beta.UrlMaps.Insert(projectID, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaUrlMaps.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaUrlMaps.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaUrlMaps.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCEBetaUrlMaps.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
// Delete the UrlMap referenced by key.
-func (g *GCEAlphaUrlMaps) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEAlphaUrlMaps.Delete(%v, %v): called", ctx, key)
+func (g *GCEBetaUrlMaps) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEBetaUrlMaps.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaUrlMaps.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaUrlMaps.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "UrlMaps")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "UrlMaps")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
- Version: meta.Version("alpha"),
+ Version: meta.Version("beta"),
Service: "UrlMaps",
}
- klog.V(5).Infof("GCEAlphaUrlMaps.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaUrlMaps.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaUrlMaps.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaUrlMaps.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Alpha.UrlMaps.Delete(projectID, key.Name)
+ call := g.s.Beta.UrlMaps.Delete(projectID, key.Name)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// Update is a method on GCEAlphaUrlMaps.
-func (g *GCEAlphaUrlMaps) Update(ctx context.Context, key *meta.Key, arg0 *alpha.UrlMap) error {
- klog.V(5).Infof("GCEAlphaUrlMaps.Update(%v, %v, ...): called", ctx, key)
+// Update is a method on GCEBetaUrlMaps.
+func (g *GCEBetaUrlMaps) Update(ctx context.Context, key *meta.Key, arg0 *beta.UrlMap) error {
+ klog.V(5).Infof("GCEBetaUrlMaps.Update(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaUrlMaps.Update(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaUrlMaps.Update(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "UrlMaps")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "UrlMaps")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Update",
- Version: meta.Version("alpha"),
+ Version: meta.Version("beta"),
Service: "UrlMaps",
}
- klog.V(5).Infof("GCEAlphaUrlMaps.Update(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaUrlMaps.Update(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaUrlMaps.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaUrlMaps.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Alpha.UrlMaps.Update(projectID, key.Name, arg0)
+ call := g.s.Beta.UrlMaps.Update(projectID, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaUrlMaps.Update(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaUrlMaps.Update(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaUrlMaps.Update(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaUrlMaps.Update(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// BetaUrlMaps is an interface that allows for mocking of UrlMaps.
-type BetaUrlMaps interface {
- Get(ctx context.Context, key *meta.Key) (*beta.UrlMap, error)
- List(ctx context.Context, fl *filter.F) ([]*beta.UrlMap, error)
- Insert(ctx context.Context, key *meta.Key, obj *beta.UrlMap) error
+// UrlMaps is an interface that allows for mocking of UrlMaps.
+type UrlMaps interface {
+ Get(ctx context.Context, key *meta.Key) (*ga.UrlMap, error)
+ List(ctx context.Context, fl *filter.F) ([]*ga.UrlMap, error)
+ Insert(ctx context.Context, key *meta.Key, obj *ga.UrlMap) error
Delete(ctx context.Context, key *meta.Key) error
- Update(context.Context, *meta.Key, *beta.UrlMap) error
+ Update(context.Context, *meta.Key, *ga.UrlMap) error
}
-// NewMockBetaUrlMaps returns a new mock for UrlMaps.
-func NewMockBetaUrlMaps(pr ProjectRouter, objs map[meta.Key]*MockUrlMapsObj) *MockBetaUrlMaps {
- mock := &MockBetaUrlMaps{
+// NewMockUrlMaps returns a new mock for UrlMaps.
+func NewMockUrlMaps(pr ProjectRouter, objs map[meta.Key]*MockUrlMapsObj) *MockUrlMaps {
+ mock := &MockUrlMaps{
ProjectRouter: pr,
Objects: objs,
@@ -25752,8 +29002,8 @@ func NewMockBetaUrlMaps(pr ProjectRouter, objs map[meta.Key]*MockUrlMapsObj) *Mo
return mock
}
-// MockBetaUrlMaps is the mock for UrlMaps.
-type MockBetaUrlMaps struct {
+// MockUrlMaps is the mock for UrlMaps.
+type MockUrlMaps struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
@@ -25772,11 +29022,11 @@ type MockBetaUrlMaps struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockBetaUrlMaps) (bool, *beta.UrlMap, error)
- ListHook func(ctx context.Context, fl *filter.F, m *MockBetaUrlMaps) (bool, []*beta.UrlMap, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *beta.UrlMap, m *MockBetaUrlMaps) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaUrlMaps) (bool, error)
- UpdateHook func(context.Context, *meta.Key, *beta.UrlMap, *MockBetaUrlMaps) error
+ GetHook func(ctx context.Context, key *meta.Key, m *MockUrlMaps) (bool, *ga.UrlMap, error)
+ ListHook func(ctx context.Context, fl *filter.F, m *MockUrlMaps) (bool, []*ga.UrlMap, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *ga.UrlMap, m *MockUrlMaps) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockUrlMaps) (bool, error)
+ UpdateHook func(context.Context, *meta.Key, *ga.UrlMap, *MockUrlMaps) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -25784,10 +29034,10 @@ type MockBetaUrlMaps struct {
}
// Get returns the object from the mock.
-func (m *MockBetaUrlMaps) Get(ctx context.Context, key *meta.Key) (*beta.UrlMap, error) {
+func (m *MockUrlMaps) Get(ctx context.Context, key *meta.Key) (*ga.UrlMap, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockBetaUrlMaps.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockUrlMaps.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -25799,28 +29049,28 @@ func (m *MockBetaUrlMaps) Get(ctx context.Context, key *meta.Key) (*beta.UrlMap,
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockBetaUrlMaps.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockUrlMaps.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
- typedObj := obj.ToBeta()
- klog.V(5).Infof("MockBetaUrlMaps.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ typedObj := obj.ToGA()
+ klog.V(5).Infof("MockUrlMaps.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockBetaUrlMaps %v not found", key),
+ Message: fmt.Sprintf("MockUrlMaps %v not found", key),
}
- klog.V(5).Infof("MockBetaUrlMaps.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockUrlMaps.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
// List all of the objects in the mock.
-func (m *MockBetaUrlMaps) List(ctx context.Context, fl *filter.F) ([]*beta.UrlMap, error) {
+func (m *MockUrlMaps) List(ctx context.Context, fl *filter.F) ([]*ga.UrlMap, error) {
if m.ListHook != nil {
if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
- klog.V(5).Infof("MockBetaUrlMaps.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
+ klog.V(5).Infof("MockUrlMaps.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
return objs, err
}
}
@@ -25830,28 +29080,28 @@ func (m *MockBetaUrlMaps) List(ctx context.Context, fl *filter.F) ([]*beta.UrlMa
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockBetaUrlMaps.List(%v, %v) = nil, %v", ctx, fl, err)
+ klog.V(5).Infof("MockUrlMaps.List(%v, %v) = nil, %v", ctx, fl, err)
return nil, *m.ListError
}
- var objs []*beta.UrlMap
+ var objs []*ga.UrlMap
for _, obj := range m.Objects {
- if !fl.Match(obj.ToBeta()) {
+ if !fl.Match(obj.ToGA()) {
continue
}
- objs = append(objs, obj.ToBeta())
+ objs = append(objs, obj.ToGA())
}
- klog.V(5).Infof("MockBetaUrlMaps.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
+ klog.V(5).Infof("MockUrlMaps.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockBetaUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *beta.UrlMap) error {
+func (m *MockUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *ga.UrlMap) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockBetaUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -25863,32 +29113,32 @@ func (m *MockBetaUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *beta.U
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockBetaUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockBetaUrlMaps %v exists", key),
+ Message: fmt.Sprintf("MockUrlMaps %v exists", key),
}
- klog.V(5).Infof("MockBetaUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "beta", "urlMaps")
- obj.SelfLink = SelfLink(meta.VersionBeta, projectID, "urlMaps", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "ga", "urlMaps")
+ obj.SelfLink = SelfLink(meta.VersionGA, projectID, "urlMaps", key)
m.Objects[*key] = &MockUrlMapsObj{obj}
- klog.V(5).Infof("MockBetaUrlMaps.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ klog.V(5).Infof("MockUrlMaps.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockBetaUrlMaps) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockUrlMaps) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockBetaUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -25900,223 +29150,223 @@ func (m *MockBetaUrlMaps) Delete(ctx context.Context, key *meta.Key) error {
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockBetaUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockBetaUrlMaps %v not found", key),
+ Message: fmt.Sprintf("MockUrlMaps %v not found", key),
}
- klog.V(5).Infof("MockBetaUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockBetaUrlMaps.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockUrlMaps.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockBetaUrlMaps) Obj(o *beta.UrlMap) *MockUrlMapsObj {
+func (m *MockUrlMaps) Obj(o *ga.UrlMap) *MockUrlMapsObj {
return &MockUrlMapsObj{o}
}
// Update is a mock for the corresponding method.
-func (m *MockBetaUrlMaps) Update(ctx context.Context, key *meta.Key, arg0 *beta.UrlMap) error {
+func (m *MockUrlMaps) Update(ctx context.Context, key *meta.Key, arg0 *ga.UrlMap) error {
if m.UpdateHook != nil {
return m.UpdateHook(ctx, key, arg0, m)
}
return nil
}
-// GCEBetaUrlMaps is a simplifying adapter for the GCE UrlMaps.
-type GCEBetaUrlMaps struct {
+// GCEUrlMaps is a simplifying adapter for the GCE UrlMaps.
+type GCEUrlMaps struct {
s *Service
}
// Get the UrlMap named by key.
-func (g *GCEBetaUrlMaps) Get(ctx context.Context, key *meta.Key) (*beta.UrlMap, error) {
- klog.V(5).Infof("GCEBetaUrlMaps.Get(%v, %v): called", ctx, key)
+func (g *GCEUrlMaps) Get(ctx context.Context, key *meta.Key) (*ga.UrlMap, error) {
+ klog.V(5).Infof("GCEUrlMaps.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaUrlMaps.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEUrlMaps.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "UrlMaps")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "UrlMaps")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
- Version: meta.Version("beta"),
+ Version: meta.Version("ga"),
Service: "UrlMaps",
}
- klog.V(5).Infof("GCEBetaUrlMaps.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEUrlMaps.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaUrlMaps.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEUrlMaps.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.Beta.UrlMaps.Get(projectID, key.Name)
+ call := g.s.GA.UrlMaps.Get(projectID, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEBetaUrlMaps.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEUrlMaps.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
// List all UrlMap objects.
-func (g *GCEBetaUrlMaps) List(ctx context.Context, fl *filter.F) ([]*beta.UrlMap, error) {
- klog.V(5).Infof("GCEBetaUrlMaps.List(%v, %v) called", ctx, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "UrlMaps")
+func (g *GCEUrlMaps) List(ctx context.Context, fl *filter.F) ([]*ga.UrlMap, error) {
+ klog.V(5).Infof("GCEUrlMaps.List(%v, %v) called", ctx, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "UrlMaps")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
- Version: meta.Version("beta"),
+ Version: meta.Version("ga"),
Service: "UrlMaps",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCEBetaUrlMaps.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
- call := g.s.Beta.UrlMaps.List(projectID)
+ klog.V(5).Infof("GCEUrlMaps.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
+ call := g.s.GA.UrlMaps.List(projectID)
if fl != filter.None {
call.Filter(fl.String())
}
- var all []*beta.UrlMap
- f := func(l *beta.UrlMapList) error {
- klog.V(5).Infof("GCEBetaUrlMaps.List(%v, ..., %v): page %+v", ctx, fl, l)
+ var all []*ga.UrlMap
+ f := func(l *ga.UrlMapList) error {
+ klog.V(5).Infof("GCEUrlMaps.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEBetaUrlMaps.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEUrlMaps.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEBetaUrlMaps.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEUrlMaps.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEBetaUrlMaps.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEUrlMaps.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
// Insert UrlMap with key of value obj.
-func (g *GCEBetaUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *beta.UrlMap) error {
- klog.V(5).Infof("GCEBetaUrlMaps.Insert(%v, %v, %+v): called", ctx, key, obj)
+func (g *GCEUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *ga.UrlMap) error {
+ klog.V(5).Infof("GCEUrlMaps.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaUrlMaps.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEUrlMaps.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "UrlMaps")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "UrlMaps")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
- Version: meta.Version("beta"),
+ Version: meta.Version("ga"),
Service: "UrlMaps",
}
- klog.V(5).Infof("GCEBetaUrlMaps.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEUrlMaps.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaUrlMaps.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEUrlMaps.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.Beta.UrlMaps.Insert(projectID, obj)
+ call := g.s.GA.UrlMaps.Insert(projectID, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaUrlMaps.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEUrlMaps.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaUrlMaps.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCEUrlMaps.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
// Delete the UrlMap referenced by key.
-func (g *GCEBetaUrlMaps) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEBetaUrlMaps.Delete(%v, %v): called", ctx, key)
+func (g *GCEUrlMaps) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEUrlMaps.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaUrlMaps.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEUrlMaps.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "UrlMaps")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "UrlMaps")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
- Version: meta.Version("beta"),
+ Version: meta.Version("ga"),
Service: "UrlMaps",
}
- klog.V(5).Infof("GCEBetaUrlMaps.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEUrlMaps.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaUrlMaps.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEUrlMaps.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Beta.UrlMaps.Delete(projectID, key.Name)
+ call := g.s.GA.UrlMaps.Delete(projectID, key.Name)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// Update is a method on GCEBetaUrlMaps.
-func (g *GCEBetaUrlMaps) Update(ctx context.Context, key *meta.Key, arg0 *beta.UrlMap) error {
- klog.V(5).Infof("GCEBetaUrlMaps.Update(%v, %v, ...): called", ctx, key)
+// Update is a method on GCEUrlMaps.
+func (g *GCEUrlMaps) Update(ctx context.Context, key *meta.Key, arg0 *ga.UrlMap) error {
+ klog.V(5).Infof("GCEUrlMaps.Update(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaUrlMaps.Update(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEUrlMaps.Update(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "UrlMaps")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "UrlMaps")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Update",
- Version: meta.Version("beta"),
+ Version: meta.Version("ga"),
Service: "UrlMaps",
}
- klog.V(5).Infof("GCEBetaUrlMaps.Update(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEUrlMaps.Update(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaUrlMaps.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEUrlMaps.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Beta.UrlMaps.Update(projectID, key.Name, arg0)
+ call := g.s.GA.UrlMaps.Update(projectID, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaUrlMaps.Update(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEUrlMaps.Update(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaUrlMaps.Update(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEUrlMaps.Update(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// UrlMaps is an interface that allows for mocking of UrlMaps.
-type UrlMaps interface {
- Get(ctx context.Context, key *meta.Key) (*ga.UrlMap, error)
- List(ctx context.Context, fl *filter.F) ([]*ga.UrlMap, error)
- Insert(ctx context.Context, key *meta.Key, obj *ga.UrlMap) error
+// AlphaRegionUrlMaps is an interface that allows for mocking of RegionUrlMaps.
+type AlphaRegionUrlMaps interface {
+ Get(ctx context.Context, key *meta.Key) (*alpha.UrlMap, error)
+ List(ctx context.Context, region string, fl *filter.F) ([]*alpha.UrlMap, error)
+ Insert(ctx context.Context, key *meta.Key, obj *alpha.UrlMap) error
Delete(ctx context.Context, key *meta.Key) error
- Update(context.Context, *meta.Key, *ga.UrlMap) error
+ Update(context.Context, *meta.Key, *alpha.UrlMap) error
}
-// NewMockUrlMaps returns a new mock for UrlMaps.
-func NewMockUrlMaps(pr ProjectRouter, objs map[meta.Key]*MockUrlMapsObj) *MockUrlMaps {
- mock := &MockUrlMaps{
+// NewMockAlphaRegionUrlMaps returns a new mock for RegionUrlMaps.
+func NewMockAlphaRegionUrlMaps(pr ProjectRouter, objs map[meta.Key]*MockRegionUrlMapsObj) *MockAlphaRegionUrlMaps {
+ mock := &MockAlphaRegionUrlMaps{
ProjectRouter: pr,
Objects: objs,
@@ -26127,14 +29377,14 @@ func NewMockUrlMaps(pr ProjectRouter, objs map[meta.Key]*MockUrlMapsObj) *MockUr
return mock
}
-// MockUrlMaps is the mock for UrlMaps.
-type MockUrlMaps struct {
+// MockAlphaRegionUrlMaps is the mock for RegionUrlMaps.
+type MockAlphaRegionUrlMaps struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
// Objects maintained by the mock.
- Objects map[meta.Key]*MockUrlMapsObj
+ Objects map[meta.Key]*MockRegionUrlMapsObj
// If an entry exists for the given key and operation, then the error
// will be returned instead of the operation.
@@ -26147,11 +29397,11 @@ type MockUrlMaps struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockUrlMaps) (bool, *ga.UrlMap, error)
- ListHook func(ctx context.Context, fl *filter.F, m *MockUrlMaps) (bool, []*ga.UrlMap, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *ga.UrlMap, m *MockUrlMaps) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockUrlMaps) (bool, error)
- UpdateHook func(context.Context, *meta.Key, *ga.UrlMap, *MockUrlMaps) error
+ GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaRegionUrlMaps) (bool, *alpha.UrlMap, error)
+ ListHook func(ctx context.Context, region string, fl *filter.F, m *MockAlphaRegionUrlMaps) (bool, []*alpha.UrlMap, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *alpha.UrlMap, m *MockAlphaRegionUrlMaps) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaRegionUrlMaps) (bool, error)
+ UpdateHook func(context.Context, *meta.Key, *alpha.UrlMap, *MockAlphaRegionUrlMaps) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -26159,10 +29409,10 @@ type MockUrlMaps struct {
}
// Get returns the object from the mock.
-func (m *MockUrlMaps) Get(ctx context.Context, key *meta.Key) (*ga.UrlMap, error) {
+func (m *MockAlphaRegionUrlMaps) Get(ctx context.Context, key *meta.Key) (*alpha.UrlMap, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockUrlMaps.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaRegionUrlMaps.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -26174,28 +29424,28 @@ func (m *MockUrlMaps) Get(ctx context.Context, key *meta.Key) (*ga.UrlMap, error
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockUrlMaps.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaRegionUrlMaps.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
- typedObj := obj.ToGA()
- klog.V(5).Infof("MockUrlMaps.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ typedObj := obj.ToAlpha()
+ klog.V(5).Infof("MockAlphaRegionUrlMaps.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockUrlMaps %v not found", key),
+ Message: fmt.Sprintf("MockAlphaRegionUrlMaps %v not found", key),
}
- klog.V(5).Infof("MockUrlMaps.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaRegionUrlMaps.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
-// List all of the objects in the mock.
-func (m *MockUrlMaps) List(ctx context.Context, fl *filter.F) ([]*ga.UrlMap, error) {
+// List all of the objects in the mock in the given region.
+func (m *MockAlphaRegionUrlMaps) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.UrlMap, error) {
if m.ListHook != nil {
- if intercept, objs, err := m.ListHook(ctx, fl, m); intercept {
- klog.V(5).Infof("MockUrlMaps.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err)
+ if intercept, objs, err := m.ListHook(ctx, region, fl, m); intercept {
+ klog.V(5).Infof("MockAlphaRegionUrlMaps.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err)
return objs, err
}
}
@@ -26205,28 +29455,31 @@ func (m *MockUrlMaps) List(ctx context.Context, fl *filter.F) ([]*ga.UrlMap, err
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockUrlMaps.List(%v, %v) = nil, %v", ctx, fl, err)
+ klog.V(5).Infof("MockAlphaRegionUrlMaps.List(%v, %q, %v) = nil, %v", ctx, region, fl, err)
return nil, *m.ListError
}
- var objs []*ga.UrlMap
- for _, obj := range m.Objects {
- if !fl.Match(obj.ToGA()) {
+ var objs []*alpha.UrlMap
+ for key, obj := range m.Objects {
+ if key.Region != region {
continue
}
- objs = append(objs, obj.ToGA())
+ if !fl.Match(obj.ToAlpha()) {
+ continue
+ }
+ objs = append(objs, obj.ToAlpha())
}
- klog.V(5).Infof("MockUrlMaps.List(%v, %v) = [%v items], nil", ctx, fl, len(objs))
+ klog.V(5).Infof("MockAlphaRegionUrlMaps.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *ga.UrlMap) error {
+func (m *MockAlphaRegionUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *alpha.UrlMap) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaRegionUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -26238,32 +29491,32 @@ func (m *MockUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *ga.UrlMap)
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaRegionUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockUrlMaps %v exists", key),
+ Message: fmt.Sprintf("MockAlphaRegionUrlMaps %v exists", key),
}
- klog.V(5).Infof("MockUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockAlphaRegionUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "ga", "urlMaps")
- obj.SelfLink = SelfLink(meta.VersionGA, projectID, "urlMaps", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "urlMaps")
+ obj.SelfLink = SelfLink(meta.VersionAlpha, projectID, "urlMaps", key)
- m.Objects[*key] = &MockUrlMapsObj{obj}
- klog.V(5).Infof("MockUrlMaps.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ m.Objects[*key] = &MockRegionUrlMapsObj{obj}
+ klog.V(5).Infof("MockAlphaRegionUrlMaps.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockUrlMaps) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockAlphaRegionUrlMaps) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaRegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -26275,223 +29528,222 @@ func (m *MockUrlMaps) Delete(ctx context.Context, key *meta.Key) error {
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaRegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockUrlMaps %v not found", key),
+ Message: fmt.Sprintf("MockAlphaRegionUrlMaps %v not found", key),
}
- klog.V(5).Infof("MockUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockAlphaRegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockUrlMaps.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockAlphaRegionUrlMaps.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockUrlMaps) Obj(o *ga.UrlMap) *MockUrlMapsObj {
- return &MockUrlMapsObj{o}
+func (m *MockAlphaRegionUrlMaps) Obj(o *alpha.UrlMap) *MockRegionUrlMapsObj {
+ return &MockRegionUrlMapsObj{o}
}
// Update is a mock for the corresponding method.
-func (m *MockUrlMaps) Update(ctx context.Context, key *meta.Key, arg0 *ga.UrlMap) error {
+func (m *MockAlphaRegionUrlMaps) Update(ctx context.Context, key *meta.Key, arg0 *alpha.UrlMap) error {
if m.UpdateHook != nil {
return m.UpdateHook(ctx, key, arg0, m)
}
return nil
}
-// GCEUrlMaps is a simplifying adapter for the GCE UrlMaps.
-type GCEUrlMaps struct {
+// GCEAlphaRegionUrlMaps is a simplifying adapter for the GCE RegionUrlMaps.
+type GCEAlphaRegionUrlMaps struct {
s *Service
}
// Get the UrlMap named by key.
-func (g *GCEUrlMaps) Get(ctx context.Context, key *meta.Key) (*ga.UrlMap, error) {
- klog.V(5).Infof("GCEUrlMaps.Get(%v, %v): called", ctx, key)
+func (g *GCEAlphaRegionUrlMaps) Get(ctx context.Context, key *meta.Key) (*alpha.UrlMap, error) {
+ klog.V(5).Infof("GCEAlphaRegionUrlMaps.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEUrlMaps.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaRegionUrlMaps.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "UrlMaps")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionUrlMaps")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
- Version: meta.Version("ga"),
- Service: "UrlMaps",
+ Version: meta.Version("alpha"),
+ Service: "RegionUrlMaps",
}
- klog.V(5).Infof("GCEUrlMaps.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaRegionUrlMaps.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEUrlMaps.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaRegionUrlMaps.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.GA.UrlMaps.Get(projectID, key.Name)
+ call := g.s.Alpha.RegionUrlMaps.Get(projectID, key.Region, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEUrlMaps.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEAlphaRegionUrlMaps.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
// List all UrlMap objects.
-func (g *GCEUrlMaps) List(ctx context.Context, fl *filter.F) ([]*ga.UrlMap, error) {
- klog.V(5).Infof("GCEUrlMaps.List(%v, %v) called", ctx, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "UrlMaps")
+func (g *GCEAlphaRegionUrlMaps) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.UrlMap, error) {
+ klog.V(5).Infof("GCEAlphaRegionUrlMaps.List(%v, %v, %v) called", ctx, region, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionUrlMaps")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
- Version: meta.Version("ga"),
- Service: "UrlMaps",
+ Version: meta.Version("alpha"),
+ Service: "RegionUrlMaps",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCEUrlMaps.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk)
- call := g.s.GA.UrlMaps.List(projectID)
+ klog.V(5).Infof("GCEAlphaRegionUrlMaps.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk)
+ call := g.s.Alpha.RegionUrlMaps.List(projectID, region)
if fl != filter.None {
call.Filter(fl.String())
}
- var all []*ga.UrlMap
- f := func(l *ga.UrlMapList) error {
- klog.V(5).Infof("GCEUrlMaps.List(%v, ..., %v): page %+v", ctx, fl, l)
+ var all []*alpha.UrlMap
+ f := func(l *alpha.UrlMapList) error {
+ klog.V(5).Infof("GCEAlphaRegionUrlMaps.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEUrlMaps.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEAlphaRegionUrlMaps.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEUrlMaps.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEAlphaRegionUrlMaps.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEUrlMaps.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEAlphaRegionUrlMaps.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
// Insert UrlMap with key of value obj.
-func (g *GCEUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *ga.UrlMap) error {
- klog.V(5).Infof("GCEUrlMaps.Insert(%v, %v, %+v): called", ctx, key, obj)
+func (g *GCEAlphaRegionUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *alpha.UrlMap) error {
+ klog.V(5).Infof("GCEAlphaRegionUrlMaps.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEUrlMaps.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaRegionUrlMaps.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "UrlMaps")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionUrlMaps")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
- Version: meta.Version("ga"),
- Service: "UrlMaps",
+ Version: meta.Version("alpha"),
+ Service: "RegionUrlMaps",
}
- klog.V(5).Infof("GCEUrlMaps.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaRegionUrlMaps.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEUrlMaps.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaRegionUrlMaps.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.GA.UrlMaps.Insert(projectID, obj)
+ call := g.s.Alpha.RegionUrlMaps.Insert(projectID, key.Region, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEUrlMaps.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaRegionUrlMaps.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEUrlMaps.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCEAlphaRegionUrlMaps.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
// Delete the UrlMap referenced by key.
-func (g *GCEUrlMaps) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEUrlMaps.Delete(%v, %v): called", ctx, key)
+func (g *GCEAlphaRegionUrlMaps) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEAlphaRegionUrlMaps.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEUrlMaps.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaRegionUrlMaps.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "UrlMaps")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionUrlMaps")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
- Version: meta.Version("ga"),
- Service: "UrlMaps",
+ Version: meta.Version("alpha"),
+ Service: "RegionUrlMaps",
}
- klog.V(5).Infof("GCEUrlMaps.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaRegionUrlMaps.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEUrlMaps.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaRegionUrlMaps.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.GA.UrlMaps.Delete(projectID, key.Name)
-
+ call := g.s.Alpha.RegionUrlMaps.Delete(projectID, key.Region, key.Name)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaRegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaRegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// Update is a method on GCEUrlMaps.
-func (g *GCEUrlMaps) Update(ctx context.Context, key *meta.Key, arg0 *ga.UrlMap) error {
- klog.V(5).Infof("GCEUrlMaps.Update(%v, %v, ...): called", ctx, key)
+// Update is a method on GCEAlphaRegionUrlMaps.
+func (g *GCEAlphaRegionUrlMaps) Update(ctx context.Context, key *meta.Key, arg0 *alpha.UrlMap) error {
+ klog.V(5).Infof("GCEAlphaRegionUrlMaps.Update(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEUrlMaps.Update(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEAlphaRegionUrlMaps.Update(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "UrlMaps")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionUrlMaps")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Update",
- Version: meta.Version("ga"),
- Service: "UrlMaps",
+ Version: meta.Version("alpha"),
+ Service: "RegionUrlMaps",
}
- klog.V(5).Infof("GCEUrlMaps.Update(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEAlphaRegionUrlMaps.Update(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEUrlMaps.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaRegionUrlMaps.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.GA.UrlMaps.Update(projectID, key.Name, arg0)
+ call := g.s.Alpha.RegionUrlMaps.Update(projectID, key.Region, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEUrlMaps.Update(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaRegionUrlMaps.Update(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEUrlMaps.Update(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEAlphaRegionUrlMaps.Update(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// AlphaRegionUrlMaps is an interface that allows for mocking of RegionUrlMaps.
-type AlphaRegionUrlMaps interface {
- Get(ctx context.Context, key *meta.Key) (*alpha.UrlMap, error)
- List(ctx context.Context, region string, fl *filter.F) ([]*alpha.UrlMap, error)
- Insert(ctx context.Context, key *meta.Key, obj *alpha.UrlMap) error
+// BetaRegionUrlMaps is an interface that allows for mocking of RegionUrlMaps.
+type BetaRegionUrlMaps interface {
+ Get(ctx context.Context, key *meta.Key) (*beta.UrlMap, error)
+ List(ctx context.Context, region string, fl *filter.F) ([]*beta.UrlMap, error)
+ Insert(ctx context.Context, key *meta.Key, obj *beta.UrlMap) error
Delete(ctx context.Context, key *meta.Key) error
- Update(context.Context, *meta.Key, *alpha.UrlMap) error
+ Update(context.Context, *meta.Key, *beta.UrlMap) error
}
-// NewMockAlphaRegionUrlMaps returns a new mock for RegionUrlMaps.
-func NewMockAlphaRegionUrlMaps(pr ProjectRouter, objs map[meta.Key]*MockRegionUrlMapsObj) *MockAlphaRegionUrlMaps {
- mock := &MockAlphaRegionUrlMaps{
+// NewMockBetaRegionUrlMaps returns a new mock for RegionUrlMaps.
+func NewMockBetaRegionUrlMaps(pr ProjectRouter, objs map[meta.Key]*MockRegionUrlMapsObj) *MockBetaRegionUrlMaps {
+ mock := &MockBetaRegionUrlMaps{
ProjectRouter: pr,
Objects: objs,
@@ -26502,8 +29754,8 @@ func NewMockAlphaRegionUrlMaps(pr ProjectRouter, objs map[meta.Key]*MockRegionUr
return mock
}
-// MockAlphaRegionUrlMaps is the mock for RegionUrlMaps.
-type MockAlphaRegionUrlMaps struct {
+// MockBetaRegionUrlMaps is the mock for RegionUrlMaps.
+type MockBetaRegionUrlMaps struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
@@ -26522,11 +29774,11 @@ type MockAlphaRegionUrlMaps struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaRegionUrlMaps) (bool, *alpha.UrlMap, error)
- ListHook func(ctx context.Context, region string, fl *filter.F, m *MockAlphaRegionUrlMaps) (bool, []*alpha.UrlMap, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *alpha.UrlMap, m *MockAlphaRegionUrlMaps) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaRegionUrlMaps) (bool, error)
- UpdateHook func(context.Context, *meta.Key, *alpha.UrlMap, *MockAlphaRegionUrlMaps) error
+ GetHook func(ctx context.Context, key *meta.Key, m *MockBetaRegionUrlMaps) (bool, *beta.UrlMap, error)
+ ListHook func(ctx context.Context, region string, fl *filter.F, m *MockBetaRegionUrlMaps) (bool, []*beta.UrlMap, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *beta.UrlMap, m *MockBetaRegionUrlMaps) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaRegionUrlMaps) (bool, error)
+ UpdateHook func(context.Context, *meta.Key, *beta.UrlMap, *MockBetaRegionUrlMaps) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -26534,10 +29786,10 @@ type MockAlphaRegionUrlMaps struct {
}
// Get returns the object from the mock.
-func (m *MockAlphaRegionUrlMaps) Get(ctx context.Context, key *meta.Key) (*alpha.UrlMap, error) {
+func (m *MockBetaRegionUrlMaps) Get(ctx context.Context, key *meta.Key) (*beta.UrlMap, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockAlphaRegionUrlMaps.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaRegionUrlMaps.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -26549,28 +29801,28 @@ func (m *MockAlphaRegionUrlMaps) Get(ctx context.Context, key *meta.Key) (*alpha
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockAlphaRegionUrlMaps.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaRegionUrlMaps.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
- typedObj := obj.ToAlpha()
- klog.V(5).Infof("MockAlphaRegionUrlMaps.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ typedObj := obj.ToBeta()
+ klog.V(5).Infof("MockBetaRegionUrlMaps.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockAlphaRegionUrlMaps %v not found", key),
+ Message: fmt.Sprintf("MockBetaRegionUrlMaps %v not found", key),
}
- klog.V(5).Infof("MockAlphaRegionUrlMaps.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaRegionUrlMaps.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
// List all of the objects in the mock in the given region.
-func (m *MockAlphaRegionUrlMaps) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.UrlMap, error) {
+func (m *MockBetaRegionUrlMaps) List(ctx context.Context, region string, fl *filter.F) ([]*beta.UrlMap, error) {
if m.ListHook != nil {
if intercept, objs, err := m.ListHook(ctx, region, fl, m); intercept {
- klog.V(5).Infof("MockAlphaRegionUrlMaps.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err)
+ klog.V(5).Infof("MockBetaRegionUrlMaps.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err)
return objs, err
}
}
@@ -26580,31 +29832,31 @@ func (m *MockAlphaRegionUrlMaps) List(ctx context.Context, region string, fl *fi
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockAlphaRegionUrlMaps.List(%v, %q, %v) = nil, %v", ctx, region, fl, err)
+ klog.V(5).Infof("MockBetaRegionUrlMaps.List(%v, %q, %v) = nil, %v", ctx, region, fl, err)
return nil, *m.ListError
}
- var objs []*alpha.UrlMap
+ var objs []*beta.UrlMap
for key, obj := range m.Objects {
if key.Region != region {
continue
}
- if !fl.Match(obj.ToAlpha()) {
+ if !fl.Match(obj.ToBeta()) {
continue
}
- objs = append(objs, obj.ToAlpha())
+ objs = append(objs, obj.ToBeta())
}
- klog.V(5).Infof("MockAlphaRegionUrlMaps.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs))
+ klog.V(5).Infof("MockBetaRegionUrlMaps.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockAlphaRegionUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *alpha.UrlMap) error {
+func (m *MockBetaRegionUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *beta.UrlMap) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockAlphaRegionUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaRegionUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -26616,32 +29868,32 @@ func (m *MockAlphaRegionUrlMaps) Insert(ctx context.Context, key *meta.Key, obj
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockAlphaRegionUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaRegionUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockAlphaRegionUrlMaps %v exists", key),
+ Message: fmt.Sprintf("MockBetaRegionUrlMaps %v exists", key),
}
- klog.V(5).Infof("MockAlphaRegionUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockBetaRegionUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "urlMaps")
- obj.SelfLink = SelfLink(meta.VersionAlpha, projectID, "urlMaps", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "beta", "urlMaps")
+ obj.SelfLink = SelfLink(meta.VersionBeta, projectID, "urlMaps", key)
m.Objects[*key] = &MockRegionUrlMapsObj{obj}
- klog.V(5).Infof("MockAlphaRegionUrlMaps.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ klog.V(5).Infof("MockBetaRegionUrlMaps.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockAlphaRegionUrlMaps) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockBetaRegionUrlMaps) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockAlphaRegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaRegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -26653,222 +29905,222 @@ func (m *MockAlphaRegionUrlMaps) Delete(ctx context.Context, key *meta.Key) erro
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockAlphaRegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaRegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockAlphaRegionUrlMaps %v not found", key),
+ Message: fmt.Sprintf("MockBetaRegionUrlMaps %v not found", key),
}
- klog.V(5).Infof("MockAlphaRegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockBetaRegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockAlphaRegionUrlMaps.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockBetaRegionUrlMaps.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockAlphaRegionUrlMaps) Obj(o *alpha.UrlMap) *MockRegionUrlMapsObj {
+func (m *MockBetaRegionUrlMaps) Obj(o *beta.UrlMap) *MockRegionUrlMapsObj {
return &MockRegionUrlMapsObj{o}
}
// Update is a mock for the corresponding method.
-func (m *MockAlphaRegionUrlMaps) Update(ctx context.Context, key *meta.Key, arg0 *alpha.UrlMap) error {
+func (m *MockBetaRegionUrlMaps) Update(ctx context.Context, key *meta.Key, arg0 *beta.UrlMap) error {
if m.UpdateHook != nil {
return m.UpdateHook(ctx, key, arg0, m)
}
return nil
}
-// GCEAlphaRegionUrlMaps is a simplifying adapter for the GCE RegionUrlMaps.
-type GCEAlphaRegionUrlMaps struct {
+// GCEBetaRegionUrlMaps is a simplifying adapter for the GCE RegionUrlMaps.
+type GCEBetaRegionUrlMaps struct {
s *Service
}
// Get the UrlMap named by key.
-func (g *GCEAlphaRegionUrlMaps) Get(ctx context.Context, key *meta.Key) (*alpha.UrlMap, error) {
- klog.V(5).Infof("GCEAlphaRegionUrlMaps.Get(%v, %v): called", ctx, key)
+func (g *GCEBetaRegionUrlMaps) Get(ctx context.Context, key *meta.Key) (*beta.UrlMap, error) {
+ klog.V(5).Infof("GCEBetaRegionUrlMaps.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaRegionUrlMaps.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaRegionUrlMaps.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionUrlMaps")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionUrlMaps")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
- Version: meta.Version("alpha"),
+ Version: meta.Version("beta"),
Service: "RegionUrlMaps",
}
- klog.V(5).Infof("GCEAlphaRegionUrlMaps.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaRegionUrlMaps.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaRegionUrlMaps.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionUrlMaps.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.Alpha.RegionUrlMaps.Get(projectID, key.Region, key.Name)
+ call := g.s.Beta.RegionUrlMaps.Get(projectID, key.Region, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEAlphaRegionUrlMaps.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCEBetaRegionUrlMaps.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
// List all UrlMap objects.
-func (g *GCEAlphaRegionUrlMaps) List(ctx context.Context, region string, fl *filter.F) ([]*alpha.UrlMap, error) {
- klog.V(5).Infof("GCEAlphaRegionUrlMaps.List(%v, %v, %v) called", ctx, region, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionUrlMaps")
+func (g *GCEBetaRegionUrlMaps) List(ctx context.Context, region string, fl *filter.F) ([]*beta.UrlMap, error) {
+ klog.V(5).Infof("GCEBetaRegionUrlMaps.List(%v, %v, %v) called", ctx, region, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionUrlMaps")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
- Version: meta.Version("alpha"),
+ Version: meta.Version("beta"),
Service: "RegionUrlMaps",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCEAlphaRegionUrlMaps.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk)
- call := g.s.Alpha.RegionUrlMaps.List(projectID, region)
+ klog.V(5).Infof("GCEBetaRegionUrlMaps.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk)
+ call := g.s.Beta.RegionUrlMaps.List(projectID, region)
if fl != filter.None {
call.Filter(fl.String())
}
- var all []*alpha.UrlMap
- f := func(l *alpha.UrlMapList) error {
- klog.V(5).Infof("GCEAlphaRegionUrlMaps.List(%v, ..., %v): page %+v", ctx, fl, l)
+ var all []*beta.UrlMap
+ f := func(l *beta.UrlMapList) error {
+ klog.V(5).Infof("GCEBetaRegionUrlMaps.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEAlphaRegionUrlMaps.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCEBetaRegionUrlMaps.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEAlphaRegionUrlMaps.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCEBetaRegionUrlMaps.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEAlphaRegionUrlMaps.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCEBetaRegionUrlMaps.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
// Insert UrlMap with key of value obj.
-func (g *GCEAlphaRegionUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *alpha.UrlMap) error {
- klog.V(5).Infof("GCEAlphaRegionUrlMaps.Insert(%v, %v, %+v): called", ctx, key, obj)
+func (g *GCEBetaRegionUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *beta.UrlMap) error {
+ klog.V(5).Infof("GCEBetaRegionUrlMaps.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaRegionUrlMaps.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaRegionUrlMaps.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionUrlMaps")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionUrlMaps")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
- Version: meta.Version("alpha"),
+ Version: meta.Version("beta"),
Service: "RegionUrlMaps",
}
- klog.V(5).Infof("GCEAlphaRegionUrlMaps.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaRegionUrlMaps.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaRegionUrlMaps.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionUrlMaps.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.Alpha.RegionUrlMaps.Insert(projectID, key.Region, obj)
+ call := g.s.Beta.RegionUrlMaps.Insert(projectID, key.Region, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaRegionUrlMaps.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionUrlMaps.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaRegionUrlMaps.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCEBetaRegionUrlMaps.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
// Delete the UrlMap referenced by key.
-func (g *GCEAlphaRegionUrlMaps) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEAlphaRegionUrlMaps.Delete(%v, %v): called", ctx, key)
+func (g *GCEBetaRegionUrlMaps) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCEBetaRegionUrlMaps.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaRegionUrlMaps.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaRegionUrlMaps.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionUrlMaps")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionUrlMaps")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
- Version: meta.Version("alpha"),
+ Version: meta.Version("beta"),
Service: "RegionUrlMaps",
}
- klog.V(5).Infof("GCEAlphaRegionUrlMaps.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaRegionUrlMaps.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaRegionUrlMaps.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionUrlMaps.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Alpha.RegionUrlMaps.Delete(projectID, key.Region, key.Name)
+ call := g.s.Beta.RegionUrlMaps.Delete(projectID, key.Region, key.Name)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaRegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaRegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// Update is a method on GCEAlphaRegionUrlMaps.
-func (g *GCEAlphaRegionUrlMaps) Update(ctx context.Context, key *meta.Key, arg0 *alpha.UrlMap) error {
- klog.V(5).Infof("GCEAlphaRegionUrlMaps.Update(%v, %v, ...): called", ctx, key)
+// Update is a method on GCEBetaRegionUrlMaps.
+func (g *GCEBetaRegionUrlMaps) Update(ctx context.Context, key *meta.Key, arg0 *beta.UrlMap) error {
+ klog.V(5).Infof("GCEBetaRegionUrlMaps.Update(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEAlphaRegionUrlMaps.Update(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCEBetaRegionUrlMaps.Update(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "RegionUrlMaps")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionUrlMaps")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Update",
- Version: meta.Version("alpha"),
+ Version: meta.Version("beta"),
Service: "RegionUrlMaps",
}
- klog.V(5).Infof("GCEAlphaRegionUrlMaps.Update(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCEBetaRegionUrlMaps.Update(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEAlphaRegionUrlMaps.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionUrlMaps.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Alpha.RegionUrlMaps.Update(projectID, key.Region, key.Name, arg0)
+ call := g.s.Beta.RegionUrlMaps.Update(projectID, key.Region, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEAlphaRegionUrlMaps.Update(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionUrlMaps.Update(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEAlphaRegionUrlMaps.Update(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCEBetaRegionUrlMaps.Update(%v, %v, ...) = %+v", ctx, key, err)
return err
}
-// BetaRegionUrlMaps is an interface that allows for mocking of RegionUrlMaps.
-type BetaRegionUrlMaps interface {
- Get(ctx context.Context, key *meta.Key) (*beta.UrlMap, error)
- List(ctx context.Context, region string, fl *filter.F) ([]*beta.UrlMap, error)
- Insert(ctx context.Context, key *meta.Key, obj *beta.UrlMap) error
+// RegionUrlMaps is an interface that allows for mocking of RegionUrlMaps.
+type RegionUrlMaps interface {
+ Get(ctx context.Context, key *meta.Key) (*ga.UrlMap, error)
+ List(ctx context.Context, region string, fl *filter.F) ([]*ga.UrlMap, error)
+ Insert(ctx context.Context, key *meta.Key, obj *ga.UrlMap) error
Delete(ctx context.Context, key *meta.Key) error
- Update(context.Context, *meta.Key, *beta.UrlMap) error
+ Update(context.Context, *meta.Key, *ga.UrlMap) error
}
-// NewMockBetaRegionUrlMaps returns a new mock for RegionUrlMaps.
-func NewMockBetaRegionUrlMaps(pr ProjectRouter, objs map[meta.Key]*MockRegionUrlMapsObj) *MockBetaRegionUrlMaps {
- mock := &MockBetaRegionUrlMaps{
+// NewMockRegionUrlMaps returns a new mock for RegionUrlMaps.
+func NewMockRegionUrlMaps(pr ProjectRouter, objs map[meta.Key]*MockRegionUrlMapsObj) *MockRegionUrlMaps {
+ mock := &MockRegionUrlMaps{
ProjectRouter: pr,
Objects: objs,
@@ -26879,8 +30131,8 @@ func NewMockBetaRegionUrlMaps(pr ProjectRouter, objs map[meta.Key]*MockRegionUrl
return mock
}
-// MockBetaRegionUrlMaps is the mock for RegionUrlMaps.
-type MockBetaRegionUrlMaps struct {
+// MockRegionUrlMaps is the mock for RegionUrlMaps.
+type MockRegionUrlMaps struct {
Lock sync.Mutex
ProjectRouter ProjectRouter
@@ -26899,11 +30151,11 @@ type MockBetaRegionUrlMaps struct {
// order to add your own logic. Return (true, _, _) to prevent the normal
// execution flow of the mock. Return (false, nil, nil) to continue with
// normal mock behavior/ after the hook function executes.
- GetHook func(ctx context.Context, key *meta.Key, m *MockBetaRegionUrlMaps) (bool, *beta.UrlMap, error)
- ListHook func(ctx context.Context, region string, fl *filter.F, m *MockBetaRegionUrlMaps) (bool, []*beta.UrlMap, error)
- InsertHook func(ctx context.Context, key *meta.Key, obj *beta.UrlMap, m *MockBetaRegionUrlMaps) (bool, error)
- DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaRegionUrlMaps) (bool, error)
- UpdateHook func(context.Context, *meta.Key, *beta.UrlMap, *MockBetaRegionUrlMaps) error
+ GetHook func(ctx context.Context, key *meta.Key, m *MockRegionUrlMaps) (bool, *ga.UrlMap, error)
+ ListHook func(ctx context.Context, region string, fl *filter.F, m *MockRegionUrlMaps) (bool, []*ga.UrlMap, error)
+ InsertHook func(ctx context.Context, key *meta.Key, obj *ga.UrlMap, m *MockRegionUrlMaps) (bool, error)
+ DeleteHook func(ctx context.Context, key *meta.Key, m *MockRegionUrlMaps) (bool, error)
+ UpdateHook func(context.Context, *meta.Key, *ga.UrlMap, *MockRegionUrlMaps) error
// X is extra state that can be used as part of the mock. Generated code
// will not use this field.
@@ -26911,10 +30163,10 @@ type MockBetaRegionUrlMaps struct {
}
// Get returns the object from the mock.
-func (m *MockBetaRegionUrlMaps) Get(ctx context.Context, key *meta.Key) (*beta.UrlMap, error) {
+func (m *MockRegionUrlMaps) Get(ctx context.Context, key *meta.Key) (*ga.UrlMap, error) {
if m.GetHook != nil {
if intercept, obj, err := m.GetHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockBetaRegionUrlMaps.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockRegionUrlMaps.Get(%v, %s) = %+v, %v", ctx, key, obj, err)
return obj, err
}
}
@@ -26926,28 +30178,28 @@ func (m *MockBetaRegionUrlMaps) Get(ctx context.Context, key *meta.Key) (*beta.U
defer m.Lock.Unlock()
if err, ok := m.GetError[*key]; ok {
- klog.V(5).Infof("MockBetaRegionUrlMaps.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockRegionUrlMaps.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
if obj, ok := m.Objects[*key]; ok {
- typedObj := obj.ToBeta()
- klog.V(5).Infof("MockBetaRegionUrlMaps.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
+ typedObj := obj.ToGA()
+ klog.V(5).Infof("MockRegionUrlMaps.Get(%v, %s) = %+v, nil", ctx, key, typedObj)
return typedObj, nil
}
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockBetaRegionUrlMaps %v not found", key),
+ Message: fmt.Sprintf("MockRegionUrlMaps %v not found", key),
}
- klog.V(5).Infof("MockBetaRegionUrlMaps.Get(%v, %s) = nil, %v", ctx, key, err)
+ klog.V(5).Infof("MockRegionUrlMaps.Get(%v, %s) = nil, %v", ctx, key, err)
return nil, err
}
// List all of the objects in the mock in the given region.
-func (m *MockBetaRegionUrlMaps) List(ctx context.Context, region string, fl *filter.F) ([]*beta.UrlMap, error) {
+func (m *MockRegionUrlMaps) List(ctx context.Context, region string, fl *filter.F) ([]*ga.UrlMap, error) {
if m.ListHook != nil {
if intercept, objs, err := m.ListHook(ctx, region, fl, m); intercept {
- klog.V(5).Infof("MockBetaRegionUrlMaps.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err)
+ klog.V(5).Infof("MockRegionUrlMaps.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err)
return objs, err
}
}
@@ -26957,31 +30209,31 @@ func (m *MockBetaRegionUrlMaps) List(ctx context.Context, region string, fl *fil
if m.ListError != nil {
err := *m.ListError
- klog.V(5).Infof("MockBetaRegionUrlMaps.List(%v, %q, %v) = nil, %v", ctx, region, fl, err)
+ klog.V(5).Infof("MockRegionUrlMaps.List(%v, %q, %v) = nil, %v", ctx, region, fl, err)
return nil, *m.ListError
}
- var objs []*beta.UrlMap
+ var objs []*ga.UrlMap
for key, obj := range m.Objects {
if key.Region != region {
continue
}
- if !fl.Match(obj.ToBeta()) {
+ if !fl.Match(obj.ToGA()) {
continue
}
- objs = append(objs, obj.ToBeta())
+ objs = append(objs, obj.ToGA())
}
- klog.V(5).Infof("MockBetaRegionUrlMaps.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs))
+ klog.V(5).Infof("MockRegionUrlMaps.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs))
return objs, nil
}
// Insert is a mock for inserting/creating a new object.
-func (m *MockBetaRegionUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *beta.UrlMap) error {
+func (m *MockRegionUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *ga.UrlMap) error {
if m.InsertHook != nil {
if intercept, err := m.InsertHook(ctx, key, obj, m); intercept {
- klog.V(5).Infof("MockBetaRegionUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockRegionUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
}
@@ -26993,32 +30245,32 @@ func (m *MockBetaRegionUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *
defer m.Lock.Unlock()
if err, ok := m.InsertError[*key]; ok {
- klog.V(5).Infof("MockBetaRegionUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockRegionUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
if _, ok := m.Objects[*key]; ok {
err := &googleapi.Error{
Code: http.StatusConflict,
- Message: fmt.Sprintf("MockBetaRegionUrlMaps %v exists", key),
+ Message: fmt.Sprintf("MockRegionUrlMaps %v exists", key),
}
- klog.V(5).Infof("MockBetaRegionUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
+ klog.V(5).Infof("MockRegionUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err)
return err
}
obj.Name = key.Name
- projectID := m.ProjectRouter.ProjectID(ctx, "beta", "urlMaps")
- obj.SelfLink = SelfLink(meta.VersionBeta, projectID, "urlMaps", key)
+ projectID := m.ProjectRouter.ProjectID(ctx, "ga", "urlMaps")
+ obj.SelfLink = SelfLink(meta.VersionGA, projectID, "urlMaps", key)
m.Objects[*key] = &MockRegionUrlMapsObj{obj}
- klog.V(5).Infof("MockBetaRegionUrlMaps.Insert(%v, %v, %+v) = nil", ctx, key, obj)
+ klog.V(5).Infof("MockRegionUrlMaps.Insert(%v, %v, %+v) = nil", ctx, key, obj)
return nil
}
// Delete is a mock for deleting the object.
-func (m *MockBetaRegionUrlMaps) Delete(ctx context.Context, key *meta.Key) error {
+func (m *MockRegionUrlMaps) Delete(ctx context.Context, key *meta.Key) error {
if m.DeleteHook != nil {
if intercept, err := m.DeleteHook(ctx, key, m); intercept {
- klog.V(5).Infof("MockBetaRegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockRegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
return err
}
}
@@ -27030,207 +30282,207 @@ func (m *MockBetaRegionUrlMaps) Delete(ctx context.Context, key *meta.Key) error
defer m.Lock.Unlock()
if err, ok := m.DeleteError[*key]; ok {
- klog.V(5).Infof("MockBetaRegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockRegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
return err
}
if _, ok := m.Objects[*key]; !ok {
err := &googleapi.Error{
Code: http.StatusNotFound,
- Message: fmt.Sprintf("MockBetaRegionUrlMaps %v not found", key),
+ Message: fmt.Sprintf("MockRegionUrlMaps %v not found", key),
}
- klog.V(5).Infof("MockBetaRegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(5).Infof("MockRegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
return err
}
delete(m.Objects, *key)
- klog.V(5).Infof("MockBetaRegionUrlMaps.Delete(%v, %v) = nil", ctx, key)
+ klog.V(5).Infof("MockRegionUrlMaps.Delete(%v, %v) = nil", ctx, key)
return nil
}
// Obj wraps the object for use in the mock.
-func (m *MockBetaRegionUrlMaps) Obj(o *beta.UrlMap) *MockRegionUrlMapsObj {
+func (m *MockRegionUrlMaps) Obj(o *ga.UrlMap) *MockRegionUrlMapsObj {
return &MockRegionUrlMapsObj{o}
}
// Update is a mock for the corresponding method.
-func (m *MockBetaRegionUrlMaps) Update(ctx context.Context, key *meta.Key, arg0 *beta.UrlMap) error {
+func (m *MockRegionUrlMaps) Update(ctx context.Context, key *meta.Key, arg0 *ga.UrlMap) error {
if m.UpdateHook != nil {
return m.UpdateHook(ctx, key, arg0, m)
}
return nil
}
-// GCEBetaRegionUrlMaps is a simplifying adapter for the GCE RegionUrlMaps.
-type GCEBetaRegionUrlMaps struct {
+// GCERegionUrlMaps is a simplifying adapter for the GCE RegionUrlMaps.
+type GCERegionUrlMaps struct {
s *Service
}
// Get the UrlMap named by key.
-func (g *GCEBetaRegionUrlMaps) Get(ctx context.Context, key *meta.Key) (*beta.UrlMap, error) {
- klog.V(5).Infof("GCEBetaRegionUrlMaps.Get(%v, %v): called", ctx, key)
+func (g *GCERegionUrlMaps) Get(ctx context.Context, key *meta.Key) (*ga.UrlMap, error) {
+ klog.V(5).Infof("GCERegionUrlMaps.Get(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaRegionUrlMaps.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCERegionUrlMaps.Get(%v, %v): key is invalid (%#v)", ctx, key, key)
return nil, fmt.Errorf("invalid GCE key (%#v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionUrlMaps")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionUrlMaps")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Get",
- Version: meta.Version("beta"),
+ Version: meta.Version("ga"),
Service: "RegionUrlMaps",
}
- klog.V(5).Infof("GCEBetaRegionUrlMaps.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCERegionUrlMaps.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaRegionUrlMaps.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCERegionUrlMaps.Get(%v, %v): RateLimiter error: %v", ctx, key, err)
return nil, err
}
- call := g.s.Beta.RegionUrlMaps.Get(projectID, key.Region, key.Name)
+ call := g.s.GA.RegionUrlMaps.Get(projectID, key.Region, key.Name)
call.Context(ctx)
v, err := call.Do()
- klog.V(4).Infof("GCEBetaRegionUrlMaps.Get(%v, %v) = %+v, %v", ctx, key, v, err)
+ klog.V(4).Infof("GCERegionUrlMaps.Get(%v, %v) = %+v, %v", ctx, key, v, err)
return v, err
}
// List all UrlMap objects.
-func (g *GCEBetaRegionUrlMaps) List(ctx context.Context, region string, fl *filter.F) ([]*beta.UrlMap, error) {
- klog.V(5).Infof("GCEBetaRegionUrlMaps.List(%v, %v, %v) called", ctx, region, fl)
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionUrlMaps")
+func (g *GCERegionUrlMaps) List(ctx context.Context, region string, fl *filter.F) ([]*ga.UrlMap, error) {
+ klog.V(5).Infof("GCERegionUrlMaps.List(%v, %v, %v) called", ctx, region, fl)
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionUrlMaps")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "List",
- Version: meta.Version("beta"),
+ Version: meta.Version("ga"),
Service: "RegionUrlMaps",
}
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
return nil, err
}
- klog.V(5).Infof("GCEBetaRegionUrlMaps.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk)
- call := g.s.Beta.RegionUrlMaps.List(projectID, region)
+ klog.V(5).Infof("GCERegionUrlMaps.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk)
+ call := g.s.GA.RegionUrlMaps.List(projectID, region)
if fl != filter.None {
call.Filter(fl.String())
}
- var all []*beta.UrlMap
- f := func(l *beta.UrlMapList) error {
- klog.V(5).Infof("GCEBetaRegionUrlMaps.List(%v, ..., %v): page %+v", ctx, fl, l)
+ var all []*ga.UrlMap
+ f := func(l *ga.UrlMapList) error {
+ klog.V(5).Infof("GCERegionUrlMaps.List(%v, ..., %v): page %+v", ctx, fl, l)
all = append(all, l.Items...)
return nil
}
if err := call.Pages(ctx, f); err != nil {
- klog.V(4).Infof("GCEBetaRegionUrlMaps.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
+ klog.V(4).Infof("GCERegionUrlMaps.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err)
return nil, err
}
- if klog.V(4) {
- klog.V(4).Infof("GCEBetaRegionUrlMaps.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ if klog.V(4).Enabled() {
+ klog.V(4).Infof("GCERegionUrlMaps.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
}
- klog.V(5).Infof("GCEBetaRegionUrlMaps.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
+ klog.V(5).Infof("GCERegionUrlMaps.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil)
}
return all, nil
}
// Insert UrlMap with key of value obj.
-func (g *GCEBetaRegionUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *beta.UrlMap) error {
- klog.V(5).Infof("GCEBetaRegionUrlMaps.Insert(%v, %v, %+v): called", ctx, key, obj)
+func (g *GCERegionUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *ga.UrlMap) error {
+ klog.V(5).Infof("GCERegionUrlMaps.Insert(%v, %v, %+v): called", ctx, key, obj)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaRegionUrlMaps.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCERegionUrlMaps.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionUrlMaps")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionUrlMaps")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Insert",
- Version: meta.Version("beta"),
+ Version: meta.Version("ga"),
Service: "RegionUrlMaps",
}
- klog.V(5).Infof("GCEBetaRegionUrlMaps.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCERegionUrlMaps.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaRegionUrlMaps.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCERegionUrlMaps.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
obj.Name = key.Name
- call := g.s.Beta.RegionUrlMaps.Insert(projectID, key.Region, obj)
+ call := g.s.GA.RegionUrlMaps.Insert(projectID, key.Region, obj)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaRegionUrlMaps.Insert(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCERegionUrlMaps.Insert(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaRegionUrlMaps.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
+ klog.V(4).Infof("GCERegionUrlMaps.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err)
return err
}
// Delete the UrlMap referenced by key.
-func (g *GCEBetaRegionUrlMaps) Delete(ctx context.Context, key *meta.Key) error {
- klog.V(5).Infof("GCEBetaRegionUrlMaps.Delete(%v, %v): called", ctx, key)
+func (g *GCERegionUrlMaps) Delete(ctx context.Context, key *meta.Key) error {
+ klog.V(5).Infof("GCERegionUrlMaps.Delete(%v, %v): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaRegionUrlMaps.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCERegionUrlMaps.Delete(%v, %v): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionUrlMaps")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionUrlMaps")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Delete",
- Version: meta.Version("beta"),
+ Version: meta.Version("ga"),
Service: "RegionUrlMaps",
}
- klog.V(5).Infof("GCEBetaRegionUrlMaps.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCERegionUrlMaps.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaRegionUrlMaps.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCERegionUrlMaps.Delete(%v, %v): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Beta.RegionUrlMaps.Delete(projectID, key.Region, key.Name)
+ call := g.s.GA.RegionUrlMaps.Delete(projectID, key.Region, key.Name)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaRegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCERegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaRegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
+ klog.V(4).Infof("GCERegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err)
return err
}
-// Update is a method on GCEBetaRegionUrlMaps.
-func (g *GCEBetaRegionUrlMaps) Update(ctx context.Context, key *meta.Key, arg0 *beta.UrlMap) error {
- klog.V(5).Infof("GCEBetaRegionUrlMaps.Update(%v, %v, ...): called", ctx, key)
+// Update is a method on GCERegionUrlMaps.
+func (g *GCERegionUrlMaps) Update(ctx context.Context, key *meta.Key, arg0 *ga.UrlMap) error {
+ klog.V(5).Infof("GCERegionUrlMaps.Update(%v, %v, ...): called", ctx, key)
if !key.Valid() {
- klog.V(2).Infof("GCEBetaRegionUrlMaps.Update(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
+ klog.V(2).Infof("GCERegionUrlMaps.Update(%v, %v, ...): key is invalid (%#v)", ctx, key, key)
return fmt.Errorf("invalid GCE key (%+v)", key)
}
- projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "RegionUrlMaps")
+ projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionUrlMaps")
rk := &RateLimitKey{
ProjectID: projectID,
Operation: "Update",
- Version: meta.Version("beta"),
+ Version: meta.Version("ga"),
Service: "RegionUrlMaps",
}
- klog.V(5).Infof("GCEBetaRegionUrlMaps.Update(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
+ klog.V(5).Infof("GCERegionUrlMaps.Update(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk)
if err := g.s.RateLimiter.Accept(ctx, rk); err != nil {
- klog.V(4).Infof("GCEBetaRegionUrlMaps.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
+ klog.V(4).Infof("GCERegionUrlMaps.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err)
return err
}
- call := g.s.Beta.RegionUrlMaps.Update(projectID, key.Region, key.Name, arg0)
+ call := g.s.GA.RegionUrlMaps.Update(projectID, key.Region, key.Name, arg0)
call.Context(ctx)
op, err := call.Do()
if err != nil {
- klog.V(4).Infof("GCEBetaRegionUrlMaps.Update(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCERegionUrlMaps.Update(%v, %v, ...) = %+v", ctx, key, err)
return err
}
err = g.s.WaitForCompletion(ctx, op)
- klog.V(4).Infof("GCEBetaRegionUrlMaps.Update(%v, %v, ...) = %+v", ctx, key, err)
+ klog.V(4).Infof("GCERegionUrlMaps.Update(%v, %v, ...) = %+v", ctx, key, err)
return err
}
@@ -27407,9 +30659,9 @@ func (g *GCEZones) List(ctx context.Context, fl *filter.F) ([]*ga.Zone, error) {
return nil, err
}
- if klog.V(4) {
+ if klog.V(4).Enabled() {
klog.V(4).Infof("GCEZones.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil)
- } else if klog.V(5) {
+ } else if klog.V(5).Enabled() {
var asStr []string
for _, o := range all {
asStr = append(asStr, fmt.Sprintf("%+v", o))
@@ -27576,6 +30828,12 @@ func NewSslCertificatesResourceID(project, name string) *ResourceID {
return &ResourceID{project, "sslCertificates", key}
}
+// NewSslPoliciesResourceID creates a ResourceID for the SslPolicies resource.
+func NewSslPoliciesResourceID(project, name string) *ResourceID {
+ key := meta.GlobalKey(name)
+ return &ResourceID{project, "sslPolicies", key}
+}
+
// NewSubnetworksResourceID creates a ResourceID for the Subnetworks resource.
func NewSubnetworksResourceID(project, region, name string) *ResourceID {
key := meta.RegionalKey(name, region)
diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta/meta.go b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta/meta.go
index d5ef72a75..7b5db45e4 100644
--- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta/meta.go
+++ b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta/meta.go
@@ -199,6 +199,28 @@ var AllServices = []*ServiceInfo{
"Resize",
},
},
+ {
+ Object: "Firewall",
+ Service: "Firewalls",
+ Resource: "firewalls",
+ version: VersionAlpha,
+ keyType: Global,
+ serviceType: reflect.TypeOf(&alpha.FirewallsService{}),
+ additionalMethods: []string{
+ "Update",
+ },
+ },
+ {
+ Object: "Firewall",
+ Service: "Firewalls",
+ Resource: "firewalls",
+ version: VersionBeta,
+ keyType: Global,
+ serviceType: reflect.TypeOf(&beta.FirewallsService{}),
+ additionalMethods: []string{
+ "Update",
+ },
+ },
{
Object: "Firewall",
Service: "Firewalls",
@@ -327,6 +349,17 @@ var AllServices = []*ServiceInfo{
"Update",
},
},
+ {
+ Object: "HealthCheck",
+ Service: "RegionHealthChecks",
+ Resource: "healthChecks",
+ version: VersionGA,
+ keyType: Regional,
+ serviceType: reflect.TypeOf(&ga.RegionHealthChecksService{}),
+ additionalMethods: []string{
+ "Update",
+ },
+ },
{
Object: "HttpHealthCheck",
Service: "HttpHealthChecks",
@@ -541,6 +574,22 @@ var AllServices = []*ServiceInfo{
keyType: Regional,
serviceType: reflect.TypeOf(&beta.RegionSslCertificatesService{}),
},
+ {
+ Object: "SslCertificate",
+ Service: "RegionSslCertificates",
+ Resource: "sslCertificates",
+ version: VersionGA,
+ keyType: Regional,
+ serviceType: reflect.TypeOf(&ga.RegionSslCertificatesService{}),
+ },
+ {
+ Object: "SslPolicy",
+ Service: "SslPolicies",
+ Resource: "sslPolicies",
+ keyType: Global,
+ serviceType: reflect.TypeOf(&ga.SslPoliciesService{}),
+ options: NoList, // List() naming convention is different in GCE API for this resource
+ },
{
Object: "Subnetwork",
Service: "Subnetworks",
@@ -619,6 +668,17 @@ var AllServices = []*ServiceInfo{
"SetUrlMap",
},
},
+ {
+ Object: "TargetHttpProxy",
+ Service: "RegionTargetHttpProxies",
+ Resource: "targetHttpProxies",
+ version: VersionGA,
+ keyType: Regional,
+ serviceType: reflect.TypeOf(&ga.RegionTargetHttpProxiesService{}),
+ additionalMethods: []string{
+ "SetUrlMap",
+ },
+ },
{
Object: "TargetHttpsProxy",
Service: "TargetHttpsProxies",
@@ -627,6 +687,7 @@ var AllServices = []*ServiceInfo{
serviceType: reflect.TypeOf(&ga.TargetHttpsProxiesService{}),
additionalMethods: []string{
"SetSslCertificates",
+ "SetSslPolicy",
"SetUrlMap",
},
},
@@ -639,6 +700,7 @@ var AllServices = []*ServiceInfo{
serviceType: reflect.TypeOf(&alpha.TargetHttpsProxiesService{}),
additionalMethods: []string{
"SetSslCertificates",
+ "SetSslPolicy",
"SetUrlMap",
},
},
@@ -651,6 +713,7 @@ var AllServices = []*ServiceInfo{
serviceType: reflect.TypeOf(&beta.TargetHttpsProxiesService{}),
additionalMethods: []string{
"SetSslCertificates",
+ "SetSslPolicy",
"SetUrlMap",
},
},
@@ -678,6 +741,18 @@ var AllServices = []*ServiceInfo{
"SetUrlMap",
},
},
+ {
+ Object: "TargetHttpsProxy",
+ Service: "RegionTargetHttpsProxies",
+ Resource: "targetHttpsProxies",
+ version: VersionGA,
+ keyType: Regional,
+ serviceType: reflect.TypeOf(&ga.RegionTargetHttpsProxiesService{}),
+ additionalMethods: []string{
+ "SetSslCertificates",
+ "SetUrlMap",
+ },
+ },
{
Object: "TargetPool",
Service: "TargetPools",
@@ -743,6 +818,17 @@ var AllServices = []*ServiceInfo{
"Update",
},
},
+ {
+ Object: "UrlMap",
+ Service: "RegionUrlMaps",
+ Resource: "urlMaps",
+ version: VersionGA,
+ keyType: Regional,
+ serviceType: reflect.TypeOf(&ga.RegionUrlMapsService{}),
+ additionalMethods: []string{
+ "Update",
+ },
+ },
{
Object: "Zone",
Service: "Zones",
diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/mock/mock.go b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/mock/mock.go
index 9be80d35f..3fb6cd291 100644
--- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/mock/mock.go
+++ b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/mock/mock.go
@@ -415,6 +415,38 @@ func UpdateFirewallHook(ctx context.Context, key *meta.Key, obj *ga.Firewall, m
return nil
}
+// UpdateAlphaFirewallHook defines the hook for updating an alpha Firewall. It replaces the
+// object with the same key in the mock with the updated object.
+func UpdateAlphaFirewallHook(ctx context.Context, key *meta.Key, obj *alpha.Firewall, m *cloud.MockAlphaFirewalls) error {
+ _, err := m.Get(ctx, key)
+ if err != nil {
+ return err
+ }
+
+ obj.Name = key.Name
+ projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "firewalls")
+ obj.SelfLink = cloud.SelfLink(meta.VersionAlpha, projectID, "firewalls", key)
+
+ m.Objects[*key] = &cloud.MockFirewallsObj{Obj: obj}
+ return nil
+}
+
+// UpdateBetaFirewallHook defines the hook for updating a beta Firewall. It replaces the
+// object with the same key in the mock with the updated object.
+func UpdateBetaFirewallHook(ctx context.Context, key *meta.Key, obj *ga.Firewall, m *cloud.MockBetaFirewalls) error {
+ _, err := m.Get(ctx, key)
+ if err != nil {
+ return err
+ }
+
+ obj.Name = key.Name
+ projectID := m.ProjectRouter.ProjectID(ctx, "beta", "firewalls")
+ obj.SelfLink = cloud.SelfLink(meta.VersionBeta, projectID, "firewalls", key)
+
+ m.Objects[*key] = &cloud.MockFirewallsObj{Obj: obj}
+ return nil
+}
+
// UpdateHealthCheckHook defines the hook for updating a HealthCheck. It
// replaces the object with the same key in the mock with the updated object.
func UpdateHealthCheckHook(ctx context.Context, key *meta.Key, obj *ga.HealthCheck, m *cloud.MockHealthChecks) error {
@@ -492,6 +524,21 @@ func UpdateBetaRegionHealthCheckHook(ctx context.Context, key *meta.Key, obj *be
return nil
}
+// UpdateRegionHealthCheckHook defines the hook for updating a HealthCheck. It
+// replaces the object with the same key in the mock with the updated object.
+func UpdateRegionHealthCheckHook(ctx context.Context, key *meta.Key, obj *ga.HealthCheck, m *cloud.MockRegionHealthChecks) error {
+ if _, err := m.Get(ctx, key); err != nil {
+ return err
+ }
+
+ obj.Name = key.Name
+ projectID := m.ProjectRouter.ProjectID(ctx, "ga", "healthChecks")
+ obj.SelfLink = cloud.SelfLink(meta.VersionGA, projectID, "healthChecks", key)
+
+ m.Objects[*key] = &cloud.MockRegionHealthChecksObj{Obj: obj}
+ return nil
+}
+
// UpdateRegionBackendServiceHook defines the hook for updating a Region
// BackendsService. It replaces the object with the same key in the mock with
// the updated object.
@@ -623,6 +670,22 @@ func UpdateAlphaURLMapHook(ctx context.Context, key *meta.Key, obj *alpha.UrlMap
return nil
}
+// UpdateBetaURLMapHook defines the hook for updating a beta UrlMap.
+// It replaces the object with the same key in the mock with the updated object.
+func UpdateBetaURLMapHook(ctx context.Context, key *meta.Key, obj *beta.UrlMap, m *cloud.MockBetaUrlMaps) error {
+ _, err := m.Get(ctx, key)
+ if err != nil {
+ return err
+ }
+
+ obj.Name = key.Name
+ projectID := m.ProjectRouter.ProjectID(ctx, "beta", "urlMaps")
+ obj.SelfLink = cloud.SelfLink(meta.VersionBeta, projectID, "urlMaps", key)
+
+ m.Objects[*key] = &cloud.MockUrlMapsObj{Obj: obj}
+ return nil
+}
+
// UpdateAlphaRegionURLMapHook defines the hook for updating an alpha UrlMap.
// It replaces the object with the same key in the mock with the updated object.
func UpdateAlphaRegionURLMapHook(ctx context.Context, key *meta.Key, obj *alpha.UrlMap, m *cloud.MockAlphaRegionUrlMaps) error {
@@ -655,6 +718,22 @@ func UpdateBetaRegionURLMapHook(ctx context.Context, key *meta.Key, obj *alpha.U
return nil
}
+// UpdateRegionURLMapHook defines the hook for updating a GA Regional UrlMap.
+// It replaces the object with the same key in the mock with the updated object.
+func UpdateRegionURLMapHook(ctx context.Context, key *meta.Key, obj *ga.UrlMap, m *cloud.MockRegionUrlMaps) error {
+ _, err := m.Get(ctx, key)
+ if err != nil {
+ return err
+ }
+
+ obj.Name = key.Name
+ projectID := m.ProjectRouter.ProjectID(ctx, "ga", "urlMaps")
+ obj.SelfLink = cloud.SelfLink(meta.VersionGA, projectID, "urlMaps", key)
+
+ m.Objects[*key] = &cloud.MockRegionUrlMapsObj{Obj: obj}
+ return nil
+}
+
// SetTargetGlobalForwardingRuleHook defines the hook for setting the target proxy for a GlobalForwardingRule.
func SetTargetGlobalForwardingRuleHook(ctx context.Context, key *meta.Key, obj *ga.TargetReference, m *cloud.MockGlobalForwardingRules) error {
fw, err := m.Get(ctx, key)
@@ -710,6 +789,17 @@ func SetTargetAlphaGlobalForwardingRuleHook(ctx context.Context, key *meta.Key,
return nil
}
+// SetTargetBetaGlobalForwardingRuleHook defines the hook for setting the target proxy for a beta GlobalForwardingRule.
+func SetTargetBetaGlobalForwardingRuleHook(ctx context.Context, key *meta.Key, obj *beta.TargetReference, m *cloud.MockBetaGlobalForwardingRules) error {
+ fw, err := m.Get(ctx, key)
+ if err != nil {
+ return err
+ }
+
+ fw.Target = obj.Target
+ return nil
+}
+
// SetURLMapTargetHTTPProxyHook defines the hook for setting the url map for a TargetHttpProxy.
func SetURLMapTargetHTTPProxyHook(ctx context.Context, key *meta.Key, ref *ga.UrlMapReference, m *cloud.MockTargetHttpProxies) error {
tp, err := m.Get(ctx, key)
@@ -754,6 +844,17 @@ func SetURLMapBetaRegionTargetHTTPSProxyHook(ctx context.Context, key *meta.Key,
return nil
}
+// SetURLMapRegionTargetHTTPProxyHook defines the hook for setting the url map for a TargetHttpProxy.
+func SetURLMapRegionTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, ref *ga.UrlMapReference, m *cloud.MockRegionTargetHttpsProxies) error {
+ tp, err := m.Get(ctx, key)
+ if err != nil {
+ return err
+ }
+
+ tp.UrlMap = ref.UrlMap
+ return nil
+}
+
// SetURLMapAlphaTargetHTTPProxyHook defines the hook for setting the url map for a TargetHttpProxy.
func SetURLMapAlphaTargetHTTPProxyHook(ctx context.Context, key *meta.Key, ref *alpha.UrlMapReference, m *cloud.MockAlphaTargetHttpProxies) error {
tp, err := m.Get(ctx, key)
@@ -765,6 +866,28 @@ func SetURLMapAlphaTargetHTTPProxyHook(ctx context.Context, key *meta.Key, ref *
return nil
}
+// SetURLMapBetaTargetHTTPProxyHook defines the hook for setting the url map for a beta TargetHttpProxy.
+func SetURLMapBetaTargetHTTPProxyHook(ctx context.Context, key *meta.Key, ref *beta.UrlMapReference, m *cloud.MockBetaTargetHttpProxies) error {
+ tp, err := m.Get(ctx, key)
+ if err != nil {
+ return err
+ }
+
+ tp.UrlMap = ref.UrlMap
+ return nil
+}
+
+// SetURLMapBetaTargetHTTPSProxyHook defines the hook for setting the url map for a beta TargetHttpsProxy.
+func SetURLMapBetaTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, ref *beta.UrlMapReference, m *cloud.MockBetaTargetHttpsProxies) error {
+ tp, err := m.Get(ctx, key)
+ if err != nil {
+ return err
+ }
+
+ tp.UrlMap = ref.UrlMap
+ return nil
+}
+
// SetURLMapAlphaRegionTargetHTTPProxyHook defines the hook for setting the url map for a TargetHttpProxy.
func SetURLMapAlphaRegionTargetHTTPProxyHook(ctx context.Context, key *meta.Key, ref *alpha.UrlMapReference, m *cloud.MockAlphaRegionTargetHttpProxies) error {
tp, err := m.Get(ctx, key)
@@ -787,6 +910,17 @@ func SetURLMapBetaRegionTargetHTTPProxyHook(ctx context.Context, key *meta.Key,
return nil
}
+// SetURLMapRegionTargetHTTPProxyHook defines the hook for setting the url map for a TargetHttpProxy.
+func SetURLMapRegionTargetHTTPProxyHook(ctx context.Context, key *meta.Key, ref *ga.UrlMapReference, m *cloud.MockRegionTargetHttpProxies) error {
+ tp, err := m.Get(ctx, key)
+ if err != nil {
+ return err
+ }
+
+ tp.UrlMap = ref.UrlMap
+ return nil
+}
+
// SetSslCertificateTargetHTTPSProxyHook defines the hook for setting ssl certificates on a TargetHttpsProxy.
func SetSslCertificateTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, req *ga.TargetHttpsProxiesSetSslCertificatesRequest, m *cloud.MockTargetHttpsProxies) error {
tp, err := m.Get(ctx, key)
@@ -808,6 +942,16 @@ func SetSslCertificateAlphaTargetHTTPSProxyHook(ctx context.Context, key *meta.K
return nil
}
+// SetSslCertificateAlphaTargetHTTPSProxyHook defines the hook for setting ssl certificates on a TargetHttpsProxy.
+func SetSslCertificateBetaTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, req *beta.TargetHttpsProxiesSetSslCertificatesRequest, m *cloud.MockBetaTargetHttpsProxies) error {
+ tp, err := m.Get(ctx, key)
+ if err != nil {
+ return err
+ }
+ tp.SslCertificates = req.SslCertificates
+ return nil
+}
+
// SetSslCertificateAlphaRegionTargetHTTPSProxyHook defines the hook for setting ssl certificates on a TargetHttpsProxy.
func SetSslCertificateAlphaRegionTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, req *alpha.TargetHttpsProxiesSetSslCertificatesRequest, m *cloud.MockAlphaRegionTargetHttpsProxies) error {
tp, err := m.Get(ctx, key)
@@ -830,6 +974,49 @@ func SetSslCertificateBetaRegionTargetHTTPSProxyHook(ctx context.Context, key *m
return nil
}
+// SetSslCertificateRegionTargetHTTPSProxyHook defines the hook for setting ssl certificates on a TargetHttpsProxy.
+func SetSslCertificateRegionTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, req *ga.TargetHttpsProxiesSetSslCertificatesRequest, m *cloud.MockRegionTargetHttpsProxies) error {
+ tp, err := m.Get(ctx, key)
+ if err != nil {
+ return err
+ }
+
+ tp.SslCertificates = req.SslCertificates
+ return nil
+}
+
+// SetSslCertificateTargetHTTPSProxyHook defines the hook for setting ssl certificates on a TargetHttpsProxy.
+func SetSslPolicyTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, ref *ga.SslPolicyReference, m *cloud.MockTargetHttpsProxies) error {
+ tp, err := m.Get(ctx, key)
+ if err != nil {
+ return err
+ }
+
+ tp.SslPolicy = ref.SslPolicy
+ return nil
+}
+
+// SetSslCertificateAlphaTargetHTTPSProxyHook defines the hook for setting ssl certificates on a TargetHttpsProxy.
+func SetSslPolicyAlphaTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, ref *alpha.SslPolicyReference, m *cloud.MockAlphaTargetHttpsProxies) error {
+ tp, err := m.Get(ctx, key)
+ if err != nil {
+ return err
+ }
+ tp.SslPolicy = ref.SslPolicy
+ return nil
+}
+
+// SetSslCertificateAlphaTargetHTTPSProxyHook defines the hook for setting ssl certificates on a TargetHttpsProxy.
+func SetSslPolicyBetaTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, ref *beta.SslPolicyReference, m *cloud.MockBetaTargetHttpsProxies) error {
+ tp, err := m.Get(ctx, key)
+ if err != nil {
+ return err
+ }
+ tp.SslPolicy = ref.SslPolicy
+ return nil
+}
+
+
// InsertFirewallsUnauthorizedErrHook mocks firewall insertion. A forbidden error will be thrown as return.
func InsertFirewallsUnauthorizedErrHook(ctx context.Context, key *meta.Key, obj *ga.Firewall, m *cloud.MockFirewalls) (bool, error) {
return true, &googleapi.Error{Code: http.StatusForbidden}
diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/op.go b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/op.go
index e0caf5f31..e8516bb73 100644
--- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/op.go
+++ b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/op.go
@@ -20,7 +20,7 @@ import (
"context"
"fmt"
- "k8s.io/klog"
+ "k8s.io/klog/v2"
alpha "google.golang.org/api/compute/v0.alpha"
beta "google.golang.org/api/compute/v0.beta"
diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/service.go b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/service.go
index 839eb15f8..842fe5391 100644
--- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/service.go
+++ b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/service.go
@@ -20,7 +20,7 @@ import (
"context"
"fmt"
- "k8s.io/klog"
+ "k8s.io/klog/v2"
alpha "google.golang.org/api/compute/v0.alpha"
beta "google.golang.org/api/compute/v0.beta"
@@ -86,7 +86,7 @@ func (s *Service) pollOperation(ctx context.Context, op operation) error {
// returning ctx.Err().
select {
case <-ctx.Done():
- klog.V(5).Infof("op.pollOperation(%v, %v) not completed, poll count = %d, ctx.Err = %v", ctx, op, pollCount, ctx.Err())
+ klog.V(5).Infof("op.pollOperation(%v, %v) not completed, poll count = %d, ctx.Err = %v", ctx, op, pollCount, ctx.Err())
return ctx.Err()
default:
// ctx is not canceled, continue immediately
@@ -95,16 +95,13 @@ func (s *Service) pollOperation(ctx context.Context, op operation) error {
pollCount++
klog.V(5).Infof("op.isDone(%v) waiting; op = %v, poll count = %d", ctx, op, pollCount)
s.RateLimiter.Accept(ctx, op.rateLimitKey())
- done, err := op.isDone(ctx)
- if err != nil {
+ switch done, err := op.isDone(ctx); {
+ case err != nil:
klog.V(5).Infof("op.isDone(%v) error; op = %v, poll count = %d, err = %v, retrying", ctx, op, pollCount, err)
- }
-
- if done {
- break
+ return err
+ case done:
+ klog.V(5).Infof("op.isDone(%v) complete; op = %v, poll count = %d, op.err = %v", ctx, op, pollCount, op.error())
+ return op.error()
}
}
-
- klog.V(5).Infof("op.isDone(%v) complete; op = %v, poll count = %d, op.err = %v", ctx, op, pollCount, op.error())
- return op.error()
}
diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/utils.go b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/utils.go
index 71b60ab81..8767e6f82 100644
--- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/utils.go
+++ b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/utils.go
@@ -199,3 +199,17 @@ func SelfLink(ver meta.Version, project, resource string, key *meta.Key) string
return fmt.Sprintf("%s/%s", prefix, RelativeResourceName(project, resource, key))
}
+
+// aggregatedListKey return the aggregated list key based on the resource key.
+func aggregatedListKey(k *meta.Key) string {
+ switch k.Type() {
+ case meta.Regional:
+ return fmt.Sprintf("regions/%s", k.Region)
+ case meta.Zonal:
+ return fmt.Sprintf("zones/%s", k.Zone)
+ case meta.Global:
+ return "global"
+ default:
+ return "unknownScope"
+ }
+}
diff --git a/vendor/github.com/Masterminds/goutils/cryptorandomstringutils.go b/vendor/github.com/Masterminds/goutils/cryptorandomstringutils.go
index 177dd8658..8dbd92485 100644
--- a/vendor/github.com/Masterminds/goutils/cryptorandomstringutils.go
+++ b/vendor/github.com/Masterminds/goutils/cryptorandomstringutils.go
@@ -21,7 +21,6 @@ import (
"fmt"
"math"
"math/big"
- "regexp"
"unicode"
)
@@ -99,27 +98,7 @@ Returns:
error - an error stemming from an invalid parameter within underlying function, CryptoRandom(...)
*/
func CryptoRandomAlphaNumeric(count int) (string, error) {
- if count == 0 {
- return "", nil
- }
- RandomString, err := CryptoRandom(count, 0, 0, true, true)
- if err != nil {
- return "", fmt.Errorf("Error: %s", err)
- }
- match, err := regexp.MatchString("([0-9]+)", RandomString)
- if err != nil {
- panic(err)
- }
-
- if !match {
- //Get the position between 0 and the length of the string-1 to insert a random number
- position := getCryptoRandomInt(count)
- //Insert a random number between [0-9] in the position
- RandomString = RandomString[:position] + string('0' + getCryptoRandomInt(10)) + RandomString[position + 1:]
- return RandomString, err
- }
- return RandomString, err
-
+ return CryptoRandom(count, 0, 0, true, true)
}
/*
@@ -204,7 +183,7 @@ func CryptoRandom(count int, start int, end int, letters bool, numbers bool, cha
if chars == nil {
ch = rune(getCryptoRandomInt(gap) + int64(start))
} else {
- ch = chars[getCryptoRandomInt(gap) + int64(start)]
+ ch = chars[getCryptoRandomInt(gap)+int64(start)]
}
if letters && unicode.IsLetter(ch) || numbers && unicode.IsDigit(ch) || !letters && !numbers {
diff --git a/vendor/github.com/Masterminds/goutils/randomstringutils.go b/vendor/github.com/Masterminds/goutils/randomstringutils.go
index 1364e0caf..272670231 100644
--- a/vendor/github.com/Masterminds/goutils/randomstringutils.go
+++ b/vendor/github.com/Masterminds/goutils/randomstringutils.go
@@ -20,7 +20,6 @@ import (
"fmt"
"math"
"math/rand"
- "regexp"
"time"
"unicode"
)
@@ -75,12 +74,10 @@ func RandomNumeric(count int) (string, error) {
/*
RandomAlphabetic creates a random string whose length is the number of characters specified.
-Characters will be chosen from the set of alpha-numeric characters as indicated by the arguments.
+Characters will be chosen from the set of alphabetic characters.
Parameters:
count - the length of random string to create
- letters - if true, generated string may include alphabetic characters
- numbers - if true, generated string may include numeric characters
Returns:
string - the random string
@@ -102,24 +99,7 @@ Returns:
error - an error stemming from an invalid parameter within underlying function, RandomSeed(...)
*/
func RandomAlphaNumeric(count int) (string, error) {
- RandomString, err := Random(count, 0, 0, true, true)
- if err != nil {
- return "", fmt.Errorf("Error: %s", err)
- }
- match, err := regexp.MatchString("([0-9]+)", RandomString)
- if err != nil {
- panic(err)
- }
-
- if !match {
- //Get the position between 0 and the length of the string-1 to insert a random number
- position := rand.Intn(count)
- //Insert a random number between [0-9] in the position
- RandomString = RandomString[:position] + string('0'+rand.Intn(10)) + RandomString[position+1:]
- return RandomString, err
- }
- return RandomString, err
-
+ return Random(count, 0, 0, true, true)
}
/*
diff --git a/vendor/github.com/Masterminds/goutils/stringutils.go b/vendor/github.com/Masterminds/goutils/stringutils.go
index 5037c4516..741bb530e 100644
--- a/vendor/github.com/Masterminds/goutils/stringutils.go
+++ b/vendor/github.com/Masterminds/goutils/stringutils.go
@@ -222,3 +222,19 @@ func IndexOf(str string, sub string, start int) int {
func IsEmpty(str string) bool {
return len(str) == 0
}
+
+// Returns either the passed in string, or if the string is empty, the value of defaultStr.
+func DefaultString(str string, defaultStr string) string {
+ if IsEmpty(str) {
+ return defaultStr
+ }
+ return str
+}
+
+// Returns either the passed in string, or if the string is whitespace, empty (""), the value of defaultStr.
+func DefaultIfBlank(str string, defaultStr string) string {
+ if IsBlank(str) {
+ return defaultStr
+ }
+ return str
+}
diff --git a/vendor/github.com/Masterminds/semver/v3/CHANGELOG.md b/vendor/github.com/Masterminds/semver/v3/CHANGELOG.md
index 947210d37..1f90c38d2 100644
--- a/vendor/github.com/Masterminds/semver/v3/CHANGELOG.md
+++ b/vendor/github.com/Masterminds/semver/v3/CHANGELOG.md
@@ -1,5 +1,11 @@
# Changelog
+## 3.1.1 (2020-11-23)
+
+### Fixed
+
+- #158: Fixed issue with generated regex operation order that could cause problem
+
## 3.1.0 (2020-04-15)
### Added
diff --git a/vendor/github.com/Masterminds/semver/v3/constraints.go b/vendor/github.com/Masterminds/semver/v3/constraints.go
index 742082367..547613f04 100644
--- a/vendor/github.com/Masterminds/semver/v3/constraints.go
+++ b/vendor/github.com/Masterminds/semver/v3/constraints.go
@@ -164,14 +164,11 @@ func init() {
"^": constraintCaret,
}
- ops := make([]string, 0, len(constraintOps))
- for k := range constraintOps {
- ops = append(ops, regexp.QuoteMeta(k))
- }
+ ops := `=||!=|>|<|>=|=>|<=|=<|~|~>|\^`
constraintRegex = regexp.MustCompile(fmt.Sprintf(
`^\s*(%s)\s*(%s)\s*$`,
- strings.Join(ops, "|"),
+ ops,
cvRegex))
constraintRangeRegex = regexp.MustCompile(fmt.Sprintf(
@@ -180,12 +177,12 @@ func init() {
findConstraintRegex = regexp.MustCompile(fmt.Sprintf(
`(%s)\s*(%s)`,
- strings.Join(ops, "|"),
+ ops,
cvRegex))
validConstraintRegex = regexp.MustCompile(fmt.Sprintf(
`^(\s*(%s)\s*(%s)\s*\,?)+$`,
- strings.Join(ops, "|"),
+ ops,
cvRegex))
}
diff --git a/vendor/github.com/Masterminds/semver/v3/go.mod b/vendor/github.com/Masterminds/semver/v3/go.mod
deleted file mode 100644
index 658233c8f..000000000
--- a/vendor/github.com/Masterminds/semver/v3/go.mod
+++ /dev/null
@@ -1,3 +0,0 @@
-module github.com/Masterminds/semver/v3
-
-go 1.12
diff --git a/vendor/github.com/Masterminds/sprig/v3/CHANGELOG.md b/vendor/github.com/Masterminds/sprig/v3/CHANGELOG.md
index 83b8e0304..fcdd4e88a 100644
--- a/vendor/github.com/Masterminds/sprig/v3/CHANGELOG.md
+++ b/vendor/github.com/Masterminds/sprig/v3/CHANGELOG.md
@@ -1,5 +1,41 @@
# Changelog
+## Release 3.2.1 (2021-02-04)
+
+### Changed
+
+- Upgraded `Masterminds/goutils` to `v1.1.1`. see the [Security Advisory](https://github.com/Masterminds/goutils/security/advisories/GHSA-xg2h-wx96-xgxr)
+
+## Release 3.2.0 (2020-12-14)
+
+### Added
+
+- #211: Added randInt function (thanks @kochurovro)
+- #223: Added fromJson and mustFromJson functions (thanks @mholt)
+- #242: Added a bcrypt function (thanks @robbiet480)
+- #253: Added randBytes function (thanks @MikaelSmith)
+- #254: Added dig function for dicts (thanks @nyarly)
+- #257: Added regexQuoteMeta for quoting regex metadata (thanks @rheaton)
+- #261: Added filepath functions osBase, osDir, osExt, osClean, osIsAbs (thanks @zugl)
+- #268: Added and and all functions for testing conditions (thanks @phuslu)
+- #181: Added float64 arithmetic addf, add1f, subf, divf, mulf, maxf, and minf
+ (thanks @andrewmostello)
+- #265: Added chunk function to split array into smaller arrays (thanks @karelbilek)
+- #270: Extend certificate functions to handle non-RSA keys + add support for
+ ed25519 keys (thanks @misberner)
+
+### Changed
+
+- Removed testing and support for Go 1.12. ed25519 support requires Go 1.13 or newer
+- Using semver 3.1.1 and mergo 0.3.11
+
+### Fixed
+
+- #249: Fix htmlDateInZone example (thanks @spawnia)
+
+NOTE: The dependency github.com/imdario/mergo reverted the breaking change in
+0.3.9 via 0.3.10 release.
+
## Release 3.1.0 (2020-04-16)
NOTE: The dependency github.com/imdario/mergo made a behavior change in 0.3.9
diff --git a/vendor/github.com/Masterminds/sprig/v3/crypto.go b/vendor/github.com/Masterminds/sprig/v3/crypto.go
index 7ae3991cd..13a5cd559 100644
--- a/vendor/github.com/Masterminds/sprig/v3/crypto.go
+++ b/vendor/github.com/Masterminds/sprig/v3/crypto.go
@@ -2,10 +2,12 @@ package sprig
import (
"bytes"
+ "crypto"
"crypto/aes"
"crypto/cipher"
"crypto/dsa"
"crypto/ecdsa"
+ "crypto/ed25519"
"crypto/elliptic"
"crypto/hmac"
"crypto/rand"
@@ -30,7 +32,7 @@ import (
"strings"
"github.com/google/uuid"
- "golang.org/x/crypto/bcrypt"
+ bcrypt_lib "golang.org/x/crypto/bcrypt"
"golang.org/x/crypto/scrypt"
)
@@ -49,15 +51,28 @@ func adler32sum(input string) string {
return fmt.Sprintf("%d", hash)
}
+func bcrypt(input string) string {
+ hash, err := bcrypt_lib.GenerateFromPassword([]byte(input), bcrypt_lib.DefaultCost)
+ if err != nil {
+ return fmt.Sprintf("failed to encrypt string with bcrypt: %s", err)
+ }
+
+ return string(hash)
+}
+
func htpasswd(username string, password string) string {
if strings.Contains(username, ":") {
return fmt.Sprintf("invalid username: %s", username)
}
- hash, err := bcrypt.GenerateFromPassword([]byte(password), bcrypt.DefaultCost)
- if err != nil {
- return fmt.Sprintf("failed to create htpasswd: %s", err)
+ return fmt.Sprintf("%s:%s", username, bcrypt(password))
+}
+
+func randBytes(count int) (string, error) {
+ buf := make([]byte, count)
+ if _, err := rand.Read(buf); err != nil {
+ return "", err
}
- return fmt.Sprintf("%s:%s", username, hash)
+ return base64.StdEncoding.EncodeToString(buf), nil
}
// uuidv4 provides a safe and secure UUID v4 implementation
@@ -147,6 +162,8 @@ func generatePrivateKey(typ string) string {
case "ecdsa":
// again, good enough for government work
priv, err = ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
+ case "ed25519":
+ _, priv, err = ed25519.GenerateKey(rand.Reader)
default:
return "Unknown type " + typ
}
@@ -179,7 +196,73 @@ func pemBlockForKey(priv interface{}) *pem.Block {
b, _ := x509.MarshalECPrivateKey(k)
return &pem.Block{Type: "EC PRIVATE KEY", Bytes: b}
default:
- return nil
+ // attempt PKCS#8 format for all other keys
+ b, err := x509.MarshalPKCS8PrivateKey(k)
+ if err != nil {
+ return nil
+ }
+ return &pem.Block{Type: "PRIVATE KEY", Bytes: b}
+ }
+}
+
+func parsePrivateKeyPEM(pemBlock string) (crypto.PrivateKey, error) {
+ block, _ := pem.Decode([]byte(pemBlock))
+ if block == nil {
+ return nil, errors.New("no PEM data in input")
+ }
+
+ if block.Type == "PRIVATE KEY" {
+ priv, err := x509.ParsePKCS8PrivateKey(block.Bytes)
+ if err != nil {
+ return nil, fmt.Errorf("decoding PEM as PKCS#8: %s", err)
+ }
+ return priv, nil
+ } else if !strings.HasSuffix(block.Type, " PRIVATE KEY") {
+ return nil, fmt.Errorf("no private key data in PEM block of type %s", block.Type)
+ }
+
+ switch block.Type[:len(block.Type)-12] { // strip " PRIVATE KEY"
+ case "RSA":
+ priv, err := x509.ParsePKCS1PrivateKey(block.Bytes)
+ if err != nil {
+ return nil, fmt.Errorf("parsing RSA private key from PEM: %s", err)
+ }
+ return priv, nil
+ case "EC":
+ priv, err := x509.ParseECPrivateKey(block.Bytes)
+ if err != nil {
+ return nil, fmt.Errorf("parsing EC private key from PEM: %s", err)
+ }
+ return priv, nil
+ case "DSA":
+ var k DSAKeyFormat
+ _, err := asn1.Unmarshal(block.Bytes, &k)
+ if err != nil {
+ return nil, fmt.Errorf("parsing DSA private key from PEM: %s", err)
+ }
+ priv := &dsa.PrivateKey{
+ PublicKey: dsa.PublicKey{
+ Parameters: dsa.Parameters{
+ P: k.P, Q: k.Q, G: k.G,
+ },
+ Y: k.Y,
+ },
+ X: k.X,
+ }
+ return priv, nil
+ default:
+ return nil, fmt.Errorf("invalid private key type %s", block.Type)
+ }
+}
+
+func getPublicKey(priv crypto.PrivateKey) (crypto.PublicKey, error) {
+ switch k := priv.(type) {
+ case interface{ Public() crypto.PublicKey }:
+ return k.Public(), nil
+ case *dsa.PrivateKey:
+ return &k.PublicKey, nil
+ default:
+ return nil, fmt.Errorf("unable to get public key for type %T", priv)
}
}
@@ -213,14 +296,10 @@ func buildCustomCertificate(b64cert string, b64key string) (certificate, error)
)
}
- decodedKey, _ := pem.Decode(key)
- if decodedKey == nil {
- return crt, errors.New("unable to decode key")
- }
- _, err = x509.ParsePKCS1PrivateKey(decodedKey.Bytes)
+ _, err = parsePrivateKeyPEM(string(key))
if err != nil {
return crt, fmt.Errorf(
- "error parsing prive key: decodedKey.Bytes: %s",
+ "error parsing private key: %s",
err,
)
}
@@ -234,6 +313,31 @@ func buildCustomCertificate(b64cert string, b64key string) (certificate, error)
func generateCertificateAuthority(
cn string,
daysValid int,
+) (certificate, error) {
+ priv, err := rsa.GenerateKey(rand.Reader, 2048)
+ if err != nil {
+ return certificate{}, fmt.Errorf("error generating rsa key: %s", err)
+ }
+
+ return generateCertificateAuthorityWithKeyInternal(cn, daysValid, priv)
+}
+
+func generateCertificateAuthorityWithPEMKey(
+ cn string,
+ daysValid int,
+ privPEM string,
+) (certificate, error) {
+ priv, err := parsePrivateKeyPEM(privPEM)
+ if err != nil {
+ return certificate{}, fmt.Errorf("parsing private key: %s", err)
+ }
+ return generateCertificateAuthorityWithKeyInternal(cn, daysValid, priv)
+}
+
+func generateCertificateAuthorityWithKeyInternal(
+ cn string,
+ daysValid int,
+ priv crypto.PrivateKey,
) (certificate, error) {
ca := certificate{}
@@ -247,11 +351,6 @@ func generateCertificateAuthority(
x509.KeyUsageCertSign
template.IsCA = true
- priv, err := rsa.GenerateKey(rand.Reader, 2048)
- if err != nil {
- return ca, fmt.Errorf("error generating rsa key: %s", err)
- }
-
ca.Cert, ca.Key, err = getCertAndKey(template, priv, template, priv)
return ca, err
@@ -263,16 +362,39 @@ func generateSelfSignedCertificate(
alternateDNS []interface{},
daysValid int,
) (certificate, error) {
- cert := certificate{}
+ priv, err := rsa.GenerateKey(rand.Reader, 2048)
+ if err != nil {
+ return certificate{}, fmt.Errorf("error generating rsa key: %s", err)
+ }
+ return generateSelfSignedCertificateWithKeyInternal(cn, ips, alternateDNS, daysValid, priv)
+}
- template, err := getBaseCertTemplate(cn, ips, alternateDNS, daysValid)
+func generateSelfSignedCertificateWithPEMKey(
+ cn string,
+ ips []interface{},
+ alternateDNS []interface{},
+ daysValid int,
+ privPEM string,
+) (certificate, error) {
+ priv, err := parsePrivateKeyPEM(privPEM)
if err != nil {
- return cert, err
+ return certificate{}, fmt.Errorf("parsing private key: %s", err)
}
+ return generateSelfSignedCertificateWithKeyInternal(cn, ips, alternateDNS, daysValid, priv)
+}
- priv, err := rsa.GenerateKey(rand.Reader, 2048)
+func generateSelfSignedCertificateWithKeyInternal(
+ cn string,
+ ips []interface{},
+ alternateDNS []interface{},
+ daysValid int,
+ priv crypto.PrivateKey,
+) (certificate, error) {
+ cert := certificate{}
+
+ template, err := getBaseCertTemplate(cn, ips, alternateDNS, daysValid)
if err != nil {
- return cert, fmt.Errorf("error generating rsa key: %s", err)
+ return cert, err
}
cert.Cert, cert.Key, err = getCertAndKey(template, priv, template, priv)
@@ -286,6 +408,36 @@ func generateSignedCertificate(
alternateDNS []interface{},
daysValid int,
ca certificate,
+) (certificate, error) {
+ priv, err := rsa.GenerateKey(rand.Reader, 2048)
+ if err != nil {
+ return certificate{}, fmt.Errorf("error generating rsa key: %s", err)
+ }
+ return generateSignedCertificateWithKeyInternal(cn, ips, alternateDNS, daysValid, ca, priv)
+}
+
+func generateSignedCertificateWithPEMKey(
+ cn string,
+ ips []interface{},
+ alternateDNS []interface{},
+ daysValid int,
+ ca certificate,
+ privPEM string,
+) (certificate, error) {
+ priv, err := parsePrivateKeyPEM(privPEM)
+ if err != nil {
+ return certificate{}, fmt.Errorf("parsing private key: %s", err)
+ }
+ return generateSignedCertificateWithKeyInternal(cn, ips, alternateDNS, daysValid, ca, priv)
+}
+
+func generateSignedCertificateWithKeyInternal(
+ cn string,
+ ips []interface{},
+ alternateDNS []interface{},
+ daysValid int,
+ ca certificate,
+ priv crypto.PrivateKey,
) (certificate, error) {
cert := certificate{}
@@ -300,14 +452,10 @@ func generateSignedCertificate(
err,
)
}
- decodedSignerKey, _ := pem.Decode([]byte(ca.Key))
- if decodedSignerKey == nil {
- return cert, errors.New("unable to decode key")
- }
- signerKey, err := x509.ParsePKCS1PrivateKey(decodedSignerKey.Bytes)
+ signerKey, err := parsePrivateKeyPEM(ca.Key)
if err != nil {
return cert, fmt.Errorf(
- "error parsing prive key: decodedSignerKey.Bytes: %s",
+ "error parsing private key: %s",
err,
)
}
@@ -317,11 +465,6 @@ func generateSignedCertificate(
return cert, err
}
- priv, err := rsa.GenerateKey(rand.Reader, 2048)
- if err != nil {
- return cert, fmt.Errorf("error generating rsa key: %s", err)
- }
-
cert.Cert, cert.Key, err = getCertAndKey(
template,
priv,
@@ -334,15 +477,19 @@ func generateSignedCertificate(
func getCertAndKey(
template *x509.Certificate,
- signeeKey *rsa.PrivateKey,
+ signeeKey crypto.PrivateKey,
parent *x509.Certificate,
- signingKey *rsa.PrivateKey,
+ signingKey crypto.PrivateKey,
) (string, string, error) {
+ signeePubKey, err := getPublicKey(signeeKey)
+ if err != nil {
+ return "", "", fmt.Errorf("error retrieving public key from signee key: %s", err)
+ }
derBytes, err := x509.CreateCertificate(
rand.Reader,
template,
parent,
- &signeeKey.PublicKey,
+ signeePubKey,
signingKey,
)
if err != nil {
@@ -360,10 +507,7 @@ func getCertAndKey(
keyBuffer := bytes.Buffer{}
if err := pem.Encode(
&keyBuffer,
- &pem.Block{
- Type: "RSA PRIVATE KEY",
- Bytes: x509.MarshalPKCS1PrivateKey(signeeKey),
- },
+ pemBlockForKey(signeeKey),
); err != nil {
return "", "", fmt.Errorf("error pem-encoding key: %s", err)
}
diff --git a/vendor/github.com/Masterminds/sprig/v3/defaults.go b/vendor/github.com/Masterminds/sprig/v3/defaults.go
index 97d7d6e64..b9f979666 100644
--- a/vendor/github.com/Masterminds/sprig/v3/defaults.go
+++ b/vendor/github.com/Masterminds/sprig/v3/defaults.go
@@ -3,10 +3,16 @@ package sprig
import (
"bytes"
"encoding/json"
+ "math/rand"
"reflect"
"strings"
+ "time"
)
+func init() {
+ rand.Seed(time.Now().UnixNano())
+}
+
// dfault checks whether `given` is set, and returns default if not set.
//
// This returns `d` if `given` appears not to be set, and `given` otherwise.
@@ -63,6 +69,41 @@ func coalesce(v ...interface{}) interface{} {
return nil
}
+// all returns true if empty(x) is false for all values x in the list.
+// If the list is empty, return true.
+func all(v ...interface{}) bool {
+ for _, val := range v {
+ if empty(val) {
+ return false
+ }
+ }
+ return true
+}
+
+// any returns true if empty(x) is false for any x in the list.
+// If the list is empty, return false.
+func any(v ...interface{}) bool {
+ for _, val := range v {
+ if !empty(val) {
+ return true
+ }
+ }
+ return false
+}
+
+// fromJson decodes JSON into a structured value, ignoring errors.
+func fromJson(v string) interface{} {
+ output, _ := mustFromJson(v)
+ return output
+}
+
+// mustFromJson decodes JSON into a structured value, returning errors.
+func mustFromJson(v string) (interface{}, error) {
+ var output interface{}
+ err := json.Unmarshal([]byte(v), &output)
+ return output, err
+}
+
// toJson encodes an item into a JSON string
func toJson(v interface{}) string {
output, _ := json.Marshal(v)
diff --git a/vendor/github.com/Masterminds/sprig/v3/dict.go b/vendor/github.com/Masterminds/sprig/v3/dict.go
index 11d943fc4..ade889698 100644
--- a/vendor/github.com/Masterminds/sprig/v3/dict.go
+++ b/vendor/github.com/Masterminds/sprig/v3/dict.go
@@ -146,3 +146,29 @@ func deepCopy(i interface{}) interface{} {
func mustDeepCopy(i interface{}) (interface{}, error) {
return copystructure.Copy(i)
}
+
+func dig(ps ...interface{}) (interface{}, error) {
+ if len(ps) < 3 {
+ panic("dig needs at least three arguments")
+ }
+ dict := ps[len(ps)-1].(map[string]interface{})
+ def := ps[len(ps)-2]
+ ks := make([]string, len(ps)-2)
+ for i := 0; i < len(ks); i++ {
+ ks[i] = ps[i].(string)
+ }
+
+ return digFromDict(dict, def, ks)
+}
+
+func digFromDict(dict map[string]interface{}, d interface{}, ks []string) (interface{}, error) {
+ k, ns := ks[0], ks[1:len(ks)]
+ step, has := dict[k]
+ if !has {
+ return d, nil
+ }
+ if len(ns) == 0 {
+ return step, nil
+ }
+ return digFromDict(step.(map[string]interface{}), d, ns)
+}
diff --git a/vendor/github.com/Masterminds/sprig/v3/functions.go b/vendor/github.com/Masterminds/sprig/v3/functions.go
index c16e9c3ea..57fcec1d9 100644
--- a/vendor/github.com/Masterminds/sprig/v3/functions.go
+++ b/vendor/github.com/Masterminds/sprig/v3/functions.go
@@ -3,8 +3,10 @@ package sprig
import (
"errors"
"html/template"
+ "math/rand"
"os"
"path"
+ "path/filepath"
"reflect"
"strconv"
"strings"
@@ -13,6 +15,7 @@ import (
util "github.com/Masterminds/goutils"
"github.com/huandu/xstrings"
+ "github.com/shopspring/decimal"
)
// FuncMap produces the function map.
@@ -80,6 +83,7 @@ var nonhermeticFunctions = []string{
"randAlpha",
"randAscii",
"randNumeric",
+ "randBytes",
"uuidv4",
// OS
@@ -200,9 +204,28 @@ var genericMap = map[string]interface{}{
}
return val
},
+ "randInt": func(min, max int) int { return rand.Intn(max-min) + min },
+ "add1f": func(i interface{}) float64 {
+ return execDecimalOp(i, []interface{}{1}, func(d1, d2 decimal.Decimal) decimal.Decimal { return d1.Add(d2) })
+ },
+ "addf": func(i ...interface{}) float64 {
+ a := interface{}(float64(0))
+ return execDecimalOp(a, i, func(d1, d2 decimal.Decimal) decimal.Decimal { return d1.Add(d2) })
+ },
+ "subf": func(a interface{}, v ...interface{}) float64 {
+ return execDecimalOp(a, v, func(d1, d2 decimal.Decimal) decimal.Decimal { return d1.Sub(d2) })
+ },
+ "divf": func(a interface{}, v ...interface{}) float64 {
+ return execDecimalOp(a, v, func(d1, d2 decimal.Decimal) decimal.Decimal { return d1.Div(d2) })
+ },
+ "mulf": func(a interface{}, v ...interface{}) float64 {
+ return execDecimalOp(a, v, func(d1, d2 decimal.Decimal) decimal.Decimal { return d1.Mul(d2) })
+ },
"biggest": max,
"max": max,
"min": min,
+ "maxf": maxf,
+ "minf": minf,
"ceil": ceil,
"floor": floor,
"round": round,
@@ -216,11 +239,15 @@ var genericMap = map[string]interface{}{
"default": dfault,
"empty": empty,
"coalesce": coalesce,
+ "all": all,
+ "any": any,
"compact": compact,
"mustCompact": mustCompact,
+ "fromJson": fromJson,
"toJson": toJson,
"toPrettyJson": toPrettyJson,
"toRawJson": toRawJson,
+ "mustFromJson": mustFromJson,
"mustToJson": mustToJson,
"mustToPrettyJson": mustToPrettyJson,
"mustToRawJson": mustToRawJson,
@@ -243,13 +270,20 @@ var genericMap = map[string]interface{}{
// Network:
"getHostByName": getHostByName,
- // File Paths:
+ // Paths:
"base": path.Base,
"dir": path.Dir,
"clean": path.Clean,
"ext": path.Ext,
"isAbs": path.IsAbs,
+ // Filepaths:
+ "osBase": filepath.Base,
+ "osClean": filepath.Clean,
+ "osDir": filepath.Dir,
+ "osExt": filepath.Ext,
+ "osIsAbs": filepath.IsAbs,
+
// Encoding:
"b64enc": base64encode,
"b64dec": base64decode,
@@ -297,17 +331,25 @@ var genericMap = map[string]interface{}{
"slice": slice,
"mustSlice": mustSlice,
"concat": concat,
+ "dig": dig,
+ "chunk": chunk,
+ "mustChunk": mustChunk,
// Crypto:
+ "bcrypt": bcrypt,
"htpasswd": htpasswd,
"genPrivateKey": generatePrivateKey,
"derivePassword": derivePassword,
"buildCustomCert": buildCustomCertificate,
"genCA": generateCertificateAuthority,
+ "genCAWithKey": generateCertificateAuthorityWithPEMKey,
"genSelfSignedCert": generateSelfSignedCertificate,
+ "genSelfSignedCertWithKey": generateSelfSignedCertificateWithPEMKey,
"genSignedCert": generateSignedCertificate,
+ "genSignedCertWithKey": generateSignedCertificateWithPEMKey,
"encryptAES": encryptAES,
"decryptAES": decryptAES,
+ "randBytes": randBytes,
// UUIDs:
"uuidv4": uuidv4,
@@ -332,6 +374,7 @@ var genericMap = map[string]interface{}{
"mustRegexReplaceAllLiteral": mustRegexReplaceAllLiteral,
"regexSplit": regexSplit,
"mustRegexSplit": mustRegexSplit,
+ "regexQuoteMeta": regexQuoteMeta,
// URLs:
"urlParse": urlParse,
diff --git a/vendor/github.com/Masterminds/sprig/v3/go.mod b/vendor/github.com/Masterminds/sprig/v3/go.mod
deleted file mode 100644
index e064b8d75..000000000
--- a/vendor/github.com/Masterminds/sprig/v3/go.mod
+++ /dev/null
@@ -1,15 +0,0 @@
-module github.com/Masterminds/sprig/v3
-
-go 1.13
-
-require (
- github.com/Masterminds/goutils v1.1.0
- github.com/Masterminds/semver/v3 v3.1.0
- github.com/google/uuid v1.1.1
- github.com/huandu/xstrings v1.3.1
- github.com/imdario/mergo v0.3.8
- github.com/mitchellh/copystructure v1.0.0
- github.com/spf13/cast v1.3.1
- github.com/stretchr/testify v1.5.1
- golang.org/x/crypto v0.0.0-20200414173820-0848c9571904
-)
diff --git a/vendor/github.com/Masterminds/sprig/v3/go.sum b/vendor/github.com/Masterminds/sprig/v3/go.sum
deleted file mode 100644
index 47157a673..000000000
--- a/vendor/github.com/Masterminds/sprig/v3/go.sum
+++ /dev/null
@@ -1,56 +0,0 @@
-github.com/Masterminds/goutils v1.1.0 h1:zukEsf/1JZwCMgHiK3GZftabmxiCw4apj3a28RPBiVg=
-github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=
-github.com/Masterminds/semver/v3 v3.0.1 h1:2kKm5lb7dKVrt5TYUiAavE6oFc1cFT0057UVGT+JqLk=
-github.com/Masterminds/semver/v3 v3.0.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
-github.com/Masterminds/semver/v3 v3.0.2 h1:tRi7ENs+AaOUCH+j6qwNQgPYfV26dX3JNonq+V4mhqc=
-github.com/Masterminds/semver/v3 v3.0.2/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
-github.com/Masterminds/semver/v3 v3.0.3 h1:znjIyLfpXEDQjOIEWh+ehwpTU14UzUPub3c3sm36u14=
-github.com/Masterminds/semver/v3 v3.0.3/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
-github.com/Masterminds/semver/v3 v3.1.0 h1:Y2lUDsFKVRSYGojLJ1yLxSXdMmMYTYls0rCvoqmMUQk=
-github.com/Masterminds/semver/v3 v3.1.0/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
-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/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
-github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
-github.com/huandu/xstrings v1.2.0 h1:yPeWdRnmynF7p+lLYz0H2tthW9lqhMJrQV/U7yy4wX0=
-github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4=
-github.com/huandu/xstrings v1.3.1 h1:4jgBlKK6tLKFvO8u5pmYjG91cqytmDCDvGh7ECVFfFs=
-github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
-github.com/imdario/mergo v0.3.7 h1:Y+UAYTZ7gDEuOfhxKWy+dvb5dRQ6rJjFSdX2HZY1/gI=
-github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
-github.com/imdario/mergo v0.3.8 h1:CGgOkSJeqMRmt0D9XLWExdT4m4F1vd3FV3VPt+0VxkQ=
-github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
-github.com/imdario/mergo v0.3.9 h1:UauaLniWCFHWd+Jp9oCEkTBj8VO/9DKg3PV3VCNMDIg=
-github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
-github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ=
-github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw=
-github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY=
-github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
-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/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8=
-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/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.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
-github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
-github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
-github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
-github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
-golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7 h1:0hQKqeLdqlt5iIwVOBErRisrHJAN57yOiPRQItI20fU=
-golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/crypto v0.0.0-20200414173820-0848c9571904 h1:bXoxMPcSLOq08zI3/c5dEBT6lE4eh+jOh886GHrn6V8=
-golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/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/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=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
-gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/Masterminds/sprig/v3/list.go b/vendor/github.com/Masterminds/sprig/v3/list.go
index 063fe4f85..ca0fbb789 100644
--- a/vendor/github.com/Masterminds/sprig/v3/list.go
+++ b/vendor/github.com/Masterminds/sprig/v3/list.go
@@ -2,6 +2,7 @@ package sprig
import (
"fmt"
+ "math"
"reflect"
"sort"
)
@@ -72,6 +73,50 @@ func mustPrepend(list interface{}, v interface{}) ([]interface{}, error) {
}
}
+func chunk(size int, list interface{}) [][]interface{} {
+ l, err := mustChunk(size, list)
+ if err != nil {
+ panic(err)
+ }
+
+ return l
+}
+
+func mustChunk(size int, list interface{}) ([][]interface{}, error) {
+ tp := reflect.TypeOf(list).Kind()
+ switch tp {
+ case reflect.Slice, reflect.Array:
+ l2 := reflect.ValueOf(list)
+
+ l := l2.Len()
+
+ cs := int(math.Floor(float64(l-1)/float64(size)) + 1)
+ nl := make([][]interface{}, cs)
+
+ for i := 0; i < cs; i++ {
+ clen := size
+ if i == cs-1 {
+ clen = int(math.Floor(math.Mod(float64(l), float64(size))))
+ if clen == 0 {
+ clen = size
+ }
+ }
+
+ nl[i] = make([]interface{}, clen)
+
+ for j := 0; j < clen; j++ {
+ ix := i*size + j
+ nl[i][j] = l2.Index(ix).Interface()
+ }
+ }
+
+ return nl, nil
+
+ default:
+ return nil, fmt.Errorf("Cannot chunk type %s", tp)
+ }
+}
+
func last(list interface{}) interface{} {
l, err := mustLast(list)
if err != nil {
diff --git a/vendor/github.com/Masterminds/sprig/v3/network.go b/vendor/github.com/Masterminds/sprig/v3/network.go
index d786cc736..108d78a94 100644
--- a/vendor/github.com/Masterminds/sprig/v3/network.go
+++ b/vendor/github.com/Masterminds/sprig/v3/network.go
@@ -7,6 +7,6 @@ import (
func getHostByName(name string) string {
addrs, _ := net.LookupHost(name)
- //TODO: add error handing when release v3 cames out
+ //TODO: add error handing when release v3 comes out
return addrs[rand.Intn(len(addrs))]
}
diff --git a/vendor/github.com/Masterminds/sprig/v3/numeric.go b/vendor/github.com/Masterminds/sprig/v3/numeric.go
index 638ef2731..f68e4182e 100644
--- a/vendor/github.com/Masterminds/sprig/v3/numeric.go
+++ b/vendor/github.com/Masterminds/sprig/v3/numeric.go
@@ -7,6 +7,7 @@ import (
"strings"
"github.com/spf13/cast"
+ "github.com/shopspring/decimal"
)
// toFloat64 converts 64-bit floats
@@ -34,6 +35,15 @@ func max(a interface{}, i ...interface{}) int64 {
return aa
}
+func maxf(a interface{}, i ...interface{}) float64 {
+ aa := toFloat64(a)
+ for _, b := range i {
+ bb := toFloat64(b)
+ aa = math.Max(aa, bb)
+ }
+ return aa
+}
+
func min(a interface{}, i ...interface{}) int64 {
aa := toInt64(a)
for _, b := range i {
@@ -45,6 +55,15 @@ func min(a interface{}, i ...interface{}) int64 {
return aa
}
+func minf(a interface{}, i ...interface{}) float64 {
+ aa := toFloat64(a)
+ for _, b := range i {
+ bb := toFloat64(b)
+ aa = math.Min(aa, bb)
+ }
+ return aa
+}
+
func until(count int) []int {
step := 1
if count < 0 {
@@ -153,3 +172,15 @@ func seq(params ...int) string {
func intArrayToString(slice []int, delimeter string) string {
return strings.Trim(strings.Join(strings.Fields(fmt.Sprint(slice)), delimeter), "[]")
}
+
+// performs a float and subsequent decimal.Decimal conversion on inputs,
+// and iterates through a and b executing the mathmetical operation f
+func execDecimalOp(a interface{}, b []interface{}, f func(d1, d2 decimal.Decimal) decimal.Decimal) float64 {
+ prt := decimal.NewFromFloat(toFloat64(a))
+ for _, x := range b {
+ dx := decimal.NewFromFloat(toFloat64(x))
+ prt = f(prt, dx)
+ }
+ rslt, _ := prt.Float64()
+ return rslt
+}
diff --git a/vendor/github.com/Masterminds/sprig/v3/regex.go b/vendor/github.com/Masterminds/sprig/v3/regex.go
index 2370878f1..fab551018 100644
--- a/vendor/github.com/Masterminds/sprig/v3/regex.go
+++ b/vendor/github.com/Masterminds/sprig/v3/regex.go
@@ -77,3 +77,7 @@ func mustRegexSplit(regex string, s string, n int) ([]string, error) {
}
return r.Split(s, n), nil
}
+
+func regexQuoteMeta(s string) string {
+ return regexp.QuoteMeta(s)
+}
diff --git a/vendor/github.com/Masterminds/squirrel/README.md b/vendor/github.com/Masterminds/squirrel/README.md
index a252cc45c..76092666f 100644
--- a/vendor/github.com/Masterminds/squirrel/README.md
+++ b/vendor/github.com/Masterminds/squirrel/README.md
@@ -94,7 +94,7 @@ query := sq.Insert("nodes").
query.QueryRow().Scan(&node.id)
```
-You can escape question mask by inserting two question marks:
+You can escape question marks by inserting two question marks:
```sql
SELECT * FROM nodes WHERE meta->'format' ??| array[?,?]
diff --git a/vendor/github.com/Masterminds/squirrel/delete_ctx.go b/vendor/github.com/Masterminds/squirrel/delete_ctx.go
index ecdf7ef03..de83c55df 100644
--- a/vendor/github.com/Masterminds/squirrel/delete_ctx.go
+++ b/vendor/github.com/Masterminds/squirrel/delete_ctx.go
@@ -20,8 +20,50 @@ func (d *deleteData) ExecContext(ctx context.Context) (sql.Result, error) {
return ExecContextWith(ctx, ctxRunner, d)
}
+func (d *deleteData) QueryContext(ctx context.Context) (*sql.Rows, error) {
+ if d.RunWith == nil {
+ return nil, RunnerNotSet
+ }
+ ctxRunner, ok := d.RunWith.(QueryerContext)
+ if !ok {
+ return nil, NoContextSupport
+ }
+ return QueryContextWith(ctx, ctxRunner, d)
+}
+
+func (d *deleteData) QueryRowContext(ctx context.Context) RowScanner {
+ if d.RunWith == nil {
+ return &Row{err: RunnerNotSet}
+ }
+ queryRower, ok := d.RunWith.(QueryRowerContext)
+ if !ok {
+ if _, ok := d.RunWith.(QueryerContext); !ok {
+ return &Row{err: RunnerNotQueryRunner}
+ }
+ return &Row{err: NoContextSupport}
+ }
+ return QueryRowContextWith(ctx, queryRower, d)
+}
+
// ExecContext builds and ExecContexts the query with the Runner set by RunWith.
func (b DeleteBuilder) ExecContext(ctx context.Context) (sql.Result, error) {
data := builder.GetStruct(b).(deleteData)
return data.ExecContext(ctx)
}
+
+// QueryContext builds and QueryContexts the query with the Runner set by RunWith.
+func (b DeleteBuilder) QueryContext(ctx context.Context) (*sql.Rows, error) {
+ data := builder.GetStruct(b).(deleteData)
+ return data.QueryContext(ctx)
+}
+
+// QueryRowContext builds and QueryRowContexts the query with the Runner set by RunWith.
+func (b DeleteBuilder) QueryRowContext(ctx context.Context) RowScanner {
+ data := builder.GetStruct(b).(deleteData)
+ return data.QueryRowContext(ctx)
+}
+
+// ScanContext is a shortcut for QueryRowContext().Scan.
+func (b DeleteBuilder) ScanContext(ctx context.Context, dest ...interface{}) error {
+ return b.QueryRowContext(ctx).Scan(dest...)
+}
diff --git a/vendor/github.com/Masterminds/squirrel/expr.go b/vendor/github.com/Masterminds/squirrel/expr.go
index c398611af..4c943e5ea 100644
--- a/vendor/github.com/Masterminds/squirrel/expr.go
+++ b/vendor/github.com/Masterminds/squirrel/expr.go
@@ -24,7 +24,7 @@ type expr struct {
//
// Ex:
// Expr("FROM_UNIXTIME(?)", t)
-func Expr(sql string, args ...interface{}) expr {
+func Expr(sql string, args ...interface{}) Sqlizer {
return expr{sql: sql, args: args}
}
@@ -134,8 +134,6 @@ func (e aliasExpr) ToSql() (sql string, args []interface{}, err error) {
}
// Eq is syntactic sugar for use with Where/Having/Set methods.
-// Ex:
-// .Where(Eq{"id": 1})
type Eq map[string]interface{}
func (eq Eq) toSQL(useNotOpr bool) (sql string, args []interface{}, err error) {
diff --git a/vendor/github.com/Masterminds/squirrel/go.mod b/vendor/github.com/Masterminds/squirrel/go.mod
deleted file mode 100644
index ba46589a6..000000000
--- a/vendor/github.com/Masterminds/squirrel/go.mod
+++ /dev/null
@@ -1,9 +0,0 @@
-module github.com/Masterminds/squirrel
-
-require (
- github.com/davecgh/go-spew v1.1.1 // indirect
- github.com/lann/builder v0.0.0-20180802200727-47ae307949d0
- github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
- github.com/pmezard/go-difflib v1.0.0 // indirect
- github.com/stretchr/testify v1.2.2
-)
diff --git a/vendor/github.com/Masterminds/squirrel/go.sum b/vendor/github.com/Masterminds/squirrel/go.sum
deleted file mode 100644
index a92f768e6..000000000
--- a/vendor/github.com/Masterminds/squirrel/go.sum
+++ /dev/null
@@ -1,10 +0,0 @@
-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/lann/builder v0.0.0-20180802200727-47ae307949d0 h1:SOEGU9fKiNWd/HOJuq6+3iTQz8KNCLtVX6idSoTLdUw=
-github.com/lann/builder v0.0.0-20180802200727-47ae307949d0/go.mod h1:dXGbAdH5GtBTC4WfIxhKZfyBF/HBFgRZSWwZ9g/He9o=
-github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 h1:P6pPBnrTSX3DEVR4fDembhRWSsG5rVo6hYhAB/ADZrk=
-github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0/go.mod h1:vmVJ0l/dxyfGW6FmdpVm2joNMFikkuWg0EoCKLGUMNw=
-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/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
-github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
diff --git a/vendor/github.com/Masterminds/squirrel/placeholder.go b/vendor/github.com/Masterminds/squirrel/placeholder.go
index 69bebb1dc..8e97a6c62 100644
--- a/vendor/github.com/Masterminds/squirrel/placeholder.go
+++ b/vendor/github.com/Masterminds/squirrel/placeholder.go
@@ -30,6 +30,10 @@ var (
// Colon is a PlaceholderFormat instance that replaces placeholders with
// colon-prefixed positional placeholders (e.g. :1, :2, :3).
Colon = colonFormat{}
+
+ // AtP is a PlaceholderFormat instance that replaces placeholders with
+ // "@p"-prefixed positional placeholders (e.g. @p1, @p2, @p3).
+ AtP = atpFormat{}
)
type questionFormat struct{}
@@ -62,6 +66,16 @@ func (colonFormat) debugPlaceholder() string {
return ":"
}
+type atpFormat struct{}
+
+func (atpFormat) ReplacePlaceholders(sql string) (string, error) {
+ return replacePositionalPlaceholders(sql, "@p")
+}
+
+func (atpFormat) debugPlaceholder() string {
+ return "@p"
+}
+
// Placeholders returns a string with count ? placeholders joined with commas.
func Placeholders(count int) string {
if count < 1 {
diff --git a/vendor/github.com/Masterminds/squirrel/select.go b/vendor/github.com/Masterminds/squirrel/select.go
index 5853e8240..ad5312e25 100644
--- a/vendor/github.com/Masterminds/squirrel/select.go
+++ b/vendor/github.com/Masterminds/squirrel/select.go
@@ -184,6 +184,9 @@ func (b SelectBuilder) PlaceholderFormat(f PlaceholderFormat) SelectBuilder {
// Runner methods
// RunWith sets a Runner (like database/sql.DB) to be used with e.g. Exec.
+// For most cases runner will be a database connection.
+//
+// Internally we use this to mock out the database connection for testing.
func (b SelectBuilder) RunWith(runner BaseRunner) SelectBuilder {
return setRunWith(b, runner).(SelectBuilder)
}
@@ -301,6 +304,16 @@ func (b SelectBuilder) RightJoin(join string, rest ...interface{}) SelectBuilder
return b.JoinClause("RIGHT JOIN "+join, rest...)
}
+// InnerJoin adds a INNER JOIN clause to the query.
+func (b SelectBuilder) InnerJoin(join string, rest ...interface{}) SelectBuilder {
+ return b.JoinClause("INNER JOIN "+join, rest...)
+}
+
+// CrossJoin adds a CROSS JOIN clause to the query.
+func (b SelectBuilder) CrossJoin(join string, rest ...interface{}) SelectBuilder {
+ return b.JoinClause("CROSS JOIN "+join, rest...)
+}
+
// Where adds an expression to the WHERE clause of the query.
//
// Expressions are ANDed together in the generated SQL.
diff --git a/vendor/github.com/Masterminds/squirrel/statement.go b/vendor/github.com/Masterminds/squirrel/statement.go
index 1265fe145..9420c67f8 100644
--- a/vendor/github.com/Masterminds/squirrel/statement.go
+++ b/vendor/github.com/Masterminds/squirrel/statement.go
@@ -41,6 +41,13 @@ func (b StatementBuilderType) RunWith(runner BaseRunner) StatementBuilderType {
return setRunWith(b, runner).(StatementBuilderType)
}
+// Where adds WHERE expressions to the query.
+//
+// See SelectBuilder.Where for more information.
+func (b StatementBuilderType) Where(pred interface{}, args ...interface{}) StatementBuilderType {
+ return builder.Append(b, "WhereParts", newWherePart(pred, args...)).(StatementBuilderType)
+}
+
// StatementBuilder is a parent builder for other builders, e.g. SelectBuilder.
var StatementBuilder = StatementBuilderType(builder.EmptyBuilder).PlaceholderFormat(Question)
diff --git a/vendor/github.com/Masterminds/squirrel/update.go b/vendor/github.com/Masterminds/squirrel/update.go
index e4927d79d..70b6f68c8 100644
--- a/vendor/github.com/Masterminds/squirrel/update.go
+++ b/vendor/github.com/Masterminds/squirrel/update.go
@@ -86,7 +86,11 @@ func (d *updateData) ToSql() (sqlStr string, args []interface{}, err error) {
if err != nil {
return "", nil, err
}
- valSql = vsql
+ if _, ok := vs.(SelectBuilder); ok {
+ valSql = fmt.Sprintf("(%s)", vsql)
+ } else {
+ valSql = vsql
+ }
args = append(args, vargs...)
} else {
valSql = "?"
diff --git a/vendor/github.com/Microsoft/go-winio/go.mod b/vendor/github.com/Microsoft/go-winio/go.mod
deleted file mode 100644
index 50b9d6e2e..000000000
--- a/vendor/github.com/Microsoft/go-winio/go.mod
+++ /dev/null
@@ -1,9 +0,0 @@
-module github.com/Microsoft/go-winio
-
-go 1.12
-
-require (
- github.com/pkg/errors v0.8.1
- github.com/sirupsen/logrus v1.4.1
- golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3
-)
diff --git a/vendor/github.com/Microsoft/go-winio/go.sum b/vendor/github.com/Microsoft/go-winio/go.sum
deleted file mode 100644
index 209aa8cf4..000000000
--- a/vendor/github.com/Microsoft/go-winio/go.sum
+++ /dev/null
@@ -1,18 +0,0 @@
-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/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
-github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
-github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
-github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
-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/sirupsen/logrus v1.4.1 h1:GL2rEmy6nsikmW0r8opw9JIRScdMF5hA8cOYLH7In1k=
-github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
-github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
-github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
-golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b h1:ag/x1USPSsqHud38I9BAC88qdNLDHHtQ4mlgQIZPPNA=
-golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3 h1:7TYNF4UdlohbFwpNH04CoPMp1cHUZgO1Ebq5r2hIjfo=
-golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
diff --git a/vendor/github.com/Microsoft/go-winio/pipe.go b/vendor/github.com/Microsoft/go-winio/pipe.go
index d6a46f6a2..96700a73d 100644
--- a/vendor/github.com/Microsoft/go-winio/pipe.go
+++ b/vendor/github.com/Microsoft/go-winio/pipe.go
@@ -182,13 +182,14 @@ func (s pipeAddress) String() string {
}
// tryDialPipe attempts to dial the pipe at `path` until `ctx` cancellation or timeout.
-func tryDialPipe(ctx context.Context, path *string) (syscall.Handle, error) {
+func tryDialPipe(ctx context.Context, path *string, access uint32) (syscall.Handle, error) {
for {
+
select {
case <-ctx.Done():
return syscall.Handle(0), ctx.Err()
default:
- h, err := createFile(*path, syscall.GENERIC_READ|syscall.GENERIC_WRITE, 0, nil, syscall.OPEN_EXISTING, syscall.FILE_FLAG_OVERLAPPED|cSECURITY_SQOS_PRESENT|cSECURITY_ANONYMOUS, 0)
+ h, err := createFile(*path, access, 0, nil, syscall.OPEN_EXISTING, syscall.FILE_FLAG_OVERLAPPED|cSECURITY_SQOS_PRESENT|cSECURITY_ANONYMOUS, 0)
if err == nil {
return h, nil
}
@@ -197,7 +198,7 @@ func tryDialPipe(ctx context.Context, path *string) (syscall.Handle, error) {
}
// Wait 10 msec and try again. This is a rather simplistic
// view, as we always try each 10 milliseconds.
- time.Sleep(time.Millisecond * 10)
+ time.Sleep(10 * time.Millisecond)
}
}
}
@@ -210,7 +211,7 @@ func DialPipe(path string, timeout *time.Duration) (net.Conn, error) {
if timeout != nil {
absTimeout = time.Now().Add(*timeout)
} else {
- absTimeout = time.Now().Add(time.Second * 2)
+ absTimeout = time.Now().Add(2 * time.Second)
}
ctx, _ := context.WithDeadline(context.Background(), absTimeout)
conn, err := DialPipeContext(ctx, path)
@@ -223,9 +224,15 @@ func DialPipe(path string, timeout *time.Duration) (net.Conn, error) {
// DialPipeContext attempts to connect to a named pipe by `path` until `ctx`
// cancellation or timeout.
func DialPipeContext(ctx context.Context, path string) (net.Conn, error) {
+ return DialPipeAccess(ctx, path, syscall.GENERIC_READ|syscall.GENERIC_WRITE)
+}
+
+// DialPipeAccess attempts to connect to a named pipe by `path` with `access` until `ctx`
+// cancellation or timeout.
+func DialPipeAccess(ctx context.Context, path string, access uint32) (net.Conn, error) {
var err error
var h syscall.Handle
- h, err = tryDialPipe(ctx, &path)
+ h, err = tryDialPipe(ctx, &path, access)
if err != nil {
return nil, err
}
@@ -422,10 +429,10 @@ type PipeConfig struct {
// when the pipe is in message mode.
MessageMode bool
- // InputBufferSize specifies the size the input buffer, in bytes.
+ // InputBufferSize specifies the size of the input buffer, in bytes.
InputBufferSize int32
- // OutputBufferSize specifies the size the input buffer, in bytes.
+ // OutputBufferSize specifies the size of the output buffer, in bytes.
OutputBufferSize int32
}
diff --git a/vendor/github.com/Microsoft/go-winio/pkg/security/grantvmgroupaccess.go b/vendor/github.com/Microsoft/go-winio/pkg/security/grantvmgroupaccess.go
new file mode 100644
index 000000000..2df31b660
--- /dev/null
+++ b/vendor/github.com/Microsoft/go-winio/pkg/security/grantvmgroupaccess.go
@@ -0,0 +1,159 @@
+package security
+
+import (
+ "os"
+ "syscall"
+ "unsafe"
+
+ "github.com/pkg/errors"
+)
+
+type (
+ accessMask uint32
+ accessMode uint32
+ desiredAccess uint32
+ inheritMode uint32
+ objectType uint32
+ shareMode uint32
+ securityInformation uint32
+ trusteeForm uint32
+ trusteeType uint32
+
+ explicitAccess struct {
+ accessPermissions accessMask
+ accessMode accessMode
+ inheritance inheritMode
+ trustee trustee
+ }
+
+ trustee struct {
+ multipleTrustee *trustee
+ multipleTrusteeOperation int32
+ trusteeForm trusteeForm
+ trusteeType trusteeType
+ name uintptr
+ }
+)
+
+const (
+ accessMaskDesiredPermission accessMask = 1 << 31 // GENERIC_READ
+
+ accessModeGrant accessMode = 1
+
+ desiredAccessReadControl desiredAccess = 0x20000
+ desiredAccessWriteDac desiredAccess = 0x40000
+
+ gvmga = "GrantVmGroupAccess:"
+
+ inheritModeNoInheritance inheritMode = 0x0
+ inheritModeSubContainersAndObjectsInherit inheritMode = 0x3
+
+ objectTypeFileObject objectType = 0x1
+
+ securityInformationDACL securityInformation = 0x4
+
+ shareModeRead shareMode = 0x1
+ shareModeWrite shareMode = 0x2
+
+ sidVmGroup = "S-1-5-83-0"
+
+ trusteeFormIsSid trusteeForm = 0
+
+ trusteeTypeWellKnownGroup trusteeType = 5
+)
+
+// GrantVMGroupAccess sets the DACL for a specified file or directory to
+// include Grant ACE entries for the VM Group SID. This is a golang re-
+// implementation of the same function in vmcompute, just not exported in
+// RS5. Which kind of sucks. Sucks a lot :/
+func GrantVmGroupAccess(name string) error {
+ // Stat (to determine if `name` is a directory).
+ s, err := os.Stat(name)
+ if err != nil {
+ return errors.Wrapf(err, "%s os.Stat %s", gvmga, name)
+ }
+
+ // Get a handle to the file/directory. Must defer Close on success.
+ fd, err := createFile(name, s.IsDir())
+ if err != nil {
+ return err // Already wrapped
+ }
+ defer syscall.CloseHandle(fd)
+
+ // Get the current DACL and Security Descriptor. Must defer LocalFree on success.
+ ot := objectTypeFileObject
+ si := securityInformationDACL
+ sd := uintptr(0)
+ origDACL := uintptr(0)
+ if err := getSecurityInfo(fd, uint32(ot), uint32(si), nil, nil, &origDACL, nil, &sd); err != nil {
+ return errors.Wrapf(err, "%s GetSecurityInfo %s", gvmga, name)
+ }
+ defer syscall.LocalFree((syscall.Handle)(unsafe.Pointer(sd)))
+
+ // Generate a new DACL which is the current DACL with the required ACEs added.
+ // Must defer LocalFree on success.
+ newDACL, err := generateDACLWithAcesAdded(name, s.IsDir(), origDACL)
+ if err != nil {
+ return err // Already wrapped
+ }
+ defer syscall.LocalFree((syscall.Handle)(unsafe.Pointer(newDACL)))
+
+ // And finally use SetSecurityInfo to apply the updated DACL.
+ if err := setSecurityInfo(fd, uint32(ot), uint32(si), uintptr(0), uintptr(0), newDACL, uintptr(0)); err != nil {
+ return errors.Wrapf(err, "%s SetSecurityInfo %s", gvmga, name)
+ }
+
+ return nil
+}
+
+// createFile is a helper function to call [Nt]CreateFile to get a handle to
+// the file or directory.
+func createFile(name string, isDir bool) (syscall.Handle, error) {
+ namep := syscall.StringToUTF16(name)
+ da := uint32(desiredAccessReadControl | desiredAccessWriteDac)
+ sm := uint32(shareModeRead | shareModeWrite)
+ fa := uint32(syscall.FILE_ATTRIBUTE_NORMAL)
+ if isDir {
+ fa = uint32(fa | syscall.FILE_FLAG_BACKUP_SEMANTICS)
+ }
+ fd, err := syscall.CreateFile(&namep[0], da, sm, nil, syscall.OPEN_EXISTING, fa, 0)
+ if err != nil {
+ return 0, errors.Wrapf(err, "%s syscall.CreateFile %s", gvmga, name)
+ }
+ return fd, nil
+}
+
+// generateDACLWithAcesAdded generates a new DACL with the two needed ACEs added.
+// The caller is responsible for LocalFree of the returned DACL on success.
+func generateDACLWithAcesAdded(name string, isDir bool, origDACL uintptr) (uintptr, error) {
+ // Generate pointers to the SIDs based on the string SIDs
+ sid, err := syscall.StringToSid(sidVmGroup)
+ if err != nil {
+ return 0, errors.Wrapf(err, "%s syscall.StringToSid %s %s", gvmga, name, sidVmGroup)
+ }
+
+ inheritance := inheritModeNoInheritance
+ if isDir {
+ inheritance = inheritModeSubContainersAndObjectsInherit
+ }
+
+ eaArray := []explicitAccess{
+ explicitAccess{
+ accessPermissions: accessMaskDesiredPermission,
+ accessMode: accessModeGrant,
+ inheritance: inheritance,
+ trustee: trustee{
+ trusteeForm: trusteeFormIsSid,
+ trusteeType: trusteeTypeWellKnownGroup,
+ name: uintptr(unsafe.Pointer(sid)),
+ },
+ },
+ }
+
+ modifiedDACL := uintptr(0)
+ if err := setEntriesInAcl(uintptr(uint32(1)), uintptr(unsafe.Pointer(&eaArray[0])), origDACL, &modifiedDACL); err != nil {
+ return 0, errors.Wrapf(err, "%s SetEntriesInAcl %s", gvmga, name)
+ }
+
+ return modifiedDACL, nil
+}
diff --git a/vendor/github.com/Microsoft/go-winio/pkg/security/syscall_windows.go b/vendor/github.com/Microsoft/go-winio/pkg/security/syscall_windows.go
new file mode 100644
index 000000000..c40c2739b
--- /dev/null
+++ b/vendor/github.com/Microsoft/go-winio/pkg/security/syscall_windows.go
@@ -0,0 +1,7 @@
+package security
+
+//go:generate go run mksyscall_windows.go -output zsyscall_windows.go syscall_windows.go
+
+//sys getSecurityInfo(handle syscall.Handle, objectType uint32, si uint32, ppsidOwner **uintptr, ppsidGroup **uintptr, ppDacl *uintptr, ppSacl *uintptr, ppSecurityDescriptor *uintptr) (err error) [failretval!=0] = advapi32.GetSecurityInfo
+//sys setSecurityInfo(handle syscall.Handle, objectType uint32, si uint32, psidOwner uintptr, psidGroup uintptr, pDacl uintptr, pSacl uintptr) (err error) [failretval!=0] = advapi32.SetSecurityInfo
+//sys setEntriesInAcl(count uintptr, pListOfEEs uintptr, oldAcl uintptr, newAcl *uintptr) (err error) [failretval!=0] = advapi32.SetEntriesInAclW
diff --git a/vendor/github.com/Microsoft/go-winio/pkg/security/zsyscall_windows.go b/vendor/github.com/Microsoft/go-winio/pkg/security/zsyscall_windows.go
new file mode 100644
index 000000000..0f0c0deff
--- /dev/null
+++ b/vendor/github.com/Microsoft/go-winio/pkg/security/zsyscall_windows.go
@@ -0,0 +1,81 @@
+// Code generated mksyscall_windows.exe DO NOT EDIT
+
+package security
+
+import (
+ "syscall"
+ "unsafe"
+
+ "golang.org/x/sys/windows"
+)
+
+var _ unsafe.Pointer
+
+// Do the interface allocations only once for common
+// Errno values.
+const (
+ errnoERROR_IO_PENDING = 997
+)
+
+var (
+ errERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING)
+)
+
+// errnoErr returns common boxed Errno values, to prevent
+// allocations at runtime.
+func errnoErr(e syscall.Errno) error {
+ switch e {
+ case 0:
+ return nil
+ case errnoERROR_IO_PENDING:
+ return errERROR_IO_PENDING
+ }
+ // TODO: add more here, after collecting data on the common
+ // error values see on Windows. (perhaps when running
+ // all.bat?)
+ return e
+}
+
+var (
+ modadvapi32 = windows.NewLazySystemDLL("advapi32.dll")
+
+ procGetSecurityInfo = modadvapi32.NewProc("GetSecurityInfo")
+ procSetSecurityInfo = modadvapi32.NewProc("SetSecurityInfo")
+ procSetEntriesInAclW = modadvapi32.NewProc("SetEntriesInAclW")
+)
+
+func getSecurityInfo(handle syscall.Handle, objectType uint32, si uint32, ppsidOwner **uintptr, ppsidGroup **uintptr, ppDacl *uintptr, ppSacl *uintptr, ppSecurityDescriptor *uintptr) (err error) {
+ r1, _, e1 := syscall.Syscall9(procGetSecurityInfo.Addr(), 8, uintptr(handle), uintptr(objectType), uintptr(si), uintptr(unsafe.Pointer(ppsidOwner)), uintptr(unsafe.Pointer(ppsidGroup)), uintptr(unsafe.Pointer(ppDacl)), uintptr(unsafe.Pointer(ppSacl)), uintptr(unsafe.Pointer(ppSecurityDescriptor)), 0)
+ if r1 != 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
+func setSecurityInfo(handle syscall.Handle, objectType uint32, si uint32, psidOwner uintptr, psidGroup uintptr, pDacl uintptr, pSacl uintptr) (err error) {
+ r1, _, e1 := syscall.Syscall9(procSetSecurityInfo.Addr(), 7, uintptr(handle), uintptr(objectType), uintptr(si), uintptr(psidOwner), uintptr(psidGroup), uintptr(pDacl), uintptr(pSacl), 0, 0)
+ if r1 != 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
+func setEntriesInAcl(count uintptr, pListOfEEs uintptr, oldAcl uintptr, newAcl *uintptr) (err error) {
+ r1, _, e1 := syscall.Syscall6(procSetEntriesInAclW.Addr(), 4, uintptr(count), uintptr(pListOfEEs), uintptr(oldAcl), uintptr(unsafe.Pointer(newAcl)), 0, 0)
+ if r1 != 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
diff --git a/vendor/github.com/Microsoft/go-winio/vhd/vhd.go b/vendor/github.com/Microsoft/go-winio/vhd/vhd.go
new file mode 100644
index 000000000..91083a388
--- /dev/null
+++ b/vendor/github.com/Microsoft/go-winio/vhd/vhd.go
@@ -0,0 +1,324 @@
+// +build windows
+
+package vhd
+
+import (
+ "fmt"
+ "syscall"
+
+ "github.com/Microsoft/go-winio/pkg/guid"
+ "github.com/pkg/errors"
+ "golang.org/x/sys/windows"
+)
+
+//go:generate go run mksyscall_windows.go -output zvhd.go vhd.go
+
+//sys createVirtualDisk(virtualStorageType *VirtualStorageType, path string, virtualDiskAccessMask uint32, securityDescriptor *uintptr, createVirtualDiskFlags uint32, providerSpecificFlags uint32, parameters *CreateVirtualDiskParameters, overlapped *syscall.Overlapped, handle *syscall.Handle) (err error) [failretval != 0] = virtdisk.CreateVirtualDisk
+//sys openVirtualDisk(virtualStorageType *VirtualStorageType, path string, virtualDiskAccessMask uint32, openVirtualDiskFlags uint32, parameters *OpenVirtualDiskParameters, handle *syscall.Handle) (err error) [failretval != 0] = virtdisk.OpenVirtualDisk
+//sys attachVirtualDisk(handle syscall.Handle, securityDescriptor *uintptr, attachVirtualDiskFlag uint32, providerSpecificFlags uint32, parameters *AttachVirtualDiskParameters, overlapped *syscall.Overlapped) (err error) [failretval != 0] = virtdisk.AttachVirtualDisk
+//sys detachVirtualDisk(handle syscall.Handle, detachVirtualDiskFlags uint32, providerSpecificFlags uint32) (err error) [failretval != 0] = virtdisk.DetachVirtualDisk
+//sys getVirtualDiskPhysicalPath(handle syscall.Handle, diskPathSizeInBytes *uint32, buffer *uint16) (err error) [failretval != 0] = virtdisk.GetVirtualDiskPhysicalPath
+
+type (
+ CreateVirtualDiskFlag uint32
+ VirtualDiskFlag uint32
+ AttachVirtualDiskFlag uint32
+ DetachVirtualDiskFlag uint32
+ VirtualDiskAccessMask uint32
+)
+
+type VirtualStorageType struct {
+ DeviceID uint32
+ VendorID guid.GUID
+}
+
+type CreateVersion2 struct {
+ UniqueID guid.GUID
+ MaximumSize uint64
+ BlockSizeInBytes uint32
+ SectorSizeInBytes uint32
+ PhysicalSectorSizeInByte uint32
+ ParentPath *uint16 // string
+ SourcePath *uint16 // string
+ OpenFlags uint32
+ ParentVirtualStorageType VirtualStorageType
+ SourceVirtualStorageType VirtualStorageType
+ ResiliencyGUID guid.GUID
+}
+
+type CreateVirtualDiskParameters struct {
+ Version uint32 // Must always be set to 2
+ Version2 CreateVersion2
+}
+
+type OpenVersion2 struct {
+ GetInfoOnly bool
+ ReadOnly bool
+ ResiliencyGUID guid.GUID
+}
+
+type OpenVirtualDiskParameters struct {
+ Version uint32 // Must always be set to 2
+ Version2 OpenVersion2
+}
+
+type AttachVersion2 struct {
+ RestrictedOffset uint64
+ RestrictedLength uint64
+}
+
+type AttachVirtualDiskParameters struct {
+ Version uint32 // Must always be set to 2
+ Version2 AttachVersion2
+}
+
+const (
+ VIRTUAL_STORAGE_TYPE_DEVICE_VHDX = 0x3
+
+ // Access Mask for opening a VHD
+ VirtualDiskAccessNone VirtualDiskAccessMask = 0x00000000
+ VirtualDiskAccessAttachRO VirtualDiskAccessMask = 0x00010000
+ VirtualDiskAccessAttachRW VirtualDiskAccessMask = 0x00020000
+ VirtualDiskAccessDetach VirtualDiskAccessMask = 0x00040000
+ VirtualDiskAccessGetInfo VirtualDiskAccessMask = 0x00080000
+ VirtualDiskAccessCreate VirtualDiskAccessMask = 0x00100000
+ VirtualDiskAccessMetaOps VirtualDiskAccessMask = 0x00200000
+ VirtualDiskAccessRead VirtualDiskAccessMask = 0x000d0000
+ VirtualDiskAccessAll VirtualDiskAccessMask = 0x003f0000
+ VirtualDiskAccessWritable VirtualDiskAccessMask = 0x00320000
+
+ // Flags for creating a VHD
+ CreateVirtualDiskFlagNone CreateVirtualDiskFlag = 0x0
+ CreateVirtualDiskFlagFullPhysicalAllocation CreateVirtualDiskFlag = 0x1
+ CreateVirtualDiskFlagPreventWritesToSourceDisk CreateVirtualDiskFlag = 0x2
+ CreateVirtualDiskFlagDoNotCopyMetadataFromParent CreateVirtualDiskFlag = 0x4
+ CreateVirtualDiskFlagCreateBackingStorage CreateVirtualDiskFlag = 0x8
+ CreateVirtualDiskFlagUseChangeTrackingSourceLimit CreateVirtualDiskFlag = 0x10
+ CreateVirtualDiskFlagPreserveParentChangeTrackingState CreateVirtualDiskFlag = 0x20
+ CreateVirtualDiskFlagVhdSetUseOriginalBackingStorage CreateVirtualDiskFlag = 0x40
+ CreateVirtualDiskFlagSparseFile CreateVirtualDiskFlag = 0x80
+ CreateVirtualDiskFlagPmemCompatible CreateVirtualDiskFlag = 0x100
+ CreateVirtualDiskFlagSupportCompressedVolumes CreateVirtualDiskFlag = 0x200
+
+ // Flags for opening a VHD
+ OpenVirtualDiskFlagNone VirtualDiskFlag = 0x00000000
+ OpenVirtualDiskFlagNoParents VirtualDiskFlag = 0x00000001
+ OpenVirtualDiskFlagBlankFile VirtualDiskFlag = 0x00000002
+ OpenVirtualDiskFlagBootDrive VirtualDiskFlag = 0x00000004
+ OpenVirtualDiskFlagCachedIO VirtualDiskFlag = 0x00000008
+ OpenVirtualDiskFlagCustomDiffChain VirtualDiskFlag = 0x00000010
+ OpenVirtualDiskFlagParentCachedIO VirtualDiskFlag = 0x00000020
+ OpenVirtualDiskFlagVhdsetFileOnly VirtualDiskFlag = 0x00000040
+ OpenVirtualDiskFlagIgnoreRelativeParentLocator VirtualDiskFlag = 0x00000080
+ OpenVirtualDiskFlagNoWriteHardening VirtualDiskFlag = 0x00000100
+ OpenVirtualDiskFlagSupportCompressedVolumes VirtualDiskFlag = 0x00000200
+
+ // Flags for attaching a VHD
+ AttachVirtualDiskFlagNone AttachVirtualDiskFlag = 0x00000000
+ AttachVirtualDiskFlagReadOnly AttachVirtualDiskFlag = 0x00000001
+ AttachVirtualDiskFlagNoDriveLetter AttachVirtualDiskFlag = 0x00000002
+ AttachVirtualDiskFlagPermanentLifetime AttachVirtualDiskFlag = 0x00000004
+ AttachVirtualDiskFlagNoLocalHost AttachVirtualDiskFlag = 0x00000008
+ AttachVirtualDiskFlagNoSecurityDescriptor AttachVirtualDiskFlag = 0x00000010
+ AttachVirtualDiskFlagBypassDefaultEncryptionPolicy AttachVirtualDiskFlag = 0x00000020
+ AttachVirtualDiskFlagNonPnp AttachVirtualDiskFlag = 0x00000040
+ AttachVirtualDiskFlagRestrictedRange AttachVirtualDiskFlag = 0x00000080
+ AttachVirtualDiskFlagSinglePartition AttachVirtualDiskFlag = 0x00000100
+ AttachVirtualDiskFlagRegisterVolume AttachVirtualDiskFlag = 0x00000200
+
+ // Flags for detaching a VHD
+ DetachVirtualDiskFlagNone DetachVirtualDiskFlag = 0x0
+)
+
+// CreateVhdx is a helper function to create a simple vhdx file at the given path using
+// default values.
+func CreateVhdx(path string, maxSizeInGb, blockSizeInMb uint32) error {
+ params := CreateVirtualDiskParameters{
+ Version: 2,
+ Version2: CreateVersion2{
+ MaximumSize: uint64(maxSizeInGb) * 1024 * 1024 * 1024,
+ BlockSizeInBytes: blockSizeInMb * 1024 * 1024,
+ },
+ }
+
+ handle, err := CreateVirtualDisk(path, VirtualDiskAccessNone, CreateVirtualDiskFlagNone, ¶ms)
+ if err != nil {
+ return err
+ }
+
+ if err := syscall.CloseHandle(handle); err != nil {
+ return err
+ }
+ return nil
+}
+
+// DetachVirtualDisk detaches a virtual hard disk by handle.
+func DetachVirtualDisk(handle syscall.Handle) (err error) {
+ if err := detachVirtualDisk(handle, 0, 0); err != nil {
+ return errors.Wrap(err, "failed to detach virtual disk")
+ }
+ return nil
+}
+
+// DetachVhd detaches a vhd found at `path`.
+func DetachVhd(path string) error {
+ handle, err := OpenVirtualDisk(
+ path,
+ VirtualDiskAccessNone,
+ OpenVirtualDiskFlagCachedIO|OpenVirtualDiskFlagIgnoreRelativeParentLocator,
+ )
+ if err != nil {
+ return err
+ }
+ defer syscall.CloseHandle(handle)
+ return DetachVirtualDisk(handle)
+}
+
+// AttachVirtualDisk attaches a virtual hard disk for use.
+func AttachVirtualDisk(handle syscall.Handle, attachVirtualDiskFlag AttachVirtualDiskFlag, parameters *AttachVirtualDiskParameters) (err error) {
+ if parameters.Version != 2 {
+ return fmt.Errorf("only version 2 VHDs are supported, found version: %d", parameters.Version)
+ }
+ if err := attachVirtualDisk(
+ handle,
+ nil,
+ uint32(attachVirtualDiskFlag),
+ 0,
+ parameters,
+ nil,
+ ); err != nil {
+ return errors.Wrap(err, "failed to attach virtual disk")
+ }
+ return nil
+}
+
+// AttachVhd attaches a virtual hard disk at `path` for use.
+func AttachVhd(path string) (err error) {
+ handle, err := OpenVirtualDisk(
+ path,
+ VirtualDiskAccessNone,
+ OpenVirtualDiskFlagCachedIO|OpenVirtualDiskFlagIgnoreRelativeParentLocator,
+ )
+ if err != nil {
+ return err
+ }
+
+ defer syscall.CloseHandle(handle)
+ params := AttachVirtualDiskParameters{Version: 2}
+ if err := AttachVirtualDisk(
+ handle,
+ AttachVirtualDiskFlagNone,
+ ¶ms,
+ ); err != nil {
+ return errors.Wrap(err, "failed to attach virtual disk")
+ }
+ return nil
+}
+
+// OpenVirtualDisk obtains a handle to a VHD opened with supplied access mask and flags.
+func OpenVirtualDisk(vhdPath string, virtualDiskAccessMask VirtualDiskAccessMask, openVirtualDiskFlags VirtualDiskFlag) (syscall.Handle, error) {
+ parameters := OpenVirtualDiskParameters{Version: 2}
+ handle, err := OpenVirtualDiskWithParameters(
+ vhdPath,
+ virtualDiskAccessMask,
+ openVirtualDiskFlags,
+ ¶meters,
+ )
+ if err != nil {
+ return 0, err
+ }
+ return handle, nil
+}
+
+// OpenVirtualDiskWithParameters obtains a handle to a VHD opened with supplied access mask, flags and parameters.
+func OpenVirtualDiskWithParameters(vhdPath string, virtualDiskAccessMask VirtualDiskAccessMask, openVirtualDiskFlags VirtualDiskFlag, parameters *OpenVirtualDiskParameters) (syscall.Handle, error) {
+ var (
+ handle syscall.Handle
+ defaultType VirtualStorageType
+ )
+ if parameters.Version != 2 {
+ return handle, fmt.Errorf("only version 2 VHDs are supported, found version: %d", parameters.Version)
+ }
+ if err := openVirtualDisk(
+ &defaultType,
+ vhdPath,
+ uint32(virtualDiskAccessMask),
+ uint32(openVirtualDiskFlags),
+ parameters,
+ &handle,
+ ); err != nil {
+ return 0, errors.Wrap(err, "failed to open virtual disk")
+ }
+ return handle, nil
+}
+
+// CreateVirtualDisk creates a virtual harddisk and returns a handle to the disk.
+func CreateVirtualDisk(path string, virtualDiskAccessMask VirtualDiskAccessMask, createVirtualDiskFlags CreateVirtualDiskFlag, parameters *CreateVirtualDiskParameters) (syscall.Handle, error) {
+ var (
+ handle syscall.Handle
+ defaultType VirtualStorageType
+ )
+ if parameters.Version != 2 {
+ return handle, fmt.Errorf("only version 2 VHDs are supported, found version: %d", parameters.Version)
+ }
+
+ if err := createVirtualDisk(
+ &defaultType,
+ path,
+ uint32(virtualDiskAccessMask),
+ nil,
+ uint32(createVirtualDiskFlags),
+ 0,
+ parameters,
+ nil,
+ &handle,
+ ); err != nil {
+ return handle, errors.Wrap(err, "failed to create virtual disk")
+ }
+ return handle, nil
+}
+
+// GetVirtualDiskPhysicalPath takes a handle to a virtual hard disk and returns the physical
+// path of the disk on the machine. This path is in the form \\.\PhysicalDriveX where X is an integer
+// that represents the particular enumeration of the physical disk on the caller's system.
+func GetVirtualDiskPhysicalPath(handle syscall.Handle) (_ string, err error) {
+ var (
+ diskPathSizeInBytes uint32 = 256 * 2 // max path length 256 wide chars
+ diskPhysicalPathBuf [256]uint16
+ )
+ if err := getVirtualDiskPhysicalPath(
+ handle,
+ &diskPathSizeInBytes,
+ &diskPhysicalPathBuf[0],
+ ); err != nil {
+ return "", errors.Wrap(err, "failed to get disk physical path")
+ }
+ return windows.UTF16ToString(diskPhysicalPathBuf[:]), nil
+}
+
+// CreateDiffVhd is a helper function to create a differencing virtual disk.
+func CreateDiffVhd(diffVhdPath, baseVhdPath string, blockSizeInMB uint32) error {
+ // Setting `ParentPath` is how to signal to create a differencing disk.
+ createParams := &CreateVirtualDiskParameters{
+ Version: 2,
+ Version2: CreateVersion2{
+ ParentPath: windows.StringToUTF16Ptr(baseVhdPath),
+ BlockSizeInBytes: blockSizeInMB * 1024 * 1024,
+ OpenFlags: uint32(OpenVirtualDiskFlagCachedIO),
+ },
+ }
+
+ vhdHandle, err := CreateVirtualDisk(
+ diffVhdPath,
+ VirtualDiskAccessNone,
+ CreateVirtualDiskFlagNone,
+ createParams,
+ )
+ if err != nil {
+ return fmt.Errorf("failed to create differencing vhd: %s", err)
+ }
+ if err := syscall.CloseHandle(vhdHandle); err != nil {
+ return fmt.Errorf("failed to close differencing vhd handle: %s", err)
+ }
+ return nil
+}
diff --git a/vendor/github.com/Microsoft/go-winio/vhd/zvhd.go b/vendor/github.com/Microsoft/go-winio/vhd/zvhd.go
new file mode 100644
index 000000000..54c94db77
--- /dev/null
+++ b/vendor/github.com/Microsoft/go-winio/vhd/zvhd.go
@@ -0,0 +1,125 @@
+// MACHINE GENERATED BY 'go generate' COMMAND; DO NOT EDIT
+
+package vhd
+
+import (
+ "syscall"
+ "unsafe"
+
+ "golang.org/x/sys/windows"
+)
+
+var _ unsafe.Pointer
+
+// Do the interface allocations only once for common
+// Errno values.
+const (
+ errnoERROR_IO_PENDING = 997
+)
+
+var (
+ errERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING)
+)
+
+// errnoErr returns common boxed Errno values, to prevent
+// allocations at runtime.
+func errnoErr(e syscall.Errno) error {
+ switch e {
+ case 0:
+ return nil
+ case errnoERROR_IO_PENDING:
+ return errERROR_IO_PENDING
+ }
+ // TODO: add more here, after collecting data on the common
+ // error values see on Windows. (perhaps when running
+ // all.bat?)
+ return e
+}
+
+var (
+ modvirtdisk = windows.NewLazySystemDLL("virtdisk.dll")
+
+ procCreateVirtualDisk = modvirtdisk.NewProc("CreateVirtualDisk")
+ procOpenVirtualDisk = modvirtdisk.NewProc("OpenVirtualDisk")
+ procAttachVirtualDisk = modvirtdisk.NewProc("AttachVirtualDisk")
+ procDetachVirtualDisk = modvirtdisk.NewProc("DetachVirtualDisk")
+ procGetVirtualDiskPhysicalPath = modvirtdisk.NewProc("GetVirtualDiskPhysicalPath")
+)
+
+func createVirtualDisk(virtualStorageType *VirtualStorageType, path string, virtualDiskAccessMask uint32, securityDescriptor *uintptr, createVirtualDiskFlags uint32, providerSpecificFlags uint32, parameters *CreateVirtualDiskParameters, overlapped *syscall.Overlapped, handle *syscall.Handle) (err error) {
+ var _p0 *uint16
+ _p0, err = syscall.UTF16PtrFromString(path)
+ if err != nil {
+ return
+ }
+ return _createVirtualDisk(virtualStorageType, _p0, virtualDiskAccessMask, securityDescriptor, createVirtualDiskFlags, providerSpecificFlags, parameters, overlapped, handle)
+}
+
+func _createVirtualDisk(virtualStorageType *VirtualStorageType, path *uint16, virtualDiskAccessMask uint32, securityDescriptor *uintptr, createVirtualDiskFlags uint32, providerSpecificFlags uint32, parameters *CreateVirtualDiskParameters, overlapped *syscall.Overlapped, handle *syscall.Handle) (err error) {
+ r1, _, e1 := syscall.Syscall9(procCreateVirtualDisk.Addr(), 9, uintptr(unsafe.Pointer(virtualStorageType)), uintptr(unsafe.Pointer(path)), uintptr(virtualDiskAccessMask), uintptr(unsafe.Pointer(securityDescriptor)), uintptr(createVirtualDiskFlags), uintptr(providerSpecificFlags), uintptr(unsafe.Pointer(parameters)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(handle)))
+ if r1 != 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
+func openVirtualDisk(virtualStorageType *VirtualStorageType, path string, virtualDiskAccessMask uint32, openVirtualDiskFlags uint32, parameters *OpenVirtualDiskParameters, handle *syscall.Handle) (err error) {
+ var _p0 *uint16
+ _p0, err = syscall.UTF16PtrFromString(path)
+ if err != nil {
+ return
+ }
+ return _openVirtualDisk(virtualStorageType, _p0, virtualDiskAccessMask, openVirtualDiskFlags, parameters, handle)
+}
+
+func _openVirtualDisk(virtualStorageType *VirtualStorageType, path *uint16, virtualDiskAccessMask uint32, openVirtualDiskFlags uint32, parameters *OpenVirtualDiskParameters, handle *syscall.Handle) (err error) {
+ r1, _, e1 := syscall.Syscall6(procOpenVirtualDisk.Addr(), 6, uintptr(unsafe.Pointer(virtualStorageType)), uintptr(unsafe.Pointer(path)), uintptr(virtualDiskAccessMask), uintptr(openVirtualDiskFlags), uintptr(unsafe.Pointer(parameters)), uintptr(unsafe.Pointer(handle)))
+ if r1 != 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
+func attachVirtualDisk(handle syscall.Handle, securityDescriptor *uintptr, attachVirtualDiskFlag uint32, providerSpecificFlags uint32, parameters *AttachVirtualDiskParameters, overlapped *syscall.Overlapped) (err error) {
+ r1, _, e1 := syscall.Syscall6(procAttachVirtualDisk.Addr(), 6, uintptr(handle), uintptr(unsafe.Pointer(securityDescriptor)), uintptr(attachVirtualDiskFlag), uintptr(providerSpecificFlags), uintptr(unsafe.Pointer(parameters)), uintptr(unsafe.Pointer(overlapped)))
+ if r1 != 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
+func detachVirtualDisk(handle syscall.Handle, detachVirtualDiskFlags uint32, providerSpecificFlags uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procDetachVirtualDisk.Addr(), 3, uintptr(handle), uintptr(detachVirtualDiskFlags), uintptr(providerSpecificFlags))
+ if r1 != 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
+func getVirtualDiskPhysicalPath(handle syscall.Handle, diskPathSizeInBytes *uint32, buffer *uint16) (err error) {
+ r1, _, e1 := syscall.Syscall(procGetVirtualDiskPhysicalPath.Addr(), 3, uintptr(handle), uintptr(unsafe.Pointer(diskPathSizeInBytes)), uintptr(unsafe.Pointer(buffer)))
+ if r1 != 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/.gitattributes b/vendor/github.com/Microsoft/hcsshim/.gitattributes
new file mode 100644
index 000000000..94f480de9
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/.gitattributes
@@ -0,0 +1 @@
+* text=auto eol=lf
\ No newline at end of file
diff --git a/vendor/github.com/Microsoft/hcsshim/CODEOWNERS b/vendor/github.com/Microsoft/hcsshim/CODEOWNERS
new file mode 100644
index 000000000..87f49df31
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/CODEOWNERS
@@ -0,0 +1,3 @@
+* @microsoft/containerplat
+
+/hcn/* @nagiesek
\ No newline at end of file
diff --git a/vendor/github.com/Microsoft/hcsshim/README.md b/vendor/github.com/Microsoft/hcsshim/README.md
index 15b39181a..d504f1889 100644
--- a/vendor/github.com/Microsoft/hcsshim/README.md
+++ b/vendor/github.com/Microsoft/hcsshim/README.md
@@ -2,7 +2,7 @@
[![Build status](https://ci.appveyor.com/api/projects/status/nbcw28mnkqml0loa/branch/master?svg=true)](https://ci.appveyor.com/project/WindowsVirtualization/hcsshim/branch/master)
-This package contains the Golang interface for using the Windows [Host Compute Service](https://blogs.technet.microsoft.com/virtualization/2017/01/27/introducing-the-host-compute-service-hcs/) (HCS) to launch and manage [Windows Containers](https://docs.microsoft.com/en-us/virtualization/windowscontainers/about/). It also contains other helpers and functions for managing Windows Containers such as the Golang interface for the Host Network Service (HNS).
+This package contains the Golang interface for using the Windows [Host Compute Service](https://techcommunity.microsoft.com/t5/containers/introducing-the-host-compute-service-hcs/ba-p/382332) (HCS) to launch and manage [Windows Containers](https://docs.microsoft.com/en-us/virtualization/windowscontainers/about/). It also contains other helpers and functions for managing Windows Containers such as the Golang interface for the Host Network Service (HNS).
It is primarily used in the [Moby Project](https://github.com/moby/moby), but it can be freely used by other projects as well.
@@ -16,6 +16,11 @@ When you submit a pull request, a CLA-bot will automatically determine whether y
a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions
provided by the bot. You will only need to do this once across all repos using our CLA.
+We also ask that contributors [sign their commits](https://git-scm.com/docs/git-commit) using `git commit -s` or `git commit --signoff` to certify they either authored the work themselves or otherwise have permission to use it in this project.
+
+
+## Code of Conduct
+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
diff --git a/vendor/github.com/Microsoft/hcsshim/appveyor.yml b/vendor/github.com/Microsoft/hcsshim/appveyor.yml
index 661bc406f..bd3f18f07 100644
--- a/vendor/github.com/Microsoft/hcsshim/appveyor.yml
+++ b/vendor/github.com/Microsoft/hcsshim/appveyor.yml
@@ -6,7 +6,7 @@ clone_folder: c:\gopath\src\github.com\Microsoft\hcsshim
environment:
GOPATH: c:\gopath
- PATH: C:\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1\mingw64\bin;%GOPATH%\bin;C:\gometalinter-2.0.12-windows-amd64;%PATH%
+ PATH: "%GOPATH%\\bin;C:\\gometalinter-2.0.12-windows-amd64;%PATH%"
stack: go 1.13.4
@@ -18,24 +18,28 @@ build_script:
- go build ./cmd/runhcs
- go build ./cmd/tar2ext4
- go build ./cmd/wclayer
+ - go build ./cmd/device-util
- go build ./internal/tools/grantvmgroupaccess
- go build ./internal/tools/uvmboot
- go build ./internal/tools/zapdir
- go test -v ./... -tags admin
- - go test -c ./test/containerd-shim-runhcs-v1/ -tags functional
- - go test -c ./test/cri-containerd/ -tags functional
- - go test -c ./test/functional/ -tags functional
- - go test -c ./test/runhcs/ -tags functional
+ - cd test
+ - go test -v ./internal -tags admin
+ - go test -c ./containerd-shim-runhcs-v1/ -tags functional
+ - go test -c ./cri-containerd/ -tags functional
+ - go test -c ./functional/ -tags functional
+ - go test -c ./runhcs/ -tags functional
artifacts:
- path: 'containerd-shim-runhcs-v1.exe'
- path: 'runhcs.exe'
- path: 'tar2ext4.exe'
+ - path: 'device-util.exe'
- path: 'wclayer.exe'
- path: 'grantvmgroupaccess.exe'
- path: 'uvmboot.exe'
- path: 'zapdir.exe'
- - path: 'containerd-shim-runhcs-v1.test.exe'
- - path: 'cri-containerd.test.exe'
- - path: 'functional.test.exe'
- - path: 'runhcs.test.exe'
\ No newline at end of file
+ - path: './test/containerd-shim-runhcs-v1.test.exe'
+ - path: './test/cri-containerd.test.exe'
+ - path: './test/functional.test.exe'
+ - path: './test/runhcs.test.exe'
diff --git a/vendor/github.com/Microsoft/hcsshim/computestorage/attach.go b/vendor/github.com/Microsoft/hcsshim/computestorage/attach.go
new file mode 100644
index 000000000..56901d926
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/computestorage/attach.go
@@ -0,0 +1,38 @@
+package computestorage
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+
+ "github.com/Microsoft/hcsshim/internal/oc"
+ "go.opencensus.io/trace"
+)
+
+// AttachLayerStorageFilter sets up the layer storage filter on a writable
+// container layer.
+//
+// `layerPath` is a path to a directory the writable layer is mounted. If the
+// path does not end in a `\` the platform will append it automatically.
+//
+// `layerData` is the parent read-only layer data.
+func AttachLayerStorageFilter(ctx context.Context, layerPath string, layerData LayerData) (err error) {
+ title := "hcsshim.AttachLayerStorageFilter"
+ ctx, span := trace.StartSpan(ctx, title)
+ defer span.End()
+ defer func() { oc.SetSpanStatus(span, err) }()
+ span.AddAttributes(
+ trace.StringAttribute("layerPath", layerPath),
+ )
+
+ bytes, err := json.Marshal(layerData)
+ if err != nil {
+ return err
+ }
+
+ err = hcsAttachLayerStorageFilter(layerPath, string(bytes))
+ if err != nil {
+ return fmt.Errorf("failed to attach layer storage filter: %s", err)
+ }
+ return nil
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/computestorage/destroy.go b/vendor/github.com/Microsoft/hcsshim/computestorage/destroy.go
new file mode 100644
index 000000000..ecf3b550d
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/computestorage/destroy.go
@@ -0,0 +1,26 @@
+package computestorage
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/Microsoft/hcsshim/internal/oc"
+ "go.opencensus.io/trace"
+)
+
+// DestroyLayer deletes a container layer.
+//
+// `layerPath` is a path to a directory containing the layer to export.
+func DestroyLayer(ctx context.Context, layerPath string) (err error) {
+ title := "hcsshim.DestroyLayer"
+ ctx, span := trace.StartSpan(ctx, title)
+ defer span.End()
+ defer func() { oc.SetSpanStatus(span, err) }()
+ span.AddAttributes(trace.StringAttribute("layerPath", layerPath))
+
+ err = hcsDestroyLayer(layerPath)
+ if err != nil {
+ return fmt.Errorf("failed to destroy layer: %s", err)
+ }
+ return nil
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/computestorage/detach.go b/vendor/github.com/Microsoft/hcsshim/computestorage/detach.go
new file mode 100644
index 000000000..2a4df4213
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/computestorage/detach.go
@@ -0,0 +1,26 @@
+package computestorage
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/Microsoft/hcsshim/internal/oc"
+ "go.opencensus.io/trace"
+)
+
+// DetachLayerStorageFilter detaches the layer storage filter on a writable container layer.
+//
+// `layerPath` is a path to a directory containing the layer to export.
+func DetachLayerStorageFilter(ctx context.Context, layerPath string) (err error) {
+ title := "hcsshim.DetachLayerStorageFilter"
+ ctx, span := trace.StartSpan(ctx, title)
+ defer span.End()
+ defer func() { oc.SetSpanStatus(span, err) }()
+ span.AddAttributes(trace.StringAttribute("layerPath", layerPath))
+
+ err = hcsDetachLayerStorageFilter(layerPath)
+ if err != nil {
+ return fmt.Errorf("failed to detach layer storage filter: %s", err)
+ }
+ return nil
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/computestorage/export.go b/vendor/github.com/Microsoft/hcsshim/computestorage/export.go
new file mode 100644
index 000000000..b1721ef25
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/computestorage/export.go
@@ -0,0 +1,46 @@
+package computestorage
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+
+ "github.com/Microsoft/hcsshim/internal/oc"
+ "go.opencensus.io/trace"
+)
+
+// ExportLayer exports a container layer.
+//
+// `layerPath` is a path to a directory containing the layer to export.
+//
+// `exportFolderPath` is a pre-existing folder to export the layer to.
+//
+// `layerData` is the parent layer data.
+//
+// `options` are the export options applied to the exported layer.
+func ExportLayer(ctx context.Context, layerPath, exportFolderPath string, layerData LayerData, options ExportLayerOptions) (err error) {
+ title := "hcsshim.ExportLayer"
+ ctx, span := trace.StartSpan(ctx, title)
+ defer span.End()
+ defer func() { oc.SetSpanStatus(span, err) }()
+ span.AddAttributes(
+ trace.StringAttribute("layerPath", layerPath),
+ trace.StringAttribute("exportFolderPath", exportFolderPath),
+ )
+
+ ldbytes, err := json.Marshal(layerData)
+ if err != nil {
+ return err
+ }
+
+ obytes, err := json.Marshal(options)
+ if err != nil {
+ return err
+ }
+
+ err = hcsExportLayer(layerPath, exportFolderPath, string(ldbytes), string(obytes))
+ if err != nil {
+ return fmt.Errorf("failed to export layer: %s", err)
+ }
+ return nil
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/computestorage/format.go b/vendor/github.com/Microsoft/hcsshim/computestorage/format.go
new file mode 100644
index 000000000..2952c8a66
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/computestorage/format.go
@@ -0,0 +1,26 @@
+package computestorage
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/Microsoft/hcsshim/internal/oc"
+ "go.opencensus.io/trace"
+ "golang.org/x/sys/windows"
+)
+
+// FormatWritableLayerVhd formats a virtual disk for use as a writable container layer.
+//
+// If the VHD is not mounted it will be temporarily mounted.
+func FormatWritableLayerVhd(ctx context.Context, vhdHandle windows.Handle) (err error) {
+ title := "hcsshim.FormatWritableLayerVhd"
+ ctx, span := trace.StartSpan(ctx, title)
+ defer span.End()
+ defer func() { oc.SetSpanStatus(span, err) }()
+
+ err = hcsFormatWritableLayerVhd(vhdHandle)
+ if err != nil {
+ return fmt.Errorf("failed to format writable layer vhd: %s", err)
+ }
+ return nil
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/computestorage/helpers.go b/vendor/github.com/Microsoft/hcsshim/computestorage/helpers.go
new file mode 100644
index 000000000..d31efd660
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/computestorage/helpers.go
@@ -0,0 +1,197 @@
+package computestorage
+
+import (
+ "context"
+ "os"
+ "path/filepath"
+ "syscall"
+
+ "github.com/Microsoft/go-winio/pkg/security"
+ "github.com/Microsoft/go-winio/vhd"
+ "github.com/pkg/errors"
+ "golang.org/x/sys/windows"
+)
+
+const defaultVHDXBlockSizeInMB = 1
+
+// SetupContainerBaseLayer is a helper to setup a containers scratch. It
+// will create and format the vhdx's inside and the size is configurable with the sizeInGB
+// parameter.
+//
+// `layerPath` is the path to the base container layer on disk.
+//
+// `baseVhdPath` is the path to where the base vhdx for the base layer should be created.
+//
+// `diffVhdPath` is the path where the differencing disk for the base layer should be created.
+//
+// `sizeInGB` is the size in gigabytes to make the base vhdx.
+func SetupContainerBaseLayer(ctx context.Context, layerPath, baseVhdPath, diffVhdPath string, sizeInGB uint64) (err error) {
+ var (
+ hivesPath = filepath.Join(layerPath, "Hives")
+ layoutPath = filepath.Join(layerPath, "Layout")
+ )
+
+ // We need to remove the hives directory and layout file as `SetupBaseOSLayer` fails if these files
+ // already exist. `SetupBaseOSLayer` will create these files internally. We also remove the base and
+ // differencing disks if they exist in case we're asking for a different size.
+ if _, err := os.Stat(hivesPath); err == nil {
+ if err := os.RemoveAll(hivesPath); err != nil {
+ return errors.Wrap(err, "failed to remove prexisting hives directory")
+ }
+ }
+ if _, err := os.Stat(layoutPath); err == nil {
+ if err := os.RemoveAll(layoutPath); err != nil {
+ return errors.Wrap(err, "failed to remove prexisting layout file")
+ }
+ }
+
+ if _, err := os.Stat(baseVhdPath); err == nil {
+ if err := os.RemoveAll(baseVhdPath); err != nil {
+ return errors.Wrap(err, "failed to remove base vhdx path")
+ }
+ }
+ if _, err := os.Stat(diffVhdPath); err == nil {
+ if err := os.RemoveAll(diffVhdPath); err != nil {
+ return errors.Wrap(err, "failed to remove differencing vhdx")
+ }
+ }
+
+ createParams := &vhd.CreateVirtualDiskParameters{
+ Version: 2,
+ Version2: vhd.CreateVersion2{
+ MaximumSize: sizeInGB * 1024 * 1024 * 1024,
+ BlockSizeInBytes: defaultVHDXBlockSizeInMB * 1024 * 1024,
+ },
+ }
+ handle, err := vhd.CreateVirtualDisk(baseVhdPath, vhd.VirtualDiskAccessNone, vhd.CreateVirtualDiskFlagNone, createParams)
+ if err != nil {
+ return errors.Wrap(err, "failed to create vhdx")
+ }
+
+ defer func() {
+ if err != nil {
+ syscall.CloseHandle(handle)
+ os.RemoveAll(baseVhdPath)
+ if os.Stat(diffVhdPath); err == nil {
+ os.RemoveAll(diffVhdPath)
+ }
+ }
+ }()
+
+ if err = FormatWritableLayerVhd(ctx, windows.Handle(handle)); err != nil {
+ return err
+ }
+ // Base vhd handle must be closed before calling SetupBaseLayer in case of Container layer
+ if err = syscall.CloseHandle(handle); err != nil {
+ return errors.Wrap(err, "failed to close vhdx handle")
+ }
+
+ options := OsLayerOptions{
+ Type: OsLayerTypeContainer,
+ }
+
+ // SetupBaseOSLayer expects an empty vhd handle for a container layer and will
+ // error out otherwise.
+ if err = SetupBaseOSLayer(ctx, layerPath, 0, options); err != nil {
+ return err
+ }
+ // Create the differencing disk that will be what's copied for the final rw layer
+ // for a container.
+ if err = vhd.CreateDiffVhd(diffVhdPath, baseVhdPath, defaultVHDXBlockSizeInMB); err != nil {
+ return errors.Wrap(err, "failed to create differencing disk")
+ }
+
+ if err = security.GrantVmGroupAccess(baseVhdPath); err != nil {
+ return errors.Wrapf(err, "failed to grant vm group access to %s", baseVhdPath)
+ }
+ if err = security.GrantVmGroupAccess(diffVhdPath); err != nil {
+ return errors.Wrapf(err, "failed to grant vm group access to %s", diffVhdPath)
+ }
+ return nil
+}
+
+// SetupUtilityVMBaseLayer is a helper to setup a UVMs scratch space. It will create and format
+// the vhdx inside and the size is configurable by the sizeInGB parameter.
+//
+// `uvmPath` is the path to the UtilityVM filesystem.
+//
+// `baseVhdPath` is the path to where the base vhdx for the UVM should be created.
+//
+// `diffVhdPath` is the path where the differencing disk for the UVM should be created.
+//
+// `sizeInGB` specifies the size in gigabytes to make the base vhdx.
+func SetupUtilityVMBaseLayer(ctx context.Context, uvmPath, baseVhdPath, diffVhdPath string, sizeInGB uint64) (err error) {
+ // Remove the base and differencing disks if they exist in case we're asking for a different size.
+ if _, err := os.Stat(baseVhdPath); err == nil {
+ if err := os.RemoveAll(baseVhdPath); err != nil {
+ return errors.Wrap(err, "failed to remove base vhdx")
+ }
+ }
+ if _, err := os.Stat(diffVhdPath); err == nil {
+ if err := os.RemoveAll(diffVhdPath); err != nil {
+ return errors.Wrap(err, "failed to remove differencing vhdx")
+ }
+ }
+
+ // Just create the vhdx for utilityVM layer, no need to format it.
+ createParams := &vhd.CreateVirtualDiskParameters{
+ Version: 2,
+ Version2: vhd.CreateVersion2{
+ MaximumSize: sizeInGB * 1024 * 1024 * 1024,
+ BlockSizeInBytes: defaultVHDXBlockSizeInMB * 1024 * 1024,
+ },
+ }
+ handle, err := vhd.CreateVirtualDisk(baseVhdPath, vhd.VirtualDiskAccessNone, vhd.CreateVirtualDiskFlagNone, createParams)
+ if err != nil {
+ return errors.Wrap(err, "failed to create vhdx")
+ }
+
+ defer func() {
+ if err != nil {
+ syscall.CloseHandle(handle)
+ os.RemoveAll(baseVhdPath)
+ if os.Stat(diffVhdPath); err == nil {
+ os.RemoveAll(diffVhdPath)
+ }
+ }
+ }()
+
+ // If it is a UtilityVM layer then the base vhdx must be attached when calling
+ // `SetupBaseOSLayer`
+ attachParams := &vhd.AttachVirtualDiskParameters{
+ Version: 2,
+ }
+ if err := vhd.AttachVirtualDisk(handle, vhd.AttachVirtualDiskFlagNone, attachParams); err != nil {
+ return errors.Wrapf(err, "failed to attach virtual disk")
+ }
+
+ options := OsLayerOptions{
+ Type: OsLayerTypeVM,
+ }
+ if err := SetupBaseOSLayer(ctx, uvmPath, windows.Handle(handle), options); err != nil {
+ return err
+ }
+
+ // Detach and close the handle after setting up the layer as we don't need the handle
+ // for anything else and we no longer need to be attached either.
+ if err = vhd.DetachVirtualDisk(handle); err != nil {
+ return errors.Wrap(err, "failed to detach vhdx")
+ }
+ if err = syscall.CloseHandle(handle); err != nil {
+ return errors.Wrap(err, "failed to close vhdx handle")
+ }
+
+ // Create the differencing disk that will be what's copied for the final rw layer
+ // for a container.
+ if err = vhd.CreateDiffVhd(diffVhdPath, baseVhdPath, defaultVHDXBlockSizeInMB); err != nil {
+ return errors.Wrap(err, "failed to create differencing disk")
+ }
+
+ if err := security.GrantVmGroupAccess(baseVhdPath); err != nil {
+ return errors.Wrapf(err, "failed to grant vm group access to %s", baseVhdPath)
+ }
+ if err := security.GrantVmGroupAccess(diffVhdPath); err != nil {
+ return errors.Wrapf(err, "failed to grant vm group access to %s", diffVhdPath)
+ }
+ return nil
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/computestorage/import.go b/vendor/github.com/Microsoft/hcsshim/computestorage/import.go
new file mode 100644
index 000000000..06e329794
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/computestorage/import.go
@@ -0,0 +1,41 @@
+package computestorage
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+
+ "github.com/Microsoft/hcsshim/internal/oc"
+ "go.opencensus.io/trace"
+)
+
+// ImportLayer imports a container layer.
+//
+// `layerPath` is a path to a directory to import the layer to. If the directory
+// does not exist it will be automatically created.
+//
+// `sourceFolderpath` is a pre-existing folder that contains the layer to
+// import.
+//
+// `layerData` is the parent layer data.
+func ImportLayer(ctx context.Context, layerPath, sourceFolderPath string, layerData LayerData) (err error) {
+ title := "hcsshim.ImportLayer"
+ ctx, span := trace.StartSpan(ctx, title)
+ defer span.End()
+ defer func() { oc.SetSpanStatus(span, err) }()
+ span.AddAttributes(
+ trace.StringAttribute("layerPath", layerPath),
+ trace.StringAttribute("sourceFolderPath", sourceFolderPath),
+ )
+
+ bytes, err := json.Marshal(layerData)
+ if err != nil {
+ return err
+ }
+
+ err = hcsImportLayer(layerPath, sourceFolderPath, string(bytes))
+ if err != nil {
+ return fmt.Errorf("failed to import layer: %s", err)
+ }
+ return nil
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/computestorage/initialize.go b/vendor/github.com/Microsoft/hcsshim/computestorage/initialize.go
new file mode 100644
index 000000000..2e4810c45
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/computestorage/initialize.go
@@ -0,0 +1,38 @@
+package computestorage
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+
+ "github.com/Microsoft/hcsshim/internal/oc"
+ "go.opencensus.io/trace"
+)
+
+// InitializeWritableLayer initializes a writable layer for a container.
+//
+// `layerPath` is a path to a directory the layer is mounted. If the
+// path does not end in a `\` the platform will append it automatically.
+//
+// `layerData` is the parent read-only layer data.
+func InitializeWritableLayer(ctx context.Context, layerPath string, layerData LayerData) (err error) {
+ title := "hcsshim.InitializeWritableLayer"
+ ctx, span := trace.StartSpan(ctx, title)
+ defer span.End()
+ defer func() { oc.SetSpanStatus(span, err) }()
+ span.AddAttributes(
+ trace.StringAttribute("layerPath", layerPath),
+ )
+
+ bytes, err := json.Marshal(layerData)
+ if err != nil {
+ return err
+ }
+
+ // Options are not used in the platform as of RS5
+ err = hcsInitializeWritableLayer(layerPath, string(bytes), "")
+ if err != nil {
+ return fmt.Errorf("failed to intitialize container layer: %s", err)
+ }
+ return nil
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/computestorage/mount.go b/vendor/github.com/Microsoft/hcsshim/computestorage/mount.go
new file mode 100644
index 000000000..40652b99e
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/computestorage/mount.go
@@ -0,0 +1,27 @@
+package computestorage
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/Microsoft/hcsshim/internal/interop"
+ "github.com/Microsoft/hcsshim/internal/oc"
+ "go.opencensus.io/trace"
+ "golang.org/x/sys/windows"
+)
+
+// GetLayerVhdMountPath returns the volume path for a virtual disk of a writable container layer.
+func GetLayerVhdMountPath(ctx context.Context, vhdHandle windows.Handle) (path string, err error) {
+ title := "hcsshim.GetLayerVhdMountPath"
+ ctx, span := trace.StartSpan(ctx, title)
+ defer span.End()
+ defer func() { oc.SetSpanStatus(span, err) }()
+
+ var mountPath *uint16
+ err = hcsGetLayerVhdMountPath(vhdHandle, &mountPath)
+ if err != nil {
+ return "", fmt.Errorf("failed to get vhd mount path: %s", err)
+ }
+ path = interop.ConvertAndFreeCoTaskMemString(mountPath)
+ return path, nil
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/computestorage/setup.go b/vendor/github.com/Microsoft/hcsshim/computestorage/setup.go
new file mode 100644
index 000000000..13ce0cd60
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/computestorage/setup.go
@@ -0,0 +1,75 @@
+package computestorage
+
+import (
+ "context"
+ "encoding/json"
+ "errors"
+ "fmt"
+
+ "github.com/Microsoft/hcsshim/internal/oc"
+ "github.com/Microsoft/hcsshim/osversion"
+ "go.opencensus.io/trace"
+ "golang.org/x/sys/windows"
+)
+
+// SetupBaseOSLayer sets up a layer that contains a base OS for a container.
+//
+// `layerPath` is a path to a directory containing the layer.
+//
+// `vhdHandle` is an empty file handle of `options.Type == OsLayerTypeContainer`
+// or else it is a file handle to the 'SystemTemplateBase.vhdx' if `options.Type
+// == OsLayerTypeVm`.
+//
+// `options` are the options applied while processing the layer.
+func SetupBaseOSLayer(ctx context.Context, layerPath string, vhdHandle windows.Handle, options OsLayerOptions) (err error) {
+ title := "hcsshim.SetupBaseOSLayer"
+ ctx, span := trace.StartSpan(ctx, title)
+ defer span.End()
+ defer func() { oc.SetSpanStatus(span, err) }()
+ span.AddAttributes(
+ trace.StringAttribute("layerPath", layerPath),
+ )
+
+ bytes, err := json.Marshal(options)
+ if err != nil {
+ return err
+ }
+
+ err = hcsSetupBaseOSLayer(layerPath, vhdHandle, string(bytes))
+ if err != nil {
+ return fmt.Errorf("failed to setup base OS layer: %s", err)
+ }
+ return nil
+}
+
+// SetupBaseOSVolume sets up a volume that contains a base OS for a container.
+//
+// `layerPath` is a path to a directory containing the layer.
+//
+// `volumePath` is the path to the volume to be used for setup.
+//
+// `options` are the options applied while processing the layer.
+func SetupBaseOSVolume(ctx context.Context, layerPath, volumePath string, options OsLayerOptions) (err error) {
+ if osversion.Get().Build < 19645 {
+ return errors.New("SetupBaseOSVolume is not present on builds older than 19645")
+ }
+ title := "hcsshim.SetupBaseOSVolume"
+ ctx, span := trace.StartSpan(ctx, title)
+ defer span.End()
+ defer func() { oc.SetSpanStatus(span, err) }()
+ span.AddAttributes(
+ trace.StringAttribute("layerPath", layerPath),
+ trace.StringAttribute("volumePath", volumePath),
+ )
+
+ bytes, err := json.Marshal(options)
+ if err != nil {
+ return err
+ }
+
+ err = hcsSetupBaseOSVolume(layerPath, volumePath, string(bytes))
+ if err != nil {
+ return fmt.Errorf("failed to setup base OS layer: %s", err)
+ }
+ return nil
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/computestorage/storage.go b/vendor/github.com/Microsoft/hcsshim/computestorage/storage.go
new file mode 100644
index 000000000..9cd283d4b
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/computestorage/storage.go
@@ -0,0 +1,50 @@
+// Package computestorage is a wrapper around the HCS storage APIs. These are new storage APIs introduced
+// separate from the original graphdriver calls intended to give more freedom around creating
+// and managing container layers and scratch spaces.
+package computestorage
+
+import (
+ hcsschema "github.com/Microsoft/hcsshim/internal/schema2"
+)
+
+//go:generate go run ../mksyscall_windows.go -output zsyscall_windows.go storage.go
+
+//sys hcsImportLayer(layerPath string, sourceFolderPath string, layerData string) (hr error) = computestorage.HcsImportLayer?
+//sys hcsExportLayer(layerPath string, exportFolderPath string, layerData string, options string) (hr error) = computestorage.HcsExportLayer?
+//sys hcsDestroyLayer(layerPath string) (hr error) = computestorage.HcsDestoryLayer?
+//sys hcsSetupBaseOSLayer(layerPath string, handle windows.Handle, options string) (hr error) = computestorage.HcsSetupBaseOSLayer?
+//sys hcsInitializeWritableLayer(writableLayerPath string, layerData string, options string) (hr error) = computestorage.HcsInitializeWritableLayer?
+//sys hcsAttachLayerStorageFilter(layerPath string, layerData string) (hr error) = computestorage.HcsAttachLayerStorageFilter?
+//sys hcsDetachLayerStorageFilter(layerPath string) (hr error) = computestorage.HcsDetachLayerStorageFilter?
+//sys hcsFormatWritableLayerVhd(handle windows.Handle) (hr error) = computestorage.HcsFormatWritableLayerVhd?
+//sys hcsGetLayerVhdMountPath(vhdHandle windows.Handle, mountPath **uint16) (hr error) = computestorage.HcsGetLayerVhdMountPath?
+//sys hcsSetupBaseOSVolume(layerPath string, volumePath string, options string) (hr error) = computestorage.HcsSetupBaseOSVolume?
+
+// LayerData is the data used to describe parent layer information.
+type LayerData struct {
+ SchemaVersion hcsschema.Version `json:"SchemaVersion,omitempty"`
+ Layers []hcsschema.Layer `json:"Layers,omitempty"`
+}
+
+// ExportLayerOptions are the set of options that are used with the `computestorage.HcsExportLayer` syscall.
+type ExportLayerOptions struct {
+ IsWritableLayer bool `json:"IsWritableLayer,omitempty"`
+}
+
+// OsLayerType is the type of layer being operated on.
+type OsLayerType string
+
+const (
+ // OsLayerTypeContainer is a container layer.
+ OsLayerTypeContainer OsLayerType = "Container"
+ // OsLayerTypeVM is a virtual machine layer.
+ OsLayerTypeVM OsLayerType = "Vm"
+)
+
+// OsLayerOptions are the set of options that are used with the `SetupBaseOSLayer` and
+// `SetupBaseOSVolume` calls.
+type OsLayerOptions struct {
+ Type OsLayerType `json:"Type,omitempty"`
+ DisableCiCacheOptimization bool `json:"DisableCiCacheOptimization,omitempty"`
+ SkipUpdateBcdForBoot bool `json:"SkipUpdateBcdForBoot,omitempty"`
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/computestorage/zsyscall_windows.go b/vendor/github.com/Microsoft/hcsshim/computestorage/zsyscall_windows.go
new file mode 100644
index 000000000..4f9518067
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/computestorage/zsyscall_windows.go
@@ -0,0 +1,319 @@
+// Code generated mksyscall_windows.exe DO NOT EDIT
+
+package computestorage
+
+import (
+ "syscall"
+ "unsafe"
+
+ "golang.org/x/sys/windows"
+)
+
+var _ unsafe.Pointer
+
+// Do the interface allocations only once for common
+// Errno values.
+const (
+ errnoERROR_IO_PENDING = 997
+)
+
+var (
+ errERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING)
+)
+
+// errnoErr returns common boxed Errno values, to prevent
+// allocations at runtime.
+func errnoErr(e syscall.Errno) error {
+ switch e {
+ case 0:
+ return nil
+ case errnoERROR_IO_PENDING:
+ return errERROR_IO_PENDING
+ }
+ // TODO: add more here, after collecting data on the common
+ // error values see on Windows. (perhaps when running
+ // all.bat?)
+ return e
+}
+
+var (
+ modcomputestorage = windows.NewLazySystemDLL("computestorage.dll")
+
+ procHcsImportLayer = modcomputestorage.NewProc("HcsImportLayer")
+ procHcsExportLayer = modcomputestorage.NewProc("HcsExportLayer")
+ procHcsDestoryLayer = modcomputestorage.NewProc("HcsDestoryLayer")
+ procHcsSetupBaseOSLayer = modcomputestorage.NewProc("HcsSetupBaseOSLayer")
+ procHcsInitializeWritableLayer = modcomputestorage.NewProc("HcsInitializeWritableLayer")
+ procHcsAttachLayerStorageFilter = modcomputestorage.NewProc("HcsAttachLayerStorageFilter")
+ procHcsDetachLayerStorageFilter = modcomputestorage.NewProc("HcsDetachLayerStorageFilter")
+ procHcsFormatWritableLayerVhd = modcomputestorage.NewProc("HcsFormatWritableLayerVhd")
+ procHcsGetLayerVhdMountPath = modcomputestorage.NewProc("HcsGetLayerVhdMountPath")
+ procHcsSetupBaseOSVolume = modcomputestorage.NewProc("HcsSetupBaseOSVolume")
+)
+
+func hcsImportLayer(layerPath string, sourceFolderPath string, layerData string) (hr error) {
+ var _p0 *uint16
+ _p0, hr = syscall.UTF16PtrFromString(layerPath)
+ if hr != nil {
+ return
+ }
+ var _p1 *uint16
+ _p1, hr = syscall.UTF16PtrFromString(sourceFolderPath)
+ if hr != nil {
+ return
+ }
+ var _p2 *uint16
+ _p2, hr = syscall.UTF16PtrFromString(layerData)
+ if hr != nil {
+ return
+ }
+ return _hcsImportLayer(_p0, _p1, _p2)
+}
+
+func _hcsImportLayer(layerPath *uint16, sourceFolderPath *uint16, layerData *uint16) (hr error) {
+ if hr = procHcsImportLayer.Find(); hr != nil {
+ return
+ }
+ r0, _, _ := syscall.Syscall(procHcsImportLayer.Addr(), 3, uintptr(unsafe.Pointer(layerPath)), uintptr(unsafe.Pointer(sourceFolderPath)), uintptr(unsafe.Pointer(layerData)))
+ if int32(r0) < 0 {
+ if r0&0x1fff0000 == 0x00070000 {
+ r0 &= 0xffff
+ }
+ hr = syscall.Errno(r0)
+ }
+ return
+}
+
+func hcsExportLayer(layerPath string, exportFolderPath string, layerData string, options string) (hr error) {
+ var _p0 *uint16
+ _p0, hr = syscall.UTF16PtrFromString(layerPath)
+ if hr != nil {
+ return
+ }
+ var _p1 *uint16
+ _p1, hr = syscall.UTF16PtrFromString(exportFolderPath)
+ if hr != nil {
+ return
+ }
+ var _p2 *uint16
+ _p2, hr = syscall.UTF16PtrFromString(layerData)
+ if hr != nil {
+ return
+ }
+ var _p3 *uint16
+ _p3, hr = syscall.UTF16PtrFromString(options)
+ if hr != nil {
+ return
+ }
+ return _hcsExportLayer(_p0, _p1, _p2, _p3)
+}
+
+func _hcsExportLayer(layerPath *uint16, exportFolderPath *uint16, layerData *uint16, options *uint16) (hr error) {
+ if hr = procHcsExportLayer.Find(); hr != nil {
+ return
+ }
+ r0, _, _ := syscall.Syscall6(procHcsExportLayer.Addr(), 4, uintptr(unsafe.Pointer(layerPath)), uintptr(unsafe.Pointer(exportFolderPath)), uintptr(unsafe.Pointer(layerData)), uintptr(unsafe.Pointer(options)), 0, 0)
+ if int32(r0) < 0 {
+ if r0&0x1fff0000 == 0x00070000 {
+ r0 &= 0xffff
+ }
+ hr = syscall.Errno(r0)
+ }
+ return
+}
+
+func hcsDestroyLayer(layerPath string) (hr error) {
+ var _p0 *uint16
+ _p0, hr = syscall.UTF16PtrFromString(layerPath)
+ if hr != nil {
+ return
+ }
+ return _hcsDestroyLayer(_p0)
+}
+
+func _hcsDestroyLayer(layerPath *uint16) (hr error) {
+ if hr = procHcsDestoryLayer.Find(); hr != nil {
+ return
+ }
+ r0, _, _ := syscall.Syscall(procHcsDestoryLayer.Addr(), 1, uintptr(unsafe.Pointer(layerPath)), 0, 0)
+ if int32(r0) < 0 {
+ if r0&0x1fff0000 == 0x00070000 {
+ r0 &= 0xffff
+ }
+ hr = syscall.Errno(r0)
+ }
+ return
+}
+
+func hcsSetupBaseOSLayer(layerPath string, handle windows.Handle, options string) (hr error) {
+ var _p0 *uint16
+ _p0, hr = syscall.UTF16PtrFromString(layerPath)
+ if hr != nil {
+ return
+ }
+ var _p1 *uint16
+ _p1, hr = syscall.UTF16PtrFromString(options)
+ if hr != nil {
+ return
+ }
+ return _hcsSetupBaseOSLayer(_p0, handle, _p1)
+}
+
+func _hcsSetupBaseOSLayer(layerPath *uint16, handle windows.Handle, options *uint16) (hr error) {
+ if hr = procHcsSetupBaseOSLayer.Find(); hr != nil {
+ return
+ }
+ r0, _, _ := syscall.Syscall(procHcsSetupBaseOSLayer.Addr(), 3, uintptr(unsafe.Pointer(layerPath)), uintptr(handle), uintptr(unsafe.Pointer(options)))
+ if int32(r0) < 0 {
+ if r0&0x1fff0000 == 0x00070000 {
+ r0 &= 0xffff
+ }
+ hr = syscall.Errno(r0)
+ }
+ return
+}
+
+func hcsInitializeWritableLayer(writableLayerPath string, layerData string, options string) (hr error) {
+ var _p0 *uint16
+ _p0, hr = syscall.UTF16PtrFromString(writableLayerPath)
+ if hr != nil {
+ return
+ }
+ var _p1 *uint16
+ _p1, hr = syscall.UTF16PtrFromString(layerData)
+ if hr != nil {
+ return
+ }
+ var _p2 *uint16
+ _p2, hr = syscall.UTF16PtrFromString(options)
+ if hr != nil {
+ return
+ }
+ return _hcsInitializeWritableLayer(_p0, _p1, _p2)
+}
+
+func _hcsInitializeWritableLayer(writableLayerPath *uint16, layerData *uint16, options *uint16) (hr error) {
+ if hr = procHcsInitializeWritableLayer.Find(); hr != nil {
+ return
+ }
+ r0, _, _ := syscall.Syscall(procHcsInitializeWritableLayer.Addr(), 3, uintptr(unsafe.Pointer(writableLayerPath)), uintptr(unsafe.Pointer(layerData)), uintptr(unsafe.Pointer(options)))
+ if int32(r0) < 0 {
+ if r0&0x1fff0000 == 0x00070000 {
+ r0 &= 0xffff
+ }
+ hr = syscall.Errno(r0)
+ }
+ return
+}
+
+func hcsAttachLayerStorageFilter(layerPath string, layerData string) (hr error) {
+ var _p0 *uint16
+ _p0, hr = syscall.UTF16PtrFromString(layerPath)
+ if hr != nil {
+ return
+ }
+ var _p1 *uint16
+ _p1, hr = syscall.UTF16PtrFromString(layerData)
+ if hr != nil {
+ return
+ }
+ return _hcsAttachLayerStorageFilter(_p0, _p1)
+}
+
+func _hcsAttachLayerStorageFilter(layerPath *uint16, layerData *uint16) (hr error) {
+ if hr = procHcsAttachLayerStorageFilter.Find(); hr != nil {
+ return
+ }
+ r0, _, _ := syscall.Syscall(procHcsAttachLayerStorageFilter.Addr(), 2, uintptr(unsafe.Pointer(layerPath)), uintptr(unsafe.Pointer(layerData)), 0)
+ if int32(r0) < 0 {
+ if r0&0x1fff0000 == 0x00070000 {
+ r0 &= 0xffff
+ }
+ hr = syscall.Errno(r0)
+ }
+ return
+}
+
+func hcsDetachLayerStorageFilter(layerPath string) (hr error) {
+ var _p0 *uint16
+ _p0, hr = syscall.UTF16PtrFromString(layerPath)
+ if hr != nil {
+ return
+ }
+ return _hcsDetachLayerStorageFilter(_p0)
+}
+
+func _hcsDetachLayerStorageFilter(layerPath *uint16) (hr error) {
+ if hr = procHcsDetachLayerStorageFilter.Find(); hr != nil {
+ return
+ }
+ r0, _, _ := syscall.Syscall(procHcsDetachLayerStorageFilter.Addr(), 1, uintptr(unsafe.Pointer(layerPath)), 0, 0)
+ if int32(r0) < 0 {
+ if r0&0x1fff0000 == 0x00070000 {
+ r0 &= 0xffff
+ }
+ hr = syscall.Errno(r0)
+ }
+ return
+}
+
+func hcsFormatWritableLayerVhd(handle windows.Handle) (hr error) {
+ if hr = procHcsFormatWritableLayerVhd.Find(); hr != nil {
+ return
+ }
+ r0, _, _ := syscall.Syscall(procHcsFormatWritableLayerVhd.Addr(), 1, uintptr(handle), 0, 0)
+ if int32(r0) < 0 {
+ if r0&0x1fff0000 == 0x00070000 {
+ r0 &= 0xffff
+ }
+ hr = syscall.Errno(r0)
+ }
+ return
+}
+
+func hcsGetLayerVhdMountPath(vhdHandle windows.Handle, mountPath **uint16) (hr error) {
+ if hr = procHcsGetLayerVhdMountPath.Find(); hr != nil {
+ return
+ }
+ r0, _, _ := syscall.Syscall(procHcsGetLayerVhdMountPath.Addr(), 2, uintptr(vhdHandle), uintptr(unsafe.Pointer(mountPath)), 0)
+ if int32(r0) < 0 {
+ if r0&0x1fff0000 == 0x00070000 {
+ r0 &= 0xffff
+ }
+ hr = syscall.Errno(r0)
+ }
+ return
+}
+
+func hcsSetupBaseOSVolume(layerPath string, volumePath string, options string) (hr error) {
+ var _p0 *uint16
+ _p0, hr = syscall.UTF16PtrFromString(layerPath)
+ if hr != nil {
+ return
+ }
+ var _p1 *uint16
+ _p1, hr = syscall.UTF16PtrFromString(volumePath)
+ if hr != nil {
+ return
+ }
+ var _p2 *uint16
+ _p2, hr = syscall.UTF16PtrFromString(options)
+ if hr != nil {
+ return
+ }
+ return _hcsSetupBaseOSVolume(_p0, _p1, _p2)
+}
+
+func _hcsSetupBaseOSVolume(layerPath *uint16, volumePath *uint16, options *uint16) (hr error) {
+ if hr = procHcsSetupBaseOSVolume.Find(); hr != nil {
+ return
+ }
+ r0, _, _ := syscall.Syscall(procHcsSetupBaseOSVolume.Addr(), 3, uintptr(unsafe.Pointer(layerPath)), uintptr(unsafe.Pointer(volumePath)), uintptr(unsafe.Pointer(options)))
+ if int32(r0) < 0 {
+ if r0&0x1fff0000 == 0x00070000 {
+ r0 &= 0xffff
+ }
+ hr = syscall.Errno(r0)
+ }
+ return
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/go.mod b/vendor/github.com/Microsoft/hcsshim/go.mod
deleted file mode 100644
index 72d253dad..000000000
--- a/vendor/github.com/Microsoft/hcsshim/go.mod
+++ /dev/null
@@ -1,37 +0,0 @@
-module github.com/Microsoft/hcsshim
-
-go 1.13
-
-require (
- github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5
- github.com/blang/semver v3.1.0+incompatible // indirect
- github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f
- github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1
- github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69
- github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc // indirect
- github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448 // indirect
- github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3
- github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de
- github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd
- github.com/gogo/protobuf v1.2.1
- github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce // indirect
- github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874 // indirect
- github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2 // indirect
- github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f // indirect
- github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700
- github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39
- github.com/pkg/errors v0.8.1
- github.com/prometheus/procfs v0.0.5 // indirect
- github.com/sirupsen/logrus v1.4.1
- github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8 // indirect
- github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5
- github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
- github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
- github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f // indirect
- go.opencensus.io v0.22.0
- golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6
- golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3
- google.golang.org/grpc v1.20.1
- gotest.tools v2.2.0+incompatible // indirect
- k8s.io/kubernetes v1.13.0
-)
diff --git a/vendor/github.com/Microsoft/hcsshim/go.sum b/vendor/github.com/Microsoft/hcsshim/go.sum
deleted file mode 100644
index 578b78e81..000000000
--- a/vendor/github.com/Microsoft/hcsshim/go.sum
+++ /dev/null
@@ -1,131 +0,0 @@
-cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
-github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
-github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5 h1:ygIc8M6trr62pF5DucadTWGdEB4mEyvzi0e2nbcmcyA=
-github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw=
-github.com/blang/semver v3.1.0+incompatible h1:7hqmJYuaEK3qwVjWubYiht3j93YI0WQBuysxHIfUriU=
-github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
-github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
-github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f h1:tSNMc+rJDfmYntojat8lljbt1mgKNpTxUZJsSzJ9Y1s=
-github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko=
-github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1 h1:uict5mhHFTzKLUCufdSLym7z/J0CbBJT59lYbP9wtbg=
-github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw=
-github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69 h1:rG1clvJbgsUcmb50J82YUJhUMopWNtZvyMZjb+4fqGw=
-github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
-github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc h1:TP+534wVlf61smEIq1nwLLAjQVEK2EADoW3CX9AuT+8=
-github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y=
-github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448 h1:PUD50EuOMkXVcpBIA/R95d56duJR9VxhwncsFbNnxW4=
-github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI=
-github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3 h1:esQOJREg8nw8aXj6uCN5dfW5cKUBiEJ/+nni1Q/D/sw=
-github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0=
-github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de h1:dlfGmNcE3jDAecLqwKPMNX6nk2qh1c1Vg1/YTzpOOF4=
-github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o=
-github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd h1:JNn81o/xG+8NEo3bC/vx9pbi/g2WI8mtP2/nXzu297Y=
-github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc=
-github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8=
-github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
-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/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw=
-github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
-github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e h1:BWhy2j3IXJhjCbC68FptL43tDKIq8FladmaTs3Xs7Z8=
-github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4=
-github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE=
-github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
-github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
-github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
-github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
-github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
-github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg=
-github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY=
-github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
-github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce h1:prjrVgOk2Yg6w+PflHoszQNLTUh4kaByUcEWM/9uin4=
-github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
-github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874 h1:cAv7ZbSmyb1wjn6T4TIiyFCkpcfgpbcNNC3bM2srLaI=
-github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I=
-github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU=
-github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
-github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
-github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
-github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
-github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
-github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2 h1:QhPf3A2AZW3tTGvHPg0TA+CR3oHbVLlXUhlghqISp1I=
-github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
-github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f h1:a969LJ4IQFwRHYqonHtUDMSh9i54WcKggeEkQ3fZMl4=
-github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
-github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700 h1:eNUVfm/RFLIi1G7flU5/ZRTHvd4kcVuzfRnL6OFlzCI=
-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 h1:H7DMc6FAjgwZZi8BRqjrAAHWoqEr5e5L6pS4V0ezet4=
-github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs=
-github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
-github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
-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/prometheus/procfs v0.0.5 h1:3+auTFlqw+ZaQYJARz6ArODtkaIwtvBTx3N2NehQlL8=
-github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ=
-github.com/sirupsen/logrus v1.4.1 h1:GL2rEmy6nsikmW0r8opw9JIRScdMF5hA8cOYLH7In1k=
-github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
-github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
-github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
-github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8 h1:zLV6q4e8Jv9EHjNg/iHfzwDkCve6Ua5jCygptrtXHvI=
-github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
-github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5 h1:MCfT24H3f//U5+UCrZp1/riVO3B50BovxtDiNn0XKkk=
-github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
-github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c=
-github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
-github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0=
-github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
-github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f h1:mvXjJIHRZyhNuGassLTcXTwjiWq7NmjdavZsUnmFybQ=
-github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs=
-go.opencensus.io v0.22.0 h1:C9hSCOW830chIVkdja34wa6Ky+IzWllkUinR+BtRZd4=
-go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
-golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
-golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
-golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
-golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
-golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628=
-golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09 h1:KaQtG+aDELoNmXYas3TVkGNYRuq8JQ1aa7LJt8EXVyo=
-golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
-golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6 h1:bjcUS9ztw9kFmmIxJInhon/0Is3p+EHBKNgquIzo1OI=
-golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/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-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3 h1:7TYNF4UdlohbFwpNH04CoPMp1cHUZgO1Ebq5r2hIjfo=
-golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/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.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
-golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
-golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
-golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
-google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
-google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
-google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8 h1:Nw54tB0rB7hY/N0NQvRW8DG4Yk3Q6T9cu9RcFQDu1tc=
-google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
-google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb h1:i1Ppqkc3WQXikh8bXiwHqAN5Rv3/qDCcRk0/Otx73BY=
-google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
-google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
-google.golang.org/grpc v1.20.1 h1:Hz2g2wirWK7H0qIIhGIqRGTuMwTE8HEKFnDZZ7lm9NU=
-google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
-gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo=
-gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
-honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
-k8s.io/kubernetes v1.13.0 h1:qTfB+u5M92k2fCCCVP2iuhgwwSOv1EkAkvQY1tQODD8=
-k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk=
diff --git a/vendor/github.com/Microsoft/hcsshim/hcn/hcn.go b/vendor/github.com/Microsoft/hcsshim/hcn/hcn.go
index 4b5df009a..54c258ed7 100644
--- a/vendor/github.com/Microsoft/hcsshim/hcn/hcn.go
+++ b/vendor/github.com/Microsoft/hcsshim/hcn/hcn.go
@@ -55,6 +55,15 @@ import (
//sys hcnDeleteLoadBalancer(id *_guid, result **uint16) (hr error) = computenetwork.HcnDeleteLoadBalancer?
//sys hcnCloseLoadBalancer(loadBalancer hcnLoadBalancer) (hr error) = computenetwork.HcnCloseLoadBalancer?
+// SDN Routes
+//sys hcnEnumerateRoutes(query string, routes **uint16, result **uint16) (hr error) = computenetwork.HcnEnumerateSdnRoutes?
+//sys hcnCreateRoute(id *_guid, settings string, route *hcnRoute, result **uint16) (hr error) = computenetwork.HcnCreateSdnRoute?
+//sys hcnOpenRoute(id *_guid, route *hcnRoute, result **uint16) (hr error) = computenetwork.HcnOpenSdnRoute?
+//sys hcnModifyRoute(route hcnRoute, settings string, result **uint16) (hr error) = computenetwork.HcnModifySdnRoute?
+//sys hcnQueryRouteProperties(route hcnRoute, query string, properties **uint16, result **uint16) (hr error) = computenetwork.HcnQuerySdnRouteProperties?
+//sys hcnDeleteRoute(id *_guid, result **uint16) (hr error) = computenetwork.HcnDeleteSdnRoute?
+//sys hcnCloseRoute(route hcnRoute) (hr error) = computenetwork.HcnCloseSdnRoute?
+
// Service
//sys hcnOpenService(service *hcnService, result **uint16) (hr error) = computenetwork.HcnOpenService?
//sys hcnRegisterServiceCallback(service hcnService, callback int32, context int32, callbackHandle *hcnCallbackHandle) (hr error) = computenetwork.HcnRegisterServiceCallback?
@@ -67,6 +76,7 @@ type hcnNetwork syscall.Handle
type hcnEndpoint syscall.Handle
type hcnNamespace syscall.Handle
type hcnLoadBalancer syscall.Handle
+type hcnRoute syscall.Handle
type hcnService syscall.Handle
type hcnCallbackHandle syscall.Handle
@@ -188,6 +198,51 @@ func SessionAffinitySupported() error {
return platformDoesNotSupportError("Session Affinity")
}
+// IPv6DualStackSupported returns an error if the HCN version does not support IPv6DualStack.
+func IPv6DualStackSupported() error {
+ supported := GetSupportedFeatures()
+ if supported.IPv6DualStack {
+ return nil
+ }
+ return platformDoesNotSupportError("IPv6 DualStack")
+}
+
+//L4proxySupported returns an error if the HCN verison does not support L4Proxy
+func L4proxyPolicySupported() error {
+ supported := GetSupportedFeatures()
+ if supported.L4Proxy {
+ return nil
+ }
+ return platformDoesNotSupportError("L4ProxyPolicy")
+}
+
+// L4WfpProxySupported returns an error if the HCN verison does not support L4WfpProxy
+func L4WfpProxyPolicySupported() error {
+ supported := GetSupportedFeatures()
+ if supported.L4WfpProxy {
+ return nil
+ }
+ return platformDoesNotSupportError("L4WfpProxyPolicy")
+}
+
+// SetPolicySupported returns an error if the HCN version does not support SetPolicy.
+func SetPolicySupported() error {
+ supported := GetSupportedFeatures()
+ if supported.SetPolicy {
+ return nil
+ }
+ return platformDoesNotSupportError("SetPolicy")
+}
+
+// VxlanPortSupported returns an error if the HCN version does not support configuring the VXLAN TCP port.
+func VxlanPortSupported() error {
+ supported := GetSupportedFeatures()
+ if supported.VxlanPort {
+ return nil
+ }
+ return platformDoesNotSupportError("VXLAN port configuration")
+}
+
// RequestType are the different operations performed to settings.
// Used to update the settings of Endpoint/Namespace objects.
type RequestType string
diff --git a/vendor/github.com/Microsoft/hcsshim/hcn/hcnerrors.go b/vendor/github.com/Microsoft/hcsshim/hcn/hcnerrors.go
index dd029502e..ad30d320d 100644
--- a/vendor/github.com/Microsoft/hcsshim/hcn/hcnerrors.go
+++ b/vendor/github.com/Microsoft/hcsshim/hcn/hcnerrors.go
@@ -17,6 +17,7 @@ var (
errInvalidEndpointID = errors.New("invalid endpoint ID")
errInvalidNamespaceID = errors.New("invalid namespace ID")
errInvalidLoadBalancerID = errors.New("invalid load balancer ID")
+ errInvalidRouteID = errors.New("invalid route ID")
)
func checkForErrors(methodName string, hr error, resultBuffer *uint16) error {
@@ -35,7 +36,7 @@ func checkForErrors(methodName string, hr error, resultBuffer *uint16) error {
}
if errorFound {
- returnError := hcserror.New(hr, methodName, result)
+ returnError := new(hr, methodName, result)
logrus.Debugf(returnError.Error()) // HCN errors logged for debugging.
return returnError
}
@@ -43,6 +44,52 @@ func checkForErrors(methodName string, hr error, resultBuffer *uint16) error {
return nil
}
+type ErrorCode uint32
+
+// For common errors, define the error as it is in windows, so we can quickly determine it later
+const (
+ ERROR_NOT_FOUND = 0x490
+ HCN_E_PORT_ALREADY_EXISTS ErrorCode = 0x803b0013
+)
+
+type HcnError struct {
+ *hcserror.HcsError
+ code ErrorCode
+}
+
+func (e *HcnError) Error() string {
+ return e.HcsError.Error()
+}
+
+func CheckErrorWithCode(err error, code ErrorCode) bool {
+ hcnError, ok := err.(*HcnError)
+ if ok {
+ return hcnError.code == code
+ }
+ return false
+}
+
+func IsElementNotFoundError(err error) bool {
+ return CheckErrorWithCode(err, ERROR_NOT_FOUND)
+}
+
+func IsPortAlreadyExistsError(err error) bool {
+ return CheckErrorWithCode(err, HCN_E_PORT_ALREADY_EXISTS)
+}
+
+func new(hr error, title string, rest string) error {
+ err := &HcnError{}
+ hcsError := hcserror.New(hr, title, rest)
+ err.HcsError = hcsError.(*hcserror.HcsError)
+ err.code = ErrorCode(hcserror.Win32FromError(hr))
+ return err
+}
+
+//
+// Note that the below errors are not errors returned by hcn itself
+// we wish to seperate them as they are shim usage error
+//
+
// NetworkNotFoundError results from a failed seach for a network by Id or Name
type NetworkNotFoundError struct {
NetworkName string
@@ -50,10 +97,10 @@ type NetworkNotFoundError struct {
}
func (e NetworkNotFoundError) Error() string {
- if e.NetworkName == "" {
- return fmt.Sprintf("Network Name %s not found", e.NetworkName)
+ if e.NetworkName != "" {
+ return fmt.Sprintf("Network name %q not found", e.NetworkName)
}
- return fmt.Sprintf("Network Id %s not found", e.NetworkID)
+ return fmt.Sprintf("Network ID %q not found", e.NetworkID)
}
// EndpointNotFoundError results from a failed seach for an endpoint by Id or Name
@@ -63,10 +110,10 @@ type EndpointNotFoundError struct {
}
func (e EndpointNotFoundError) Error() string {
- if e.EndpointName == "" {
- return fmt.Sprintf("Endpoint Name %s not found", e.EndpointName)
+ if e.EndpointName != "" {
+ return fmt.Sprintf("Endpoint name %q not found", e.EndpointName)
}
- return fmt.Sprintf("Endpoint Id %s not found", e.EndpointID)
+ return fmt.Sprintf("Endpoint ID %q not found", e.EndpointID)
}
// NamespaceNotFoundError results from a failed seach for a namsepace by Id
@@ -75,7 +122,7 @@ type NamespaceNotFoundError struct {
}
func (e NamespaceNotFoundError) Error() string {
- return fmt.Sprintf("Namespace %s not found", e.NamespaceID)
+ return fmt.Sprintf("Namespace ID %q not found", e.NamespaceID)
}
// LoadBalancerNotFoundError results from a failed seach for a loadbalancer by Id
@@ -84,7 +131,16 @@ type LoadBalancerNotFoundError struct {
}
func (e LoadBalancerNotFoundError) Error() string {
- return fmt.Sprintf("LoadBalancer %s not found", e.LoadBalancerId)
+ return fmt.Sprintf("LoadBalancer %q not found", e.LoadBalancerId)
+}
+
+// RouteNotFoundError results from a failed seach for a route by Id
+type RouteNotFoundError struct {
+ RouteId string
+}
+
+func (e RouteNotFoundError) Error() string {
+ return fmt.Sprintf("SDN Route %q not found", e.RouteId)
}
// IsNotFoundError returns a boolean indicating whether the error was caused by
@@ -99,6 +155,8 @@ func IsNotFoundError(err error) bool {
return true
case LoadBalancerNotFoundError:
return true
+ case RouteNotFoundError:
+ return true
case *hcserror.HcsError:
return pe.Err == hcs.ErrElementNotFound
}
diff --git a/vendor/github.com/Microsoft/hcsshim/hcn/hcnglobals.go b/vendor/github.com/Microsoft/hcsshim/hcn/hcnglobals.go
index 5852ed918..a2195f57f 100644
--- a/vendor/github.com/Microsoft/hcsshim/hcn/hcnglobals.go
+++ b/vendor/github.com/Microsoft/hcsshim/hcn/hcnglobals.go
@@ -37,8 +37,11 @@ var (
RemoteSubnetVersion = VersionRanges{VersionRange{MinVersion: Version{Major: 9, Minor: 2}, MaxVersion: Version{Major: math.MaxInt32, Minor: math.MaxInt32}}}
// A Host Route policy allows for local container to local host communication Overlay networks
HostRouteVersion = VersionRanges{VersionRange{MinVersion: Version{Major: 9, Minor: 2}, MaxVersion: Version{Major: math.MaxInt32, Minor: math.MaxInt32}}}
- // HNS 10.2 allows for Direct Server Return for loadbalancing
- DSRVersion = VersionRanges{VersionRange{MinVersion: Version{Major: 10, Minor: 2}, MaxVersion: Version{Major: math.MaxInt32, Minor: math.MaxInt32}}}
+ // HNS 9.3 through 10.0 (not included), and 10.2+ allows for Direct Server Return for loadbalancing
+ DSRVersion = VersionRanges{
+ VersionRange{MinVersion: Version{Major: 9, Minor: 3}, MaxVersion: Version{Major: 9, Minor: math.MaxInt32}},
+ VersionRange{MinVersion: Version{Major: 10, Minor: 2}, MaxVersion: Version{Major: math.MaxInt32, Minor: math.MaxInt32}},
+ }
// HNS 9.3 through 10.0 (not included) and, 10.4+ provide support for configuring endpoints with /32 prefixes
Slash32EndpointPrefixesVersion = VersionRanges{
VersionRange{MinVersion: Version{Major: 9, Minor: 3}, MaxVersion: Version{Major: 9, Minor: math.MaxInt32}},
@@ -46,11 +49,31 @@ var (
}
// HNS 9.3 through 10.0 (not included) and, 10.4+ allow for HNS ACL Policies to support protocol 252 for VXLAN
AclSupportForProtocol252Version = VersionRanges{
- VersionRange{MinVersion: Version{Major: 9, Minor: 3}, MaxVersion: Version{Major: 9, Minor: math.MaxInt32}},
- VersionRange{MinVersion: Version{Major: 10, Minor: 4}, MaxVersion: Version{Major: math.MaxInt32, Minor: math.MaxInt32}},
+ VersionRange{MinVersion: Version{Major: 11, Minor: 0}, MaxVersion: Version{Major: math.MaxInt32, Minor: math.MaxInt32}},
}
- // HNS 11.10 allows for session affinity for loadbalancing
- SessionAffinityVersion = VersionRanges{VersionRange{MinVersion: Version{Major: 11, Minor: 10}, MaxVersion: Version{Major: math.MaxInt32, Minor: math.MaxInt32}}}
+ // HNS 12.0 allows for session affinity for loadbalancing
+ SessionAffinityVersion = VersionRanges{VersionRange{MinVersion: Version{Major: 12, Minor: 0}, MaxVersion: Version{Major: math.MaxInt32, Minor: math.MaxInt32}}}
+ // HNS 10.5 through 11 (not included) and 12.0+ supports Ipv6 dual stack.
+ IPv6DualStackVersion = VersionRanges{
+ VersionRange{MinVersion: Version{Major: 10, Minor: 5}, MaxVersion: Version{Major: 10, Minor: math.MaxInt32}},
+ VersionRange{MinVersion: Version{Major: 12, Minor: 0}, MaxVersion: Version{Major: math.MaxInt32, Minor: math.MaxInt32}},
+ }
+ // HNS 13.0 allows for Set Policy support
+ SetPolicyVersion = VersionRanges{VersionRange{MinVersion: Version{Major: 13, Minor: 0}, MaxVersion: Version{Major: math.MaxInt32, Minor: math.MaxInt32}}}
+ // HNS 10.3 allows for VXLAN ports
+ VxlanPortVersion = VersionRanges{VersionRange{MinVersion: Version{Major: 10, Minor: 3}, MaxVersion: Version{Major: math.MaxInt32, Minor: math.MaxInt32}}}
+
+ //HNS 9.5 through 10.0(not included), 10.5 through 11.0(not included), 11.11 through 12.0(not included), 12.1 through 13.0(not included), 13.1+ allows for Network L4Proxy Policy support
+ L4ProxyPolicyVersion = VersionRanges{
+ VersionRange{MinVersion: Version{Major: 9, Minor: 5}, MaxVersion: Version{Major: 9, Minor: math.MaxInt32}},
+ VersionRange{MinVersion: Version{Major: 10, Minor: 5}, MaxVersion: Version{Major: 10, Minor: math.MaxInt32}},
+ VersionRange{MinVersion: Version{Major: 11, Minor: 11}, MaxVersion: Version{Major: 11, Minor: math.MaxInt32}},
+ VersionRange{MinVersion: Version{Major: 12, Minor: 1}, MaxVersion: Version{Major: 12, Minor: math.MaxInt32}},
+ VersionRange{MinVersion: Version{Major: 13, Minor: 1}, MaxVersion: Version{Major: math.MaxInt32, Minor: math.MaxInt32}},
+ }
+
+ //HNS 13.2 allows for L4WfpProxy Policy support
+ L4WfpProxyPolicyVersion = VersionRanges{VersionRange{MinVersion: Version{Major: 13, Minor: 2}, MaxVersion: Version{Major: math.MaxInt32, Minor: math.MaxInt32}}}
)
// GetGlobals returns the global properties of the HCN Service.
diff --git a/vendor/github.com/Microsoft/hcsshim/hcn/hcnnamespace.go b/vendor/github.com/Microsoft/hcsshim/hcn/hcnnamespace.go
index f99ff8754..22c7cf95f 100644
--- a/vendor/github.com/Microsoft/hcsshim/hcn/hcnnamespace.go
+++ b/vendor/github.com/Microsoft/hcsshim/hcn/hcnnamespace.go
@@ -247,11 +247,23 @@ func ListNamespacesQuery(query HostComputeQuery) ([]HostComputeNamespace, error)
// GetNamespaceByID returns the Namespace specified by Id.
func GetNamespaceByID(namespaceId string) (*HostComputeNamespace, error) {
- g, err := guid.FromString(namespaceId)
+ hcnQuery := defaultQuery()
+ mapA := map[string]string{"ID": namespaceId}
+ filter, err := json.Marshal(mapA)
if err != nil {
- return nil, errInvalidNamespaceID
+ return nil, err
+ }
+ hcnQuery.Filter = string(filter)
+
+ namespaces, err := ListNamespacesQuery(hcnQuery)
+ if err != nil {
+ return nil, err
}
- return getNamespace(g, defaultQueryJson())
+ if len(namespaces) == 0 {
+ return nil, NamespaceNotFoundError{NamespaceID: namespaceId}
+ }
+
+ return &namespaces[0], err
}
// GetNamespaceEndpointIds returns the endpoints of the Namespace specified by Id.
diff --git a/vendor/github.com/Microsoft/hcsshim/hcn/hcnpolicy.go b/vendor/github.com/Microsoft/hcsshim/hcn/hcnpolicy.go
index d0fb6e49e..e52a281c3 100644
--- a/vendor/github.com/Microsoft/hcsshim/hcn/hcnpolicy.go
+++ b/vendor/github.com/Microsoft/hcsshim/hcn/hcnpolicy.go
@@ -43,7 +43,10 @@ const (
InterfaceConstraint NetworkPolicyType = "InterfaceConstraint"
ProviderAddress NetworkPolicyType = "ProviderAddress"
RemoteSubnetRoute NetworkPolicyType = "RemoteSubnetRoute"
+ VxlanPort NetworkPolicyType = "VxlanPort"
HostRoute NetworkPolicyType = "HostRoute"
+ SetPolicy NetworkPolicyType = "SetPolicy"
+ NetworkL4Proxy NetworkPolicyType = "L4Proxy"
)
// NetworkPolicy is a collection of Policy settings for a Network.
@@ -139,7 +142,7 @@ type SDNRoutePolicySetting struct {
NeedEncap bool `json:",omitempty"`
}
-// FiveTuple is nested in L4ProxyPolicySetting for WFP support.
+// FiveTuple is nested in L4ProxyPolicySetting for WFP support.
type FiveTuple struct {
Protocols string `json:",omitempty"`
LocalAddresses string `json:",omitempty"`
@@ -151,9 +154,10 @@ type FiveTuple struct {
// L4WfpProxyPolicySetting sets Layer-4 Proxy on an endpoint.
type L4WfpProxyPolicySetting struct {
- Port string `json:",omitempty"`
- FilterTuple FiveTuple `json:",omitempty"`
- UserSID string `json:",omitempty"`
+ InboundProxyPort string `json:",omitempty"`
+ OutboundProxyPort string `json:",omitempty"`
+ FilterTuple FiveTuple `json:",omitempty"`
+ UserSID string `json:",omitempty"`
}
// PortnameEndpointPolicySetting sets the port name for an endpoint.
@@ -230,3 +234,45 @@ type RemoteSubnetRoutePolicySetting struct {
ProviderAddress string
DistributedRouterMacAddress string
}
+
+// SetPolicyTypes associated with SetPolicy. Value is IPSET.
+type SetPolicyType string
+
+const (
+ SetPolicyTypeIpSet SetPolicyType = "IPSET"
+)
+
+// SetPolicySetting creates IPSets on network
+type SetPolicySetting struct {
+ Id string
+ Name string
+ Type SetPolicyType
+ Values string
+}
+
+// VxlanPortPolicySetting allows configuring the VXLAN TCP port
+type VxlanPortPolicySetting struct {
+ Port uint16
+}
+
+// ProtocolType associated with L4ProxyPolicy
+type ProtocolType uint32
+
+const (
+ ProtocolTypeUnknown ProtocolType = 0
+ ProtocolTypeICMPv4 ProtocolType = 1
+ ProtocolTypeIGMP ProtocolType = 2
+ ProtocolTypeTCP ProtocolType = 6
+ ProtocolTypeUDP ProtocolType = 17
+ ProtocolTypeICMPv6 ProtocolType = 58
+)
+
+//L4ProxyPolicySetting applies proxy policy on network/endpoint
+type L4ProxyPolicySetting struct {
+ IP string `json:",omitempty"`
+ Port string `json:",omitempty"`
+ Protocol ProtocolType `json:",omitempty"`
+ Exceptions []string `json:",omitempty"`
+ Destination string
+ OutboundNAT bool `json:",omitempty"`
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/hcn/hcnroute.go b/vendor/github.com/Microsoft/hcsshim/hcn/hcnroute.go
new file mode 100644
index 000000000..d6d27079b
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/hcn/hcnroute.go
@@ -0,0 +1,266 @@
+package hcn
+
+import (
+ "encoding/json"
+ "errors"
+
+ "github.com/Microsoft/go-winio/pkg/guid"
+ "github.com/Microsoft/hcsshim/internal/interop"
+ "github.com/sirupsen/logrus"
+)
+
+// HostComputeRoute represents SDN routes.
+type HostComputeRoute struct {
+ ID string `json:"ID,omitempty"`
+ HostComputeEndpoints []string `json:",omitempty"`
+ Setting []SDNRoutePolicySetting `json:",omitempty"`
+ SchemaVersion SchemaVersion `json:",omitempty"`
+}
+
+// ListRoutes makes a call to list all available routes.
+func ListRoutes() ([]HostComputeRoute, error) {
+ hcnQuery := defaultQuery()
+ routes, err := ListRoutesQuery(hcnQuery)
+ if err != nil {
+ return nil, err
+ }
+ return routes, nil
+}
+
+// ListRoutesQuery makes a call to query the list of available routes.
+func ListRoutesQuery(query HostComputeQuery) ([]HostComputeRoute, error) {
+ queryJSON, err := json.Marshal(query)
+ if err != nil {
+ return nil, err
+ }
+
+ routes, err := enumerateRoutes(string(queryJSON))
+ if err != nil {
+ return nil, err
+ }
+ return routes, nil
+}
+
+// GetRouteByID returns the route specified by Id.
+func GetRouteByID(routeID string) (*HostComputeRoute, error) {
+ hcnQuery := defaultQuery()
+ mapA := map[string]string{"ID": routeID}
+ filter, err := json.Marshal(mapA)
+ if err != nil {
+ return nil, err
+ }
+ hcnQuery.Filter = string(filter)
+
+ routes, err := ListRoutesQuery(hcnQuery)
+ if err != nil {
+ return nil, err
+ }
+ if len(routes) == 0 {
+ return nil, RouteNotFoundError{RouteId: routeID}
+ }
+ return &routes[0], err
+}
+
+// Create Route.
+func (route *HostComputeRoute) Create() (*HostComputeRoute, error) {
+ logrus.Debugf("hcn::HostComputeRoute::Create id=%s", route.ID)
+
+ jsonString, err := json.Marshal(route)
+ if err != nil {
+ return nil, err
+ }
+
+ logrus.Debugf("hcn::HostComputeRoute::Create JSON: %s", jsonString)
+ route, hcnErr := createRoute(string(jsonString))
+ if hcnErr != nil {
+ return nil, hcnErr
+ }
+ return route, nil
+}
+
+// Delete Route.
+func (route *HostComputeRoute) Delete() error {
+ logrus.Debugf("hcn::HostComputeRoute::Delete id=%s", route.ID)
+
+ existingRoute, _ := GetRouteByID(route.ID)
+
+ if existingRoute != nil {
+ if err := deleteRoute(route.ID); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+// AddEndpoint add an endpoint to a route
+// Since HCNRoute doesn't implement modify functionality, add operation is essentially delete and add
+func (route *HostComputeRoute) AddEndpoint(endpoint *HostComputeEndpoint) (*HostComputeRoute, error) {
+ logrus.Debugf("hcn::HostComputeRoute::AddEndpoint route=%s endpoint=%s", route.ID, endpoint.Id)
+
+ err := route.Delete()
+ if err != nil {
+ return nil, err
+ }
+
+ // Add Endpoint to the Existing List
+ route.HostComputeEndpoints = append(route.HostComputeEndpoints, endpoint.Id)
+
+ return route.Create()
+}
+
+// RemoveEndpoint removes an endpoint from a route
+// Since HCNRoute doesn't implement modify functionality, remove operation is essentially delete and add
+func (route *HostComputeRoute) RemoveEndpoint(endpoint *HostComputeEndpoint) (*HostComputeRoute, error) {
+ logrus.Debugf("hcn::HostComputeRoute::RemoveEndpoint route=%s endpoint=%s", route.ID, endpoint.Id)
+
+ err := route.Delete()
+ if err != nil {
+ return nil, err
+ }
+
+ // Create a list of all the endpoints besides the one being removed
+ i := 0
+ for index, endpointReference := range route.HostComputeEndpoints {
+ if endpointReference == endpoint.Id {
+ i = index
+ break
+ }
+ }
+
+ route.HostComputeEndpoints = append(route.HostComputeEndpoints[0:i], route.HostComputeEndpoints[i+1:]...)
+ return route.Create()
+}
+
+// AddRoute for the specified endpoints and SDN Route setting
+func AddRoute(endpoints []HostComputeEndpoint, destinationPrefix string, nextHop string, needEncapsulation bool) (*HostComputeRoute, error) {
+ logrus.Debugf("hcn::HostComputeRoute::AddRoute endpointId=%v, destinationPrefix=%v, nextHop=%v, needEncapsulation=%v", endpoints, destinationPrefix, nextHop, needEncapsulation)
+
+ if len(endpoints) <= 0 {
+ return nil, errors.New("Missing endpoints")
+ }
+
+ route := &HostComputeRoute{
+ SchemaVersion: V2SchemaVersion(),
+ Setting: []SDNRoutePolicySetting{
+ {
+ DestinationPrefix: destinationPrefix,
+ NextHop: nextHop,
+ NeedEncap: needEncapsulation,
+ },
+ },
+ }
+
+ for _, endpoint := range endpoints {
+ route.HostComputeEndpoints = append(route.HostComputeEndpoints, endpoint.Id)
+ }
+
+ return route.Create()
+}
+
+func enumerateRoutes(query string) ([]HostComputeRoute, error) {
+ // Enumerate all routes Guids
+ var (
+ resultBuffer *uint16
+ routeBuffer *uint16
+ )
+ hr := hcnEnumerateRoutes(query, &routeBuffer, &resultBuffer)
+ if err := checkForErrors("hcnEnumerateRoutes", hr, resultBuffer); err != nil {
+ return nil, err
+ }
+
+ routes := interop.ConvertAndFreeCoTaskMemString(routeBuffer)
+ var routeIds []guid.GUID
+ if err := json.Unmarshal([]byte(routes), &routeIds); err != nil {
+ return nil, err
+ }
+
+ var outputRoutes []HostComputeRoute
+ for _, routeGUID := range routeIds {
+ route, err := getRoute(routeGUID, query)
+ if err != nil {
+ return nil, err
+ }
+ outputRoutes = append(outputRoutes, *route)
+ }
+ return outputRoutes, nil
+}
+
+func getRoute(routeGUID guid.GUID, query string) (*HostComputeRoute, error) {
+ // Open routes.
+ var (
+ routeHandle hcnRoute
+ resultBuffer *uint16
+ propertiesBuffer *uint16
+ )
+ hr := hcnOpenRoute(&routeGUID, &routeHandle, &resultBuffer)
+ if err := checkForErrors("hcnOpenRoute", hr, resultBuffer); err != nil {
+ return nil, err
+ }
+ // Query routes.
+ hr = hcnQueryRouteProperties(routeHandle, query, &propertiesBuffer, &resultBuffer)
+ if err := checkForErrors("hcnQueryRouteProperties", hr, resultBuffer); err != nil {
+ return nil, err
+ }
+ properties := interop.ConvertAndFreeCoTaskMemString(propertiesBuffer)
+ // Close routes.
+ hr = hcnCloseRoute(routeHandle)
+ if err := checkForErrors("hcnCloseRoute", hr, nil); err != nil {
+ return nil, err
+ }
+ // Convert output to HostComputeRoute
+ var outputRoute HostComputeRoute
+ if err := json.Unmarshal([]byte(properties), &outputRoute); err != nil {
+ return nil, err
+ }
+ return &outputRoute, nil
+}
+
+func createRoute(settings string) (*HostComputeRoute, error) {
+ // Create new route.
+ var (
+ routeHandle hcnRoute
+ resultBuffer *uint16
+ propertiesBuffer *uint16
+ )
+ routeGUID := guid.GUID{}
+ hr := hcnCreateRoute(&routeGUID, settings, &routeHandle, &resultBuffer)
+ if err := checkForErrors("hcnCreateRoute", hr, resultBuffer); err != nil {
+ return nil, err
+ }
+ // Query route.
+ hcnQuery := defaultQuery()
+ query, err := json.Marshal(hcnQuery)
+ if err != nil {
+ return nil, err
+ }
+ hr = hcnQueryRouteProperties(routeHandle, string(query), &propertiesBuffer, &resultBuffer)
+ if err := checkForErrors("hcnQueryRouteProperties", hr, resultBuffer); err != nil {
+ return nil, err
+ }
+ properties := interop.ConvertAndFreeCoTaskMemString(propertiesBuffer)
+ // Close Route.
+ hr = hcnCloseRoute(routeHandle)
+ if err := checkForErrors("hcnCloseRoute", hr, nil); err != nil {
+ return nil, err
+ }
+ // Convert output to HostComputeRoute
+ var outputRoute HostComputeRoute
+ if err := json.Unmarshal([]byte(properties), &outputRoute); err != nil {
+ return nil, err
+ }
+ return &outputRoute, nil
+}
+
+func deleteRoute(routeID string) error {
+ routeGUID, err := guid.FromString(routeID)
+ if err != nil {
+ return errInvalidRouteID
+ }
+ var resultBuffer *uint16
+ hr := hcnDeleteRoute(&routeGUID, &resultBuffer)
+ if err := checkForErrors("hcnDeleteRoute", hr, resultBuffer); err != nil {
+ return err
+ }
+ return nil
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/hcn/hcnsupport.go b/vendor/github.com/Microsoft/hcsshim/hcn/hcnsupport.go
index 777e0c507..1096aebde 100644
--- a/vendor/github.com/Microsoft/hcsshim/hcn/hcnsupport.go
+++ b/vendor/github.com/Microsoft/hcsshim/hcn/hcnsupport.go
@@ -14,6 +14,11 @@ type SupportedFeatures struct {
Slash32EndpointPrefixes bool `json:"Slash32EndpointPrefixes"`
AclSupportForProtocol252 bool `json:"AclSupportForProtocol252"`
SessionAffinity bool `json:"SessionAffinity"`
+ IPv6DualStack bool `json:"IPv6DualStack"`
+ SetPolicy bool `json:"SetPolicy"`
+ VxlanPort bool `json:"VxlanPort"`
+ L4Proxy bool `json:"L4Proxy"` // network policy that applies VFP rules to all endpoints on the network to redirect traffic
+ L4WfpProxy bool `json:"L4WfpProxy"` // endpoint policy that applies WFP filters to redirect traffic to/from that endpoint
}
// AclFeatures are the supported ACL possibilities.
@@ -59,6 +64,11 @@ func GetSupportedFeatures() SupportedFeatures {
features.Slash32EndpointPrefixes = isFeatureSupported(globals.Version, Slash32EndpointPrefixesVersion)
features.AclSupportForProtocol252 = isFeatureSupported(globals.Version, AclSupportForProtocol252Version)
features.SessionAffinity = isFeatureSupported(globals.Version, SessionAffinityVersion)
+ features.IPv6DualStack = isFeatureSupported(globals.Version, IPv6DualStackVersion)
+ features.SetPolicy = isFeatureSupported(globals.Version, SetPolicyVersion)
+ features.VxlanPort = isFeatureSupported(globals.Version, VxlanPortVersion)
+ features.L4Proxy = isFeatureSupported(globals.Version, L4ProxyPolicyVersion)
+ features.L4WfpProxy = isFeatureSupported(globals.Version, L4WfpProxyPolicyVersion)
return features
}
diff --git a/vendor/github.com/Microsoft/hcsshim/hcn/zsyscall_windows.go b/vendor/github.com/Microsoft/hcsshim/hcn/zsyscall_windows.go
index 856b2c140..466d30457 100644
--- a/vendor/github.com/Microsoft/hcsshim/hcn/zsyscall_windows.go
+++ b/vendor/github.com/Microsoft/hcsshim/hcn/zsyscall_windows.go
@@ -71,6 +71,13 @@ var (
procHcnQueryLoadBalancerProperties = modcomputenetwork.NewProc("HcnQueryLoadBalancerProperties")
procHcnDeleteLoadBalancer = modcomputenetwork.NewProc("HcnDeleteLoadBalancer")
procHcnCloseLoadBalancer = modcomputenetwork.NewProc("HcnCloseLoadBalancer")
+ procHcnEnumerateSdnRoutes = modcomputenetwork.NewProc("HcnEnumerateSdnRoutes")
+ procHcnCreateSdnRoute = modcomputenetwork.NewProc("HcnCreateSdnRoute")
+ procHcnOpenSdnRoute = modcomputenetwork.NewProc("HcnOpenSdnRoute")
+ procHcnModifySdnRoute = modcomputenetwork.NewProc("HcnModifySdnRoute")
+ procHcnQuerySdnRouteProperties = modcomputenetwork.NewProc("HcnQuerySdnRouteProperties")
+ procHcnDeleteSdnRoute = modcomputenetwork.NewProc("HcnDeleteSdnRoute")
+ procHcnCloseSdnRoute = modcomputenetwork.NewProc("HcnCloseSdnRoute")
procHcnOpenService = modcomputenetwork.NewProc("HcnOpenService")
procHcnRegisterServiceCallback = modcomputenetwork.NewProc("HcnRegisterServiceCallback")
procHcnUnregisterServiceCallback = modcomputenetwork.NewProc("HcnUnregisterServiceCallback")
@@ -657,6 +664,140 @@ func hcnCloseLoadBalancer(loadBalancer hcnLoadBalancer) (hr error) {
return
}
+func hcnEnumerateRoutes(query string, routes **uint16, result **uint16) (hr error) {
+ var _p0 *uint16
+ _p0, hr = syscall.UTF16PtrFromString(query)
+ if hr != nil {
+ return
+ }
+ return _hcnEnumerateRoutes(_p0, routes, result)
+}
+
+func _hcnEnumerateRoutes(query *uint16, routes **uint16, result **uint16) (hr error) {
+ if hr = procHcnEnumerateSdnRoutes.Find(); hr != nil {
+ return
+ }
+ r0, _, _ := syscall.Syscall(procHcnEnumerateSdnRoutes.Addr(), 3, uintptr(unsafe.Pointer(query)), uintptr(unsafe.Pointer(routes)), uintptr(unsafe.Pointer(result)))
+ if int32(r0) < 0 {
+ if r0&0x1fff0000 == 0x00070000 {
+ r0 &= 0xffff
+ }
+ hr = syscall.Errno(r0)
+ }
+ return
+}
+
+func hcnCreateRoute(id *_guid, settings string, route *hcnRoute, result **uint16) (hr error) {
+ var _p0 *uint16
+ _p0, hr = syscall.UTF16PtrFromString(settings)
+ if hr != nil {
+ return
+ }
+ return _hcnCreateRoute(id, _p0, route, result)
+}
+
+func _hcnCreateRoute(id *_guid, settings *uint16, route *hcnRoute, result **uint16) (hr error) {
+ if hr = procHcnCreateSdnRoute.Find(); hr != nil {
+ return
+ }
+ r0, _, _ := syscall.Syscall6(procHcnCreateSdnRoute.Addr(), 4, uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(settings)), uintptr(unsafe.Pointer(route)), uintptr(unsafe.Pointer(result)), 0, 0)
+ if int32(r0) < 0 {
+ if r0&0x1fff0000 == 0x00070000 {
+ r0 &= 0xffff
+ }
+ hr = syscall.Errno(r0)
+ }
+ return
+}
+
+func hcnOpenRoute(id *_guid, route *hcnRoute, result **uint16) (hr error) {
+ if hr = procHcnOpenSdnRoute.Find(); hr != nil {
+ return
+ }
+ r0, _, _ := syscall.Syscall(procHcnOpenSdnRoute.Addr(), 3, uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(route)), uintptr(unsafe.Pointer(result)))
+ if int32(r0) < 0 {
+ if r0&0x1fff0000 == 0x00070000 {
+ r0 &= 0xffff
+ }
+ hr = syscall.Errno(r0)
+ }
+ return
+}
+
+func hcnModifyRoute(route hcnRoute, settings string, result **uint16) (hr error) {
+ var _p0 *uint16
+ _p0, hr = syscall.UTF16PtrFromString(settings)
+ if hr != nil {
+ return
+ }
+ return _hcnModifyRoute(route, _p0, result)
+}
+
+func _hcnModifyRoute(route hcnRoute, settings *uint16, result **uint16) (hr error) {
+ if hr = procHcnModifySdnRoute.Find(); hr != nil {
+ return
+ }
+ r0, _, _ := syscall.Syscall(procHcnModifySdnRoute.Addr(), 3, uintptr(route), uintptr(unsafe.Pointer(settings)), uintptr(unsafe.Pointer(result)))
+ if int32(r0) < 0 {
+ if r0&0x1fff0000 == 0x00070000 {
+ r0 &= 0xffff
+ }
+ hr = syscall.Errno(r0)
+ }
+ return
+}
+
+func hcnQueryRouteProperties(route hcnRoute, query string, properties **uint16, result **uint16) (hr error) {
+ var _p0 *uint16
+ _p0, hr = syscall.UTF16PtrFromString(query)
+ if hr != nil {
+ return
+ }
+ return _hcnQueryRouteProperties(route, _p0, properties, result)
+}
+
+func _hcnQueryRouteProperties(route hcnRoute, query *uint16, properties **uint16, result **uint16) (hr error) {
+ if hr = procHcnQuerySdnRouteProperties.Find(); hr != nil {
+ return
+ }
+ r0, _, _ := syscall.Syscall6(procHcnQuerySdnRouteProperties.Addr(), 4, uintptr(route), uintptr(unsafe.Pointer(query)), uintptr(unsafe.Pointer(properties)), uintptr(unsafe.Pointer(result)), 0, 0)
+ if int32(r0) < 0 {
+ if r0&0x1fff0000 == 0x00070000 {
+ r0 &= 0xffff
+ }
+ hr = syscall.Errno(r0)
+ }
+ return
+}
+
+func hcnDeleteRoute(id *_guid, result **uint16) (hr error) {
+ if hr = procHcnDeleteSdnRoute.Find(); hr != nil {
+ return
+ }
+ r0, _, _ := syscall.Syscall(procHcnDeleteSdnRoute.Addr(), 2, uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(result)), 0)
+ if int32(r0) < 0 {
+ if r0&0x1fff0000 == 0x00070000 {
+ r0 &= 0xffff
+ }
+ hr = syscall.Errno(r0)
+ }
+ return
+}
+
+func hcnCloseRoute(route hcnRoute) (hr error) {
+ if hr = procHcnCloseSdnRoute.Find(); hr != nil {
+ return
+ }
+ r0, _, _ := syscall.Syscall(procHcnCloseSdnRoute.Addr(), 1, uintptr(route), 0, 0)
+ if int32(r0) < 0 {
+ if r0&0x1fff0000 == 0x00070000 {
+ r0 &= 0xffff
+ }
+ hr = syscall.Errno(r0)
+ }
+ return
+}
+
func hcnOpenService(service *hcnService, result **uint16) (hr error) {
if hr = procHcnOpenService.Find(); hr != nil {
return
diff --git a/vendor/github.com/Microsoft/hcsshim/hnspolicy.go b/vendor/github.com/Microsoft/hcsshim/hnspolicy.go
index a3e03ff8f..00ab26364 100644
--- a/vendor/github.com/Microsoft/hcsshim/hnspolicy.go
+++ b/vendor/github.com/Microsoft/hcsshim/hnspolicy.go
@@ -21,8 +21,11 @@ const (
OutboundNat = hns.OutboundNat
ExternalLoadBalancer = hns.ExternalLoadBalancer
Route = hns.Route
+ Proxy = hns.Proxy
)
+type ProxyPolicy = hns.ProxyPolicy
+
type NatPolicy = hns.NatPolicy
type QosPolicy = hns.QosPolicy
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hcs/cgo.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/cgo.go
deleted file mode 100644
index 3669c34aa..000000000
--- a/vendor/github.com/Microsoft/hcsshim/internal/hcs/cgo.go
+++ /dev/null
@@ -1,7 +0,0 @@
-package hcs
-
-import "C"
-
-// This import is needed to make the library compile as CGO because HCSSHIM
-// only works with CGO due to callbacks from HCS comming back from a C thread
-// which is not supported without CGO. See https://github.com/golang/go/issues/10973
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hcs/service.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/service.go
new file mode 100644
index 000000000..3a5f01250
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/hcs/service.go
@@ -0,0 +1,49 @@
+package hcs
+
+import (
+ "context"
+ "encoding/json"
+
+ hcsschema "github.com/Microsoft/hcsshim/internal/schema2"
+ "github.com/Microsoft/hcsshim/internal/vmcompute"
+)
+
+// GetServiceProperties returns properties of the host compute service.
+func GetServiceProperties(ctx context.Context, q hcsschema.PropertyQuery) (*hcsschema.ServiceProperties, error) {
+ operation := "hcsshim::GetServiceProperties"
+
+ queryb, err := json.Marshal(q)
+ if err != nil {
+ return nil, err
+ }
+ propertiesJSON, resultJSON, err := vmcompute.HcsGetServiceProperties(ctx, string(queryb))
+ events := processHcsResult(ctx, resultJSON)
+ if err != nil {
+ return nil, &HcsError{Op: operation, Err: err, Events: events}
+ }
+
+ if propertiesJSON == "" {
+ return nil, ErrUnexpectedValue
+ }
+ properties := &hcsschema.ServiceProperties{}
+ if err := json.Unmarshal([]byte(propertiesJSON), properties); err != nil {
+ return nil, err
+ }
+ return properties, nil
+}
+
+// ModifyServiceSettings modifies settings of the host compute service.
+func ModifyServiceSettings(ctx context.Context, settings hcsschema.ModificationRequest) error {
+ operation := "hcsshim::ModifyServiceSettings"
+
+ settingsJSON, err := json.Marshal(settings)
+ if err != nil {
+ return err
+ }
+ resultJSON, err := vmcompute.HcsModifyServiceSettings(ctx, string(settingsJSON))
+ events := processHcsResult(ctx, resultJSON)
+ if err != nil {
+ return &HcsError{Op: operation, Err: err, Events: events}
+ }
+ return nil
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hcs/system.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/system.go
index 6300a7974..6120399c4 100644
--- a/vendor/github.com/Microsoft/hcsshim/internal/hcs/system.go
+++ b/vendor/github.com/Microsoft/hcsshim/internal/hcs/system.go
@@ -4,12 +4,9 @@ import (
"context"
"encoding/json"
"errors"
- "os"
- "strconv"
"strings"
"sync"
"syscall"
- "time"
"github.com/Microsoft/hcsshim/internal/cow"
"github.com/Microsoft/hcsshim/internal/log"
@@ -21,27 +18,6 @@ import (
"go.opencensus.io/trace"
)
-// currentContainerStarts is used to limit the number of concurrent container
-// starts.
-var currentContainerStarts containerStarts
-
-type containerStarts struct {
- maxParallel int
- inProgress int
- sync.Mutex
-}
-
-func init() {
- mpsS := os.Getenv("HCSSHIM_MAX_PARALLEL_START")
- if len(mpsS) > 0 {
- mpsI, err := strconv.Atoi(mpsS)
- if err != nil || mpsI < 0 {
- return
- }
- currentContainerStarts.maxParallel = mpsI
- }
-}
-
type System struct {
handleLock sync.RWMutex
handle vmcompute.HcsSystem
@@ -52,8 +28,7 @@ type System struct {
waitBlock chan struct{}
waitError error
exitError error
-
- os, typ string
+ os, typ string
}
func newSystem(id string) *System {
@@ -215,32 +190,6 @@ func (computeSystem *System) Start(ctx context.Context) (err error) {
return makeSystemError(computeSystem, operation, "", ErrAlreadyClosed, nil)
}
- // This is a very simple backoff-retry loop to limit the number
- // of parallel container starts if environment variable
- // HCSSHIM_MAX_PARALLEL_START is set to a positive integer.
- // It should generally only be used as a workaround to various
- // platform issues that exist between RS1 and RS4 as of Aug 2018
- if currentContainerStarts.maxParallel > 0 {
- for {
- currentContainerStarts.Lock()
- if currentContainerStarts.inProgress < currentContainerStarts.maxParallel {
- currentContainerStarts.inProgress++
- currentContainerStarts.Unlock()
- break
- }
- if currentContainerStarts.inProgress == currentContainerStarts.maxParallel {
- currentContainerStarts.Unlock()
- time.Sleep(100 * time.Millisecond)
- }
- }
- // Make sure we decrement the count when we are done.
- defer func() {
- currentContainerStarts.Lock()
- currentContainerStarts.inProgress--
- currentContainerStarts.Unlock()
- }()
- }
-
resultJSON, err := vmcompute.HcsStartComputeSystem(ctx, computeSystem.handle, "")
events, err := processAsyncHcsResult(ctx, err, resultJSON, computeSystem.callbackNumber, hcsNotificationSystemStartCompleted, &timeout.SystemStart)
if err != nil {
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hcs/utils.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/utils.go
index a638677ed..3342e5bb9 100644
--- a/vendor/github.com/Microsoft/hcsshim/internal/hcs/utils.go
+++ b/vendor/github.com/Microsoft/hcsshim/internal/hcs/utils.go
@@ -1,10 +1,15 @@
package hcs
import (
+ "context"
"io"
"syscall"
"github.com/Microsoft/go-winio"
+ diskutil "github.com/Microsoft/go-winio/vhd"
+ "github.com/Microsoft/hcsshim/computestorage"
+ "github.com/pkg/errors"
+ "golang.org/x/sys/windows"
)
// makeOpenFiles calls winio.MakeOpenFile for each handle in a slice but closes all the handles
@@ -31,3 +36,27 @@ func makeOpenFiles(hs []syscall.Handle) (_ []io.ReadWriteCloser, err error) {
}
return fs, nil
}
+
+// CreateNTFSVHD creates a VHD formatted with NTFS of size `sizeGB` at the given `vhdPath`.
+func CreateNTFSVHD(ctx context.Context, vhdPath string, sizeGB uint32) (err error) {
+ if err := diskutil.CreateVhdx(vhdPath, sizeGB, 1); err != nil {
+ return errors.Wrap(err, "failed to create VHD")
+ }
+
+ vhd, err := diskutil.OpenVirtualDisk(vhdPath, diskutil.VirtualDiskAccessNone, diskutil.OpenVirtualDiskFlagNone)
+ if err != nil {
+ return errors.Wrap(err, "failed to open VHD")
+ }
+ defer func() {
+ err2 := windows.CloseHandle(windows.Handle(vhd))
+ if err == nil {
+ err = errors.Wrap(err2, "failed to close VHD")
+ }
+ }()
+
+ if err := computestorage.FormatWritableLayerVhd(ctx, windows.Handle(vhd)); err != nil {
+ return errors.Wrap(err, "failed to format VHD")
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hns/hnsendpoint.go b/vendor/github.com/Microsoft/hcsshim/internal/hns/hnsendpoint.go
index 6a1c41e15..b36315a39 100644
--- a/vendor/github.com/Microsoft/hcsshim/internal/hns/hnsendpoint.go
+++ b/vendor/github.com/Microsoft/hcsshim/internal/hns/hnsendpoint.go
@@ -17,12 +17,15 @@ type HNSEndpoint struct {
Policies []json.RawMessage `json:",omitempty"`
MacAddress string `json:",omitempty"`
IPAddress net.IP `json:",omitempty"`
+ IPv6Address net.IP `json:",omitempty"`
DNSSuffix string `json:",omitempty"`
DNSServerList string `json:",omitempty"`
GatewayAddress string `json:",omitempty"`
+ GatewayAddressV6 string `json:",omitempty"`
EnableInternalDNS bool `json:",omitempty"`
DisableICC bool `json:",omitempty"`
PrefixLength uint8 `json:",omitempty"`
+ IPv6PrefixLength uint8 `json:",omitempty"`
IsRemoteEndpoint bool `json:",omitempty"`
EnableLowMetric bool `json:",omitempty"`
Namespace *Namespace `json:",omitempty"`
@@ -173,6 +176,27 @@ func (endpoint *HNSEndpoint) ApplyACLPolicy(policies ...*ACLPolicy) error {
return err
}
+// ApplyProxyPolicy applies a set of Proxy Policies on the Endpoint
+func (endpoint *HNSEndpoint) ApplyProxyPolicy(policies ...*ProxyPolicy) error {
+ operation := "ApplyProxyPolicy"
+ title := "hcsshim::HNSEndpoint::" + operation
+ logrus.Debugf(title+" id=%s", endpoint.Id)
+
+ for _, policy := range policies {
+ if policy == nil {
+ continue
+ }
+ jsonString, err := json.Marshal(policy)
+ if err != nil {
+ return err
+ }
+ endpoint.Policies = append(endpoint.Policies, jsonString)
+ }
+
+ _, err := endpoint.Update()
+ return err
+}
+
// ContainerAttach attaches an endpoint to container
func (endpoint *HNSEndpoint) ContainerAttach(containerID string, compartmentID uint16) error {
operation := "ContainerAttach"
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hns/hnspolicy.go b/vendor/github.com/Microsoft/hcsshim/internal/hns/hnspolicy.go
index 61da242ee..6765aaead 100644
--- a/vendor/github.com/Microsoft/hcsshim/internal/hns/hnspolicy.go
+++ b/vendor/github.com/Microsoft/hcsshim/internal/hns/hnspolicy.go
@@ -17,6 +17,7 @@ const (
OutboundNat PolicyType = "OutBoundNAT"
ExternalLoadBalancer PolicyType = "ELB"
Route PolicyType = "ROUTE"
+ Proxy PolicyType = "PROXY"
)
type NatPolicy struct {
@@ -60,6 +61,15 @@ type OutboundNatPolicy struct {
Destinations []string `json:",omitempty"`
}
+type ProxyPolicy struct {
+ Type PolicyType `json:"Type"`
+ IP string `json:",omitempty"`
+ Port string `json:",omitempty"`
+ ExceptionList []string `json:",omitempty"`
+ Destination string `json:",omitempty"`
+ OutboundNat bool `json:",omitempty"`
+}
+
type ActionType string
type DirectionType string
type RuleType string
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hns/namespace.go b/vendor/github.com/Microsoft/hcsshim/internal/hns/namespace.go
index 45e2281b0..d3b04eefe 100644
--- a/vendor/github.com/Microsoft/hcsshim/internal/hns/namespace.go
+++ b/vendor/github.com/Microsoft/hcsshim/internal/hns/namespace.go
@@ -27,9 +27,10 @@ type namespaceResourceRequest struct {
}
type Namespace struct {
- ID string
- IsDefault bool `json:",omitempty"`
- ResourceList []NamespaceResource `json:",omitempty"`
+ ID string
+ IsDefault bool `json:",omitempty"`
+ ResourceList []NamespaceResource `json:",omitempty"`
+ CompartmentId uint32 `json:",omitempty"`
}
func issueNamespaceRequest(id *string, method, subpath string, request interface{}) (*Namespace, error) {
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/safefile/safeopen.go b/vendor/github.com/Microsoft/hcsshim/internal/safefile/safeopen.go
index f31edfaf8..d484c212c 100644
--- a/vendor/github.com/Microsoft/hcsshim/internal/safefile/safeopen.go
+++ b/vendor/github.com/Microsoft/hcsshim/internal/safefile/safeopen.go
@@ -11,72 +11,11 @@ import (
"unsafe"
"github.com/Microsoft/hcsshim/internal/longpath"
+ "github.com/Microsoft/hcsshim/internal/winapi"
winio "github.com/Microsoft/go-winio"
)
-//go:generate go run $GOROOT\src\syscall\mksyscall_windows.go -output zsyscall_windows.go safeopen.go
-
-//sys ntCreateFile(handle *uintptr, accessMask uint32, oa *objectAttributes, iosb *ioStatusBlock, allocationSize *uint64, fileAttributes uint32, shareAccess uint32, createDisposition uint32, createOptions uint32, eaBuffer *byte, eaLength uint32) (status uint32) = ntdll.NtCreateFile
-//sys ntSetInformationFile(handle uintptr, iosb *ioStatusBlock, information uintptr, length uint32, class uint32) (status uint32) = ntdll.NtSetInformationFile
-//sys rtlNtStatusToDosError(status uint32) (winerr error) = ntdll.RtlNtStatusToDosErrorNoTeb
-//sys localAlloc(flags uint32, size int) (ptr uintptr) = kernel32.LocalAlloc
-//sys localFree(ptr uintptr) = kernel32.LocalFree
-
-type ioStatusBlock struct {
- Status, Information uintptr
-}
-
-type objectAttributes struct {
- Length uintptr
- RootDirectory uintptr
- ObjectName uintptr
- Attributes uintptr
- SecurityDescriptor uintptr
- SecurityQoS uintptr
-}
-
-type unicodeString struct {
- Length uint16
- MaximumLength uint16
- Buffer uintptr
-}
-
-type fileLinkInformation struct {
- ReplaceIfExists bool
- RootDirectory uintptr
- FileNameLength uint32
- FileName [1]uint16
-}
-
-type fileDispositionInformationEx struct {
- Flags uintptr
-}
-
-const (
- _FileLinkInformation = 11
- _FileDispositionInformationEx = 64
-
- FILE_READ_ATTRIBUTES = 0x0080
- FILE_WRITE_ATTRIBUTES = 0x0100
- DELETE = 0x10000
-
- FILE_OPEN = 1
- FILE_CREATE = 2
-
- FILE_DIRECTORY_FILE = 0x00000001
- FILE_SYNCHRONOUS_IO_NONALERT = 0x00000020
- FILE_DELETE_ON_CLOSE = 0x00001000
- FILE_OPEN_FOR_BACKUP_INTENT = 0x00004000
- FILE_OPEN_REPARSE_POINT = 0x00200000
-
- FILE_DISPOSITION_DELETE = 0x00000001
-
- _OBJ_DONT_REPARSE = 0x1000
-
- _STATUS_REPARSE_POINT_ENCOUNTERED = 0xC000050B
-)
-
func OpenRoot(path string) (*os.File, error) {
longpath, err := longpath.LongAbs(path)
if err != nil {
@@ -85,16 +24,24 @@ func OpenRoot(path string) (*os.File, error) {
return winio.OpenForBackup(longpath, syscall.GENERIC_READ, syscall.FILE_SHARE_READ|syscall.FILE_SHARE_WRITE|syscall.FILE_SHARE_DELETE, syscall.OPEN_EXISTING)
}
-func ntRelativePath(path string) ([]uint16, error) {
+func cleanGoStringRelativePath(path string) (string, error) {
path = filepath.Clean(path)
if strings.Contains(path, ":") {
// Since alternate data streams must follow the file they
// are attached to, finding one here (out of order) is invalid.
- return nil, errors.New("path contains invalid character `:`")
+ return "", errors.New("path contains invalid character `:`")
}
fspath := filepath.FromSlash(path)
if len(fspath) > 0 && fspath[0] == '\\' {
- return nil, errors.New("expected relative path")
+ return "", errors.New("expected relative path")
+ }
+ return fspath, nil
+}
+
+func ntRelativePath(path string) ([]uint16, error) {
+ fspath, err := cleanGoStringRelativePath(path)
+ if err != nil {
+ return nil, err
}
path16 := utf16.Encode(([]rune)(fspath))
@@ -110,11 +57,11 @@ func ntRelativePath(path string) ([]uint16, error) {
func openRelativeInternal(path string, root *os.File, accessMask uint32, shareFlags uint32, createDisposition uint32, flags uint32) (*os.File, error) {
var (
h uintptr
- iosb ioStatusBlock
- oa objectAttributes
+ iosb winapi.IOStatusBlock
+ oa winapi.ObjectAttributes
)
- path16, err := ntRelativePath(path)
+ cleanRelativePath, err := cleanGoStringRelativePath(path)
if err != nil {
return nil, err
}
@@ -123,20 +70,16 @@ func openRelativeInternal(path string, root *os.File, accessMask uint32, shareFl
return nil, errors.New("missing root directory")
}
- upathBuffer := localAlloc(0, int(unsafe.Sizeof(unicodeString{}))+len(path16)*2)
- defer localFree(upathBuffer)
-
- upath := (*unicodeString)(unsafe.Pointer(upathBuffer))
- upath.Length = uint16(len(path16) * 2)
- upath.MaximumLength = upath.Length
- upath.Buffer = upathBuffer + unsafe.Sizeof(*upath)
- copy((*[32768]uint16)(unsafe.Pointer(upath.Buffer))[:], path16)
+ pathUnicode, err := winapi.NewUnicodeString(cleanRelativePath)
+ if err != nil {
+ return nil, err
+ }
oa.Length = unsafe.Sizeof(oa)
- oa.ObjectName = upathBuffer
+ oa.ObjectName = uintptr(unsafe.Pointer(pathUnicode))
oa.RootDirectory = uintptr(root.Fd())
- oa.Attributes = _OBJ_DONT_REPARSE
- status := ntCreateFile(
+ oa.Attributes = winapi.OBJ_DONT_REPARSE
+ status := winapi.NtCreateFile(
&h,
accessMask|syscall.SYNCHRONIZE,
&oa,
@@ -145,12 +88,12 @@ func openRelativeInternal(path string, root *os.File, accessMask uint32, shareFl
0,
shareFlags,
createDisposition,
- FILE_OPEN_FOR_BACKUP_INTENT|FILE_SYNCHRONOUS_IO_NONALERT|flags,
+ winapi.FILE_OPEN_FOR_BACKUP_INTENT|winapi.FILE_SYNCHRONOUS_IO_NONALERT|flags,
nil,
0,
)
if status != 0 {
- return nil, rtlNtStatusToDosError(status)
+ return nil, winapi.RtlNtStatusToDosError(status)
}
fullPath, err := longpath.LongAbs(filepath.Join(root.Name(), path))
@@ -182,7 +125,7 @@ func LinkRelative(oldname string, oldroot *os.File, newname string, newroot *os.
oldroot,
syscall.FILE_WRITE_ATTRIBUTES,
syscall.FILE_SHARE_READ|syscall.FILE_SHARE_WRITE|syscall.FILE_SHARE_DELETE,
- FILE_OPEN,
+ winapi.FILE_OPEN,
0,
)
if err != nil {
@@ -199,8 +142,8 @@ func LinkRelative(oldname string, oldroot *os.File, newname string, newroot *os.
newroot,
syscall.GENERIC_READ,
syscall.FILE_SHARE_READ|syscall.FILE_SHARE_WRITE|syscall.FILE_SHARE_DELETE,
- FILE_OPEN,
- FILE_DIRECTORY_FILE)
+ winapi.FILE_OPEN,
+ winapi.FILE_DIRECTORY_FILE)
if err != nil {
return &os.LinkError{Op: "link", Old: oldf.Name(), New: filepath.Join(newroot.Name(), newname), Err: err}
}
@@ -211,7 +154,7 @@ func LinkRelative(oldname string, oldroot *os.File, newname string, newroot *os.
return err
}
if (fi.FileAttributes & syscall.FILE_ATTRIBUTE_REPARSE_POINT) != 0 {
- return &os.LinkError{Op: "link", Old: oldf.Name(), New: filepath.Join(newroot.Name(), newname), Err: rtlNtStatusToDosError(_STATUS_REPARSE_POINT_ENCOUNTERED)}
+ return &os.LinkError{Op: "link", Old: oldf.Name(), New: filepath.Join(newroot.Name(), newname), Err: winapi.RtlNtStatusToDosError(winapi.STATUS_REPARSE_POINT_ENCOUNTERED)}
}
} else {
@@ -227,24 +170,25 @@ func LinkRelative(oldname string, oldroot *os.File, newname string, newroot *os.
return err
}
- size := int(unsafe.Offsetof(fileLinkInformation{}.FileName)) + len(newbase16)*2
- linkinfoBuffer := localAlloc(0, size)
- defer localFree(linkinfoBuffer)
- linkinfo := (*fileLinkInformation)(unsafe.Pointer(linkinfoBuffer))
+ size := int(unsafe.Offsetof(winapi.FileLinkInformation{}.FileName)) + len(newbase16)*2
+ linkinfoBuffer := winapi.LocalAlloc(0, size)
+ defer winapi.LocalFree(linkinfoBuffer)
+
+ linkinfo := (*winapi.FileLinkInformation)(unsafe.Pointer(linkinfoBuffer))
linkinfo.RootDirectory = parent.Fd()
linkinfo.FileNameLength = uint32(len(newbase16) * 2)
copy((*[32768]uint16)(unsafe.Pointer(&linkinfo.FileName[0]))[:], newbase16)
- var iosb ioStatusBlock
- status := ntSetInformationFile(
+ var iosb winapi.IOStatusBlock
+ status := winapi.NtSetInformationFile(
oldf.Fd(),
&iosb,
linkinfoBuffer,
uint32(size),
- _FileLinkInformation,
+ winapi.FileLinkInformationClass,
)
if status != 0 {
- return &os.LinkError{Op: "link", Old: oldf.Name(), New: filepath.Join(parent.Name(), newbase), Err: rtlNtStatusToDosError(status)}
+ return &os.LinkError{Op: "link", Old: oldf.Name(), New: filepath.Join(parent.Name(), newbase), Err: winapi.RtlNtStatusToDosError(status)}
}
return nil
@@ -252,17 +196,17 @@ func LinkRelative(oldname string, oldroot *os.File, newname string, newroot *os.
// deleteOnClose marks a file to be deleted when the handle is closed.
func deleteOnClose(f *os.File) error {
- disposition := fileDispositionInformationEx{Flags: FILE_DISPOSITION_DELETE}
- var iosb ioStatusBlock
- status := ntSetInformationFile(
+ disposition := winapi.FileDispositionInformationEx{Flags: winapi.FILE_DISPOSITION_DELETE}
+ var iosb winapi.IOStatusBlock
+ status := winapi.NtSetInformationFile(
f.Fd(),
&iosb,
uintptr(unsafe.Pointer(&disposition)),
uint32(unsafe.Sizeof(disposition)),
- _FileDispositionInformationEx,
+ winapi.FileDispositionInformationExClass,
)
if status != 0 {
- return rtlNtStatusToDosError(status)
+ return winapi.RtlNtStatusToDosError(status)
}
return nil
}
@@ -291,10 +235,10 @@ func RemoveRelative(path string, root *os.File) error {
f, err := openRelativeInternal(
path,
root,
- FILE_READ_ATTRIBUTES|FILE_WRITE_ATTRIBUTES|DELETE,
+ winapi.FILE_READ_ATTRIBUTES|winapi.FILE_WRITE_ATTRIBUTES|winapi.DELETE,
syscall.FILE_SHARE_READ|syscall.FILE_SHARE_WRITE|syscall.FILE_SHARE_DELETE,
- FILE_OPEN,
- FILE_OPEN_REPARSE_POINT)
+ winapi.FILE_OPEN,
+ winapi.FILE_OPEN_REPARSE_POINT)
if err == nil {
defer f.Close()
err = deleteOnClose(f)
@@ -385,8 +329,8 @@ func MkdirRelative(path string, root *os.File) error {
root,
0,
syscall.FILE_SHARE_READ|syscall.FILE_SHARE_WRITE|syscall.FILE_SHARE_DELETE,
- FILE_CREATE,
- FILE_DIRECTORY_FILE)
+ winapi.FILE_CREATE,
+ winapi.FILE_DIRECTORY_FILE)
if err == nil {
f.Close()
} else {
@@ -401,10 +345,10 @@ func LstatRelative(path string, root *os.File) (os.FileInfo, error) {
f, err := openRelativeInternal(
path,
root,
- FILE_READ_ATTRIBUTES,
+ winapi.FILE_READ_ATTRIBUTES,
syscall.FILE_SHARE_READ|syscall.FILE_SHARE_WRITE|syscall.FILE_SHARE_DELETE,
- FILE_OPEN,
- FILE_OPEN_REPARSE_POINT)
+ winapi.FILE_OPEN,
+ winapi.FILE_OPEN_REPARSE_POINT)
if err != nil {
return nil, &os.PathError{Op: "stat", Path: filepath.Join(root.Name(), path), Err: err}
}
@@ -421,7 +365,7 @@ func EnsureNotReparsePointRelative(path string, root *os.File) error {
root,
0,
syscall.FILE_SHARE_READ|syscall.FILE_SHARE_WRITE|syscall.FILE_SHARE_DELETE,
- FILE_OPEN,
+ winapi.FILE_OPEN,
0)
if err != nil {
return err
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/safefile/zsyscall_windows.go b/vendor/github.com/Microsoft/hcsshim/internal/safefile/zsyscall_windows.go
deleted file mode 100644
index 709b9d347..000000000
--- a/vendor/github.com/Microsoft/hcsshim/internal/safefile/zsyscall_windows.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// Code generated by 'go generate'; DO NOT EDIT.
-
-package safefile
-
-import (
- "syscall"
- "unsafe"
-
- "golang.org/x/sys/windows"
-)
-
-var _ unsafe.Pointer
-
-// Do the interface allocations only once for common
-// Errno values.
-const (
- errnoERROR_IO_PENDING = 997
-)
-
-var (
- errERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING)
-)
-
-// errnoErr returns common boxed Errno values, to prevent
-// allocations at runtime.
-func errnoErr(e syscall.Errno) error {
- switch e {
- case 0:
- return nil
- case errnoERROR_IO_PENDING:
- return errERROR_IO_PENDING
- }
- // TODO: add more here, after collecting data on the common
- // error values see on Windows. (perhaps when running
- // all.bat?)
- return e
-}
-
-var (
- modntdll = windows.NewLazySystemDLL("ntdll.dll")
- modkernel32 = windows.NewLazySystemDLL("kernel32.dll")
-
- procNtCreateFile = modntdll.NewProc("NtCreateFile")
- procNtSetInformationFile = modntdll.NewProc("NtSetInformationFile")
- procRtlNtStatusToDosErrorNoTeb = modntdll.NewProc("RtlNtStatusToDosErrorNoTeb")
- procLocalAlloc = modkernel32.NewProc("LocalAlloc")
- procLocalFree = modkernel32.NewProc("LocalFree")
-)
-
-func ntCreateFile(handle *uintptr, accessMask uint32, oa *objectAttributes, iosb *ioStatusBlock, allocationSize *uint64, fileAttributes uint32, shareAccess uint32, createDisposition uint32, createOptions uint32, eaBuffer *byte, eaLength uint32) (status uint32) {
- r0, _, _ := syscall.Syscall12(procNtCreateFile.Addr(), 11, uintptr(unsafe.Pointer(handle)), uintptr(accessMask), uintptr(unsafe.Pointer(oa)), uintptr(unsafe.Pointer(iosb)), uintptr(unsafe.Pointer(allocationSize)), uintptr(fileAttributes), uintptr(shareAccess), uintptr(createDisposition), uintptr(createOptions), uintptr(unsafe.Pointer(eaBuffer)), uintptr(eaLength), 0)
- status = uint32(r0)
- return
-}
-
-func ntSetInformationFile(handle uintptr, iosb *ioStatusBlock, information uintptr, length uint32, class uint32) (status uint32) {
- r0, _, _ := syscall.Syscall6(procNtSetInformationFile.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(iosb)), uintptr(information), uintptr(length), uintptr(class), 0)
- status = uint32(r0)
- return
-}
-
-func rtlNtStatusToDosError(status uint32) (winerr error) {
- r0, _, _ := syscall.Syscall(procRtlNtStatusToDosErrorNoTeb.Addr(), 1, uintptr(status), 0, 0)
- if r0 != 0 {
- winerr = syscall.Errno(r0)
- }
- return
-}
-
-func localAlloc(flags uint32, size int) (ptr uintptr) {
- r0, _, _ := syscall.Syscall(procLocalAlloc.Addr(), 2, uintptr(flags), uintptr(size), 0)
- ptr = uintptr(r0)
- return
-}
-
-func localFree(ptr uintptr) {
- syscall.Syscall(procLocalFree.Addr(), 1, uintptr(ptr), 0, 0)
- return
-}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema1/schema1.go b/vendor/github.com/Microsoft/hcsshim/internal/schema1/schema1.go
index fb23617f5..24bb3b46b 100644
--- a/vendor/github.com/Microsoft/hcsshim/internal/schema1/schema1.go
+++ b/vendor/github.com/Microsoft/hcsshim/internal/schema1/schema1.go
@@ -214,9 +214,10 @@ type MappedVirtualDiskController struct {
// GuestDefinedCapabilities is part of the GuestConnectionInfo returned by a GuestConnection call on a utility VM
type GuestDefinedCapabilities struct {
- NamespaceAddRequestSupported bool `json:",omitempty"`
- SignalProcessSupported bool `json:",omitempty"`
- DumpStacksSupported bool `json:",omitempty"`
+ NamespaceAddRequestSupported bool `json:",omitempty"`
+ SignalProcessSupported bool `json:",omitempty"`
+ DumpStacksSupported bool `json:",omitempty"`
+ DeleteContainerStateSupported bool `json:",omitempty"`
}
// GuestConnectionInfo is the structure of an iterm return by a GuestConnection call on a utility VM
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/container_credential_guard_add_instance_request.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/container_credential_guard_add_instance_request.go
new file mode 100644
index 000000000..495c6ebc8
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/container_credential_guard_add_instance_request.go
@@ -0,0 +1,16 @@
+/*
+ * HCS API
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 2.4
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package hcsschema
+
+type ContainerCredentialGuardAddInstanceRequest struct {
+ Id string `json:"Id,omitempty"`
+ CredentialSpec string `json:"CredentialSpec,omitempty"`
+ Transport string `json:"Transport,omitempty"`
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/container_credential_guard_hv_socket_service_config.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/container_credential_guard_hv_socket_service_config.go
new file mode 100644
index 000000000..1ed4c008f
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/container_credential_guard_hv_socket_service_config.go
@@ -0,0 +1,15 @@
+/*
+ * HCS API
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 2.4
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package hcsschema
+
+type ContainerCredentialGuardHvSocketServiceConfig struct {
+ ServiceId string `json:"ServiceId,omitempty"`
+ ServiceConfig *HvSocketServiceConfig `json:"ServiceConfig,omitempty"`
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/container_credential_guard_instance.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/container_credential_guard_instance.go
new file mode 100644
index 000000000..d7ebd0fcc
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/container_credential_guard_instance.go
@@ -0,0 +1,16 @@
+/*
+ * HCS API
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 2.4
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package hcsschema
+
+type ContainerCredentialGuardInstance struct {
+ Id string `json:"Id,omitempty"`
+ CredentialGuard *ContainerCredentialGuardState `json:"CredentialGuard,omitempty"`
+ HvSocketConfig *ContainerCredentialGuardHvSocketServiceConfig `json:"HvSocketConfig,omitempty"`
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/container_credential_guard_modify_operation.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/container_credential_guard_modify_operation.go
new file mode 100644
index 000000000..71005b090
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/container_credential_guard_modify_operation.go
@@ -0,0 +1,17 @@
+/*
+ * HCS API
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 2.4
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package hcsschema
+
+type ContainerCredentialGuardModifyOperation string
+
+const (
+ AddInstance ContainerCredentialGuardModifyOperation = "AddInstance"
+ RemoveInstance ContainerCredentialGuardModifyOperation = "RemoveInstance"
+)
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/container_credential_guard_operation_request.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/container_credential_guard_operation_request.go
new file mode 100644
index 000000000..952cda496
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/container_credential_guard_operation_request.go
@@ -0,0 +1,15 @@
+/*
+ * HCS API
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 2.4
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package hcsschema
+
+type ContainerCredentialGuardOperationRequest struct {
+ Operation ContainerCredentialGuardModifyOperation `json:"Operation,omitempty"`
+ OperationDetails interface{} `json:"OperationDetails,omitempty"`
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/container_credential_guard_remove_instance_request.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/container_credential_guard_remove_instance_request.go
new file mode 100644
index 000000000..32e5a3bee
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/container_credential_guard_remove_instance_request.go
@@ -0,0 +1,14 @@
+/*
+ * HCS API
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 2.4
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package hcsschema
+
+type ContainerCredentialGuardRemoveInstanceRequest struct {
+ Id string `json:"Id,omitempty"`
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/container_credential_guard_system_info.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/container_credential_guard_system_info.go
new file mode 100644
index 000000000..ea306fa21
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/container_credential_guard_system_info.go
@@ -0,0 +1,14 @@
+/*
+ * HCS API
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 2.4
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package hcsschema
+
+type ContainerCredentialGuardSystemInfo struct {
+ Instances []ContainerCredentialGuardInstance `json:"Instances,omitempty"`
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/cpu_group.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/cpu_group.go
new file mode 100644
index 000000000..90332a519
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/cpu_group.go
@@ -0,0 +1,15 @@
+/*
+ * HCS API
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 2.4
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package hcsschema
+
+// CPU groups allow Hyper-V administrators to better manage and allocate the host's CPU resources across guest virtual machines
+type CpuGroup struct {
+ Id string `json:"Id,omitempty"`
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/cpu_group_affinity.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/cpu_group_affinity.go
new file mode 100644
index 000000000..8794961bf
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/cpu_group_affinity.go
@@ -0,0 +1,15 @@
+/*
+ * HCS API
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 2.4
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package hcsschema
+
+type CpuGroupAffinity struct {
+ LogicalProcessorCount int32 `json:"LogicalProcessorCount,omitempty"`
+ LogicalProcessors []int32 `json:"LogicalProcessors,omitempty"`
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/cpu_group_config.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/cpu_group_config.go
new file mode 100644
index 000000000..f1a28cd38
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/cpu_group_config.go
@@ -0,0 +1,18 @@
+/*
+ * HCS API
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 2.4
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package hcsschema
+
+type CpuGroupConfig struct {
+ GroupId string `json:"GroupId,omitempty"`
+ Affinity *CpuGroupAffinity `json:"Affinity,omitempty"`
+ GroupProperties []CpuGroupProperty `json:"GroupProperties,omitempty"`
+ // Hypervisor CPU group IDs exposed to clients
+ HypervisorGroupId int32 `json:"HypervisorGroupId,omitempty"`
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/cpu_group_configurations.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/cpu_group_configurations.go
new file mode 100644
index 000000000..3ace0ccc3
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/cpu_group_configurations.go
@@ -0,0 +1,15 @@
+/*
+ * HCS API
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 2.4
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package hcsschema
+
+// Structure used to return cpu groups for a Service property query
+type CpuGroupConfigurations struct {
+ CpuGroups []CpuGroupConfig `json:"CpuGroups,omitempty"`
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/cpu_group_operations.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/cpu_group_operations.go
new file mode 100644
index 000000000..7d8978070
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/cpu_group_operations.go
@@ -0,0 +1,18 @@
+/*
+ * HCS API
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 2.4
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package hcsschema
+
+type CPUGroupOperation string
+
+const (
+ CreateGroup CPUGroupOperation = "CreateGroup"
+ DeleteGroup CPUGroupOperation = "DeleteGroup"
+ SetProperty CPUGroupOperation = "SetProperty"
+)
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/cpu_group_property.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/cpu_group_property.go
new file mode 100644
index 000000000..bbad6a2c4
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/cpu_group_property.go
@@ -0,0 +1,15 @@
+/*
+ * HCS API
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 2.4
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package hcsschema
+
+type CpuGroupProperty struct {
+ PropertyCode uint32 `json:"PropertyCode,omitempty"`
+ PropertyValue uint32 `json:"PropertyValue,omitempty"`
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/create_group_operation.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/create_group_operation.go
new file mode 100644
index 000000000..91a8278fe
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/create_group_operation.go
@@ -0,0 +1,17 @@
+/*
+ * HCS API
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 2.4
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package hcsschema
+
+// Create group operation settings
+type CreateGroupOperation struct {
+ GroupId string `json:"GroupId,omitempty"`
+ LogicalProcessorCount uint32 `json:"LogicalProcessorCount,omitempty"`
+ LogicalProcessors []uint32 `json:"LogicalProcessors,omitempty"`
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/delete_group_operation.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/delete_group_operation.go
new file mode 100644
index 000000000..134bd9881
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/delete_group_operation.go
@@ -0,0 +1,15 @@
+/*
+ * HCS API
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 2.4
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package hcsschema
+
+// Delete group operation settings
+type DeleteGroupOperation struct {
+ GroupId string `json:"GroupId,omitempty"`
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/device.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/device.go
index ca319bbbc..0b9c0fbf7 100644
--- a/vendor/github.com/Microsoft/hcsshim/internal/schema2/device.go
+++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/device.go
@@ -9,8 +9,19 @@
package hcsschema
-type Device struct {
+type DeviceType string
+
+const (
+ ClassGUID DeviceType = "ClassGuid"
+ DeviceInstance = "DeviceInstance"
+ GPUMirror = "GpuMirror"
+)
- // The interface class guid of the device to assign to container.
+type Device struct {
+ // The type of device to assign to the container.
+ Type DeviceType `json:"Type,omitempty"`
+ // The interface class guid of the device interfaces to assign to the container. Only used when Type is ClassGuid.
InterfaceClassGuid string `json:"InterfaceClassGuid,omitempty"`
+ // The location path of the device to assign to the container. Only used when Type is DeviceInstance.
+ LocationPath string `json:"LocationPath,omitempty"`
}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/devices.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/devices.go
index 781a88401..e985d96d2 100644
--- a/vendor/github.com/Microsoft/hcsshim/internal/schema2/devices.go
+++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/devices.go
@@ -39,4 +39,8 @@ type Devices struct {
FlexibleIov map[string]FlexibleIoDevice `json:"FlexibleIov,omitempty"`
SharedMemory *SharedMemoryConfiguration `json:"SharedMemory,omitempty"`
+
+ // TODO: This is pre-release support in schema 2.3. Need to add build number
+ // docs when a public build with this is out.
+ VirtualPci map[string]VirtualPciDevice `json:",omitempty"`
}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/host_processor_modify_request.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/host_processor_modify_request.go
new file mode 100644
index 000000000..2238ce530
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/host_processor_modify_request.go
@@ -0,0 +1,16 @@
+/*
+ * HCS API
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 2.4
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package hcsschema
+
+// Structure used to request a service processor modification
+type HostProcessorModificationRequest struct {
+ Operation CPUGroupOperation `json:"Operation,omitempty"`
+ OperationDetails interface{} `json:"OperationDetails,omitempty"`
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/hv_socket_address.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/hv_socket_address.go
new file mode 100644
index 000000000..84c11b93e
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/hv_socket_address.go
@@ -0,0 +1,17 @@
+/*
+ * HCS API
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 2.4
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package hcsschema
+
+// This class defines address settings applied to a VM
+// by the GCS every time a VM starts or restores.
+type HvSocketAddress struct {
+ LocalAddress string `json:"LocalAddress,omitempty"`
+ ParentAddress string `json:"ParentAddress,omitempty"`
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/hv_socket_service_config.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/hv_socket_service_config.go
index a848e91e6..ecd9f7fba 100644
--- a/vendor/github.com/Microsoft/hcsshim/internal/schema2/hv_socket_service_config.go
+++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/hv_socket_service_config.go
@@ -19,4 +19,10 @@ type HvSocketServiceConfig struct {
// If true, HvSocket will process wildcard binds for this service/system combination. Wildcard binds are secured in the registry at SOFTWARE/Microsoft/Windows NT/CurrentVersion/Virtualization/HvSocket/WildcardDescriptors
AllowWildcardBinds bool `json:"AllowWildcardBinds,omitempty"`
+
+ // Disabled controls whether the HvSocket service is accepting connection requests.
+ // This set to true will make the service refuse all incoming connections as well as cancel
+ // any connections already established. The service itself will still be active however
+ // and can be re-enabled at a future time.
+ Disabled bool `json:"Disabled,omitempty"`
}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/logical_processor.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/logical_processor.go
new file mode 100644
index 000000000..676ad300d
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/logical_processor.go
@@ -0,0 +1,18 @@
+/*
+ * HCS API
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 2.4
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package hcsschema
+
+type LogicalProcessor struct {
+ LpIndex uint32 `json:"LpIndex,omitempty"`
+ NodeNumber uint8 `json:"NodeNumber, omitempty"`
+ PackageId uint32 `json:"PackageId, omitempty"`
+ CoreId uint32 `json:"CoreId, omitempty"`
+ RootVpIndex int32 `json:"RootVpIndex, omitempty"`
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/memory.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/memory.go
index ec93d004e..30749c672 100644
--- a/vendor/github.com/Microsoft/hcsshim/internal/schema2/memory.go
+++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/memory.go
@@ -10,5 +10,5 @@
package hcsschema
type Memory struct {
- SizeInMB int32 `json:"SizeInMB,omitempty"`
+ SizeInMB uint64 `json:"SizeInMB,omitempty"`
}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/memory_2.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/memory_2.go
index b4a36954d..71224c75b 100644
--- a/vendor/github.com/Microsoft/hcsshim/internal/schema2/memory_2.go
+++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/memory_2.go
@@ -10,7 +10,7 @@
package hcsschema
type Memory2 struct {
- SizeInMB int32 `json:"SizeInMB,omitempty"`
+ SizeInMB uint64 `json:"SizeInMB,omitempty"`
AllowOvercommit bool `json:"AllowOvercommit,omitempty"`
@@ -27,4 +27,23 @@ type Memory2 struct {
// to the VM, allowing it to trim non-zeroed pages from the working set (if supported by
// the guest operating system).
EnableColdDiscardHint bool `json:"EnableColdDiscardHint,omitempty"`
+
+ // LowMmioGapInMB is the low MMIO region allocated below 4GB.
+ //
+ // TODO: This is pre-release support in schema 2.3. Need to add build number
+ // docs when a public build with this is out.
+ LowMMIOGapInMB uint64 `json:"LowMmioGapInMB,omitempty"`
+
+ // HighMmioBaseInMB is the high MMIO region allocated above 4GB (base and
+ // size).
+ //
+ // TODO: This is pre-release support in schema 2.3. Need to add build number
+ // docs when a public build with this is out.
+ HighMMIOBaseInMB uint64 `json:"HighMmioBaseInMB,omitempty"`
+
+ // HighMmioGapInMB is the high MMIO region.
+ //
+ // TODO: This is pre-release support in schema 2.3. Need to add build number
+ // docs when a public build with this is out.
+ HighMMIOGapInMB uint64 `json:"HighMmioGapInMB,omitempty"`
}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/modification_request.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/modification_request.go
new file mode 100644
index 000000000..1384ed888
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/modification_request.go
@@ -0,0 +1,15 @@
+/*
+ * HCS API
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 2.4
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package hcsschema
+
+type ModificationRequest struct {
+ PropertyType PropertyType `json:"PropertyType,omitempty"`
+ Settings interface{} `json:"Settings,omitempty"`
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/processor_topology.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/processor_topology.go
new file mode 100644
index 000000000..885156e77
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/processor_topology.go
@@ -0,0 +1,15 @@
+/*
+ * HCS API
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 2.4
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package hcsschema
+
+type ProcessorTopology struct {
+ LogicalProcessorCount uint32 `json:"LogicalProcessorCount,omitempty"`
+ LogicalProcessors []LogicalProcessor `json:"LogicalProcessors,omitempty"`
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/property_type.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/property_type.go
index f092b737f..98f2c96ed 100644
--- a/vendor/github.com/Microsoft/hcsshim/internal/schema2/property_type.go
+++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/property_type.go
@@ -18,6 +18,9 @@ const (
PTProcessList PropertyType = "ProcessList"
PTTerminateOnLastHandleClosed PropertyType = "TerminateOnLastHandleClosed"
PTSharedMemoryRegion PropertyType = "SharedMemoryRegion"
+ PTContainerCredentialGuard PropertyType = "ContainerCredentialGuard" // This field is not generated by swagger. This was added manually.
PTGuestConnection PropertyType = "GuestConnection"
PTICHeartbeatStatus PropertyType = "ICHeartbeatStatus"
+ PTProcessorTopology PropertyType = "ProcessorTopology"
+ PTCPUGroup PropertyType = "CpuGroup"
)
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/service_properties.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/service_properties.go
new file mode 100644
index 000000000..b8142ca6a
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/service_properties.go
@@ -0,0 +1,18 @@
+/*
+ * HCS API
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 2.4
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package hcsschema
+
+import "encoding/json"
+
+type ServiceProperties struct {
+ // Changed Properties field to []json.RawMessage from []interface{} to avoid having to
+ // remarshal sp.Properties[n] and unmarshal into the type(s) we want.
+ Properties []json.RawMessage `json:"Properties,omitempty"`
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/virtual_pci_device.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/virtual_pci_device.go
new file mode 100644
index 000000000..f5e05903c
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/virtual_pci_device.go
@@ -0,0 +1,16 @@
+/*
+ * HCS API
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 2.3
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package hcsschema
+
+// TODO: This is pre-release support in schema 2.3. Need to add build number
+// docs when a public build with this is out.
+type VirtualPciDevice struct {
+ Functions []VirtualPciFunction `json:",omitempty"`
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/virtual_pci_function.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/virtual_pci_function.go
new file mode 100644
index 000000000..cedb7d18b
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/virtual_pci_function.go
@@ -0,0 +1,18 @@
+/*
+ * HCS API
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 2.3
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package hcsschema
+
+// TODO: This is pre-release support in schema 2.3. Need to add build number
+// docs when a public build with this is out.
+type VirtualPciFunction struct {
+ DeviceInstancePath string `json:",omitempty"`
+
+ VirtualFunction uint16 `json:",omitempty"`
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/vm_processor_limits.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/vm_processor_limits.go
new file mode 100644
index 000000000..de1b9cf1a
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/vm_processor_limits.go
@@ -0,0 +1,22 @@
+/*
+ * HCS API
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 2.4
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package hcsschema
+
+// ProcessorLimits is used when modifying processor scheduling limits of a virtual machine.
+type ProcessorLimits struct {
+ // Maximum amount of host CPU resources that the virtual machine can use.
+ Limit uint64 `json:"Limit,omitempty"`
+ // Value describing the relative priority of this virtual machine compared to other virtual machines.
+ Weight uint64 `json:"Weight,omitempty"`
+ // Minimum amount of host CPU resources that the virtual machine is guaranteed.
+ Reservation uint64 `json:"Reservation,omitempty"`
+ // Provides the target maximum CPU frequency, in MHz, for a virtual machine.
+ MaximumFrequencyMHz uint32 `json:"MaximumFrequencyMHz,omitempty"`
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/vmcompute/vmcompute.go b/vendor/github.com/Microsoft/hcsshim/internal/vmcompute/vmcompute.go
index 7c2a0dc28..e42bf8cfa 100644
--- a/vendor/github.com/Microsoft/hcsshim/internal/vmcompute/vmcompute.go
+++ b/vendor/github.com/Microsoft/hcsshim/internal/vmcompute/vmcompute.go
@@ -26,6 +26,7 @@ import (
//sys hcsResumeComputeSystem(computeSystem HcsSystem, options string, result **uint16) (hr error) = vmcompute.HcsResumeComputeSystem?
//sys hcsGetComputeSystemProperties(computeSystem HcsSystem, propertyQuery string, properties **uint16, result **uint16) (hr error) = vmcompute.HcsGetComputeSystemProperties?
//sys hcsModifyComputeSystem(computeSystem HcsSystem, configuration string, result **uint16) (hr error) = vmcompute.HcsModifyComputeSystem?
+//sys hcsModifyServiceSettings(settings string, result **uint16) (hr error) = vmcompute.HcsModifyServiceSettings?
//sys hcsRegisterComputeSystemCallback(computeSystem HcsSystem, callback uintptr, context uintptr, callbackHandle *HcsCallback) (hr error) = vmcompute.HcsRegisterComputeSystemCallback?
//sys hcsUnregisterComputeSystemCallback(callbackHandle HcsCallback) (hr error) = vmcompute.HcsUnregisterComputeSystemCallback?
@@ -337,6 +338,27 @@ func HcsModifyComputeSystem(ctx gcontext.Context, computeSystem HcsSystem, confi
})
}
+func HcsModifyServiceSettings(ctx gcontext.Context, settings string) (result string, hr error) {
+ ctx, span := trace.StartSpan(ctx, "HcsModifyServiceSettings")
+ defer span.End()
+ defer func() {
+ if result != "" {
+ span.AddAttributes(trace.StringAttribute("result", result))
+ }
+ oc.SetSpanStatus(span, hr)
+ }()
+ span.AddAttributes(trace.StringAttribute("settings", settings))
+
+ return result, execute(ctx, timeout.SyscallWatcher, func() error {
+ var resultp *uint16
+ err := hcsModifyServiceSettings(settings, &resultp)
+ if resultp != nil {
+ result = interop.ConvertAndFreeCoTaskMemString(resultp)
+ }
+ return err
+ })
+}
+
func HcsRegisterComputeSystemCallback(ctx gcontext.Context, computeSystem HcsSystem, callback uintptr, context uintptr) (callbackHandle HcsCallback, hr error) {
ctx, span := trace.StartSpan(ctx, "HcsRegisterComputeSystemCallback")
defer span.End()
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/vmcompute/zsyscall_windows.go b/vendor/github.com/Microsoft/hcsshim/internal/vmcompute/zsyscall_windows.go
index 0f2a69f6a..8cfded496 100644
--- a/vendor/github.com/Microsoft/hcsshim/internal/vmcompute/zsyscall_windows.go
+++ b/vendor/github.com/Microsoft/hcsshim/internal/vmcompute/zsyscall_windows.go
@@ -50,6 +50,7 @@ var (
procHcsResumeComputeSystem = modvmcompute.NewProc("HcsResumeComputeSystem")
procHcsGetComputeSystemProperties = modvmcompute.NewProc("HcsGetComputeSystemProperties")
procHcsModifyComputeSystem = modvmcompute.NewProc("HcsModifyComputeSystem")
+ procHcsModifyServiceSettings = modvmcompute.NewProc("HcsModifyServiceSettings")
procHcsRegisterComputeSystemCallback = modvmcompute.NewProc("HcsRegisterComputeSystemCallback")
procHcsUnregisterComputeSystemCallback = modvmcompute.NewProc("HcsUnregisterComputeSystemCallback")
procHcsCreateProcess = modvmcompute.NewProc("HcsCreateProcess")
@@ -314,6 +315,29 @@ func _hcsModifyComputeSystem(computeSystem HcsSystem, configuration *uint16, res
return
}
+func hcsModifyServiceSettings(settings string, result **uint16) (hr error) {
+ var _p0 *uint16
+ _p0, hr = syscall.UTF16PtrFromString(settings)
+ if hr != nil {
+ return
+ }
+ return _hcsModifyServiceSettings(_p0, result)
+}
+
+func _hcsModifyServiceSettings(settings *uint16, result **uint16) (hr error) {
+ if hr = procHcsModifyServiceSettings.Find(); hr != nil {
+ return
+ }
+ r0, _, _ := syscall.Syscall(procHcsModifyServiceSettings.Addr(), 2, uintptr(unsafe.Pointer(settings)), uintptr(unsafe.Pointer(result)), 0)
+ if int32(r0) < 0 {
+ if r0&0x1fff0000 == 0x00070000 {
+ r0 &= 0xffff
+ }
+ hr = syscall.Errno(r0)
+ }
+ return
+}
+
func hcsRegisterComputeSystemCallback(computeSystem HcsSystem, callback uintptr, context uintptr, callbackHandle *HcsCallback) (hr error) {
if hr = procHcsRegisterComputeSystemCallback.Find(); hr != nil {
return
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/activatelayer.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/activatelayer.go
index dcb919268..81e454956 100644
--- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/activatelayer.go
+++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/activatelayer.go
@@ -1,28 +1,23 @@
package wclayer
import (
+ "context"
+
"github.com/Microsoft/hcsshim/internal/hcserror"
- "github.com/sirupsen/logrus"
+ "github.com/Microsoft/hcsshim/internal/oc"
+ "go.opencensus.io/trace"
)
// ActivateLayer will find the layer with the given id and mount it's filesystem.
// For a read/write layer, the mounted filesystem will appear as a volume on the
// host, while a read-only layer is generally expected to be a no-op.
// An activated layer must later be deactivated via DeactivateLayer.
-func ActivateLayer(path string) (err error) {
+func ActivateLayer(ctx context.Context, path string) (err error) {
title := "hcsshim::ActivateLayer"
- fields := logrus.Fields{
- "path": path,
- }
- logrus.WithFields(fields).Debug(title)
- defer func() {
- if err != nil {
- fields[logrus.ErrorKey] = err
- logrus.WithFields(fields).Error(err)
- } else {
- logrus.WithFields(fields).Debug(title + " - succeeded")
- }
- }()
+ ctx, span := trace.StartSpan(ctx, title)
+ defer span.End()
+ defer func() { oc.SetSpanStatus(span, err) }()
+ span.AddAttributes(trace.StringAttribute("path", path))
err = activateLayer(&stdDriverInfo, path)
if err != nil {
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/baselayer.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/baselayer.go
index 5784241df..3ec708d1e 100644
--- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/baselayer.go
+++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/baselayer.go
@@ -1,6 +1,7 @@
package wclayer
import (
+ "context"
"errors"
"os"
"path/filepath"
@@ -8,10 +9,16 @@ import (
"github.com/Microsoft/go-winio"
"github.com/Microsoft/hcsshim/internal/hcserror"
+ "github.com/Microsoft/hcsshim/internal/oc"
"github.com/Microsoft/hcsshim/internal/safefile"
+ "github.com/Microsoft/hcsshim/internal/winapi"
+ "go.opencensus.io/trace"
)
type baseLayerWriter struct {
+ ctx context.Context
+ s *trace.Span
+
root *os.File
f *os.File
bw *winio.BackupFileWriter
@@ -31,7 +38,7 @@ type dirInfo struct {
func reapplyDirectoryTimes(root *os.File, dis []dirInfo) error {
for i := range dis {
di := &dis[len(dis)-i-1] // reverse order: process child directories first
- f, err := safefile.OpenRelative(di.path, root, syscall.GENERIC_READ|syscall.GENERIC_WRITE, syscall.FILE_SHARE_READ, safefile.FILE_OPEN, safefile.FILE_DIRECTORY_FILE)
+ f, err := safefile.OpenRelative(di.path, root, syscall.GENERIC_READ|syscall.GENERIC_WRITE, syscall.FILE_SHARE_READ, winapi.FILE_OPEN, winapi.FILE_DIRECTORY_FILE|syscall.FILE_FLAG_OPEN_REPARSE_POINT)
if err != nil {
return err
}
@@ -41,6 +48,7 @@ func reapplyDirectoryTimes(root *os.File, dis []dirInfo) error {
if err != nil {
return err
}
+
}
return nil
}
@@ -86,14 +94,12 @@ func (w *baseLayerWriter) Add(name string, fileInfo *winio.FileBasicInfo) (err e
extraFlags := uint32(0)
if fileInfo.FileAttributes&syscall.FILE_ATTRIBUTE_DIRECTORY != 0 {
- extraFlags |= safefile.FILE_DIRECTORY_FILE
- if fileInfo.FileAttributes&syscall.FILE_ATTRIBUTE_REPARSE_POINT == 0 {
- w.dirInfo = append(w.dirInfo, dirInfo{name, *fileInfo})
- }
+ extraFlags |= winapi.FILE_DIRECTORY_FILE
+ w.dirInfo = append(w.dirInfo, dirInfo{name, *fileInfo})
}
mode := uint32(syscall.GENERIC_READ | syscall.GENERIC_WRITE | winio.WRITE_DAC | winio.WRITE_OWNER | winio.ACCESS_SYSTEM_SECURITY)
- f, err = safefile.OpenRelative(name, w.root, mode, syscall.FILE_SHARE_READ, safefile.FILE_CREATE, extraFlags)
+ f, err = safefile.OpenRelative(name, w.root, mode, syscall.FILE_SHARE_READ, winapi.FILE_CREATE, extraFlags)
if err != nil {
return hcserror.New(err, "Failed to safefile.OpenRelative", name)
}
@@ -136,12 +142,15 @@ func (w *baseLayerWriter) Write(b []byte) (int, error) {
return n, err
}
-func (w *baseLayerWriter) Close() error {
+func (w *baseLayerWriter) Close() (err error) {
+ defer w.s.End()
+ defer func() { oc.SetSpanStatus(w.s, err) }()
defer func() {
w.root.Close()
w.root = nil
}()
- err := w.closeCurrentFile()
+
+ err = w.closeCurrentFile()
if err != nil {
return err
}
@@ -153,7 +162,7 @@ func (w *baseLayerWriter) Close() error {
return err
}
- err = ProcessBaseLayer(w.root.Name())
+ err = ProcessBaseLayer(w.ctx, w.root.Name())
if err != nil {
return err
}
@@ -163,7 +172,7 @@ func (w *baseLayerWriter) Close() error {
if err != nil {
return err
}
- err = ProcessUtilityVMImage(filepath.Join(w.root.Name(), "UtilityVM"))
+ err = ProcessUtilityVMImage(w.ctx, filepath.Join(w.root.Name(), "UtilityVM"))
if err != nil {
return err
}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/createlayer.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/createlayer.go
index be2bc3fd6..41e5e6731 100644
--- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/createlayer.go
+++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/createlayer.go
@@ -1,27 +1,23 @@
package wclayer
import (
+ "context"
+
"github.com/Microsoft/hcsshim/internal/hcserror"
- "github.com/sirupsen/logrus"
+ "github.com/Microsoft/hcsshim/internal/oc"
+ "go.opencensus.io/trace"
)
// CreateLayer creates a new, empty, read-only layer on the filesystem based on
// the parent layer provided.
-func CreateLayer(path, parent string) (err error) {
+func CreateLayer(ctx context.Context, path, parent string) (err error) {
title := "hcsshim::CreateLayer"
- fields := logrus.Fields{
- "parent": parent,
- "path": path,
- }
- logrus.WithFields(fields).Debug(title)
- defer func() {
- if err != nil {
- fields[logrus.ErrorKey] = err
- logrus.WithFields(fields).Error(err)
- } else {
- logrus.WithFields(fields).Debug(title + " - succeeded")
- }
- }()
+ ctx, span := trace.StartSpan(ctx, title)
+ defer span.End()
+ defer func() { oc.SetSpanStatus(span, err) }()
+ span.AddAttributes(
+ trace.StringAttribute("path", path),
+ trace.StringAttribute("parent", parent))
err = createLayer(&stdDriverInfo, path, parent)
if err != nil {
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/createscratchlayer.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/createscratchlayer.go
index 7e3351289..5a3809ae2 100644
--- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/createscratchlayer.go
+++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/createscratchlayer.go
@@ -1,31 +1,27 @@
package wclayer
import (
+ "context"
+ "strings"
+
"github.com/Microsoft/hcsshim/internal/hcserror"
- "github.com/sirupsen/logrus"
+ "github.com/Microsoft/hcsshim/internal/oc"
+ "go.opencensus.io/trace"
)
// CreateScratchLayer creates and populates new read-write layer for use by a container.
-// This requires both the id of the direct parent layer, as well as the full list
-// of paths to all parent layers up to the base (and including the direct parent
-// whose id was provided).
-func CreateScratchLayer(path string, parentLayerPaths []string) (err error) {
+// This requires the full list of paths to all parent layers up to the base
+func CreateScratchLayer(ctx context.Context, path string, parentLayerPaths []string) (err error) {
title := "hcsshim::CreateScratchLayer"
- fields := logrus.Fields{
- "path": path,
- }
- logrus.WithFields(fields).Debug(title)
- defer func() {
- if err != nil {
- fields[logrus.ErrorKey] = err
- logrus.WithFields(fields).Error(err)
- } else {
- logrus.WithFields(fields).Debug(title + " - succeeded")
- }
- }()
+ ctx, span := trace.StartSpan(ctx, title)
+ defer span.End()
+ defer func() { oc.SetSpanStatus(span, err) }()
+ span.AddAttributes(
+ trace.StringAttribute("path", path),
+ trace.StringAttribute("parentLayerPaths", strings.Join(parentLayerPaths, ", ")))
// Generate layer descriptors
- layers, err := layerPathsToDescriptors(parentLayerPaths)
+ layers, err := layerPathsToDescriptors(ctx, parentLayerPaths)
if err != nil {
return err
}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/deactivatelayer.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/deactivatelayer.go
index 2dd5d5715..70a711cf5 100644
--- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/deactivatelayer.go
+++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/deactivatelayer.go
@@ -1,25 +1,20 @@
package wclayer
import (
+ "context"
+
"github.com/Microsoft/hcsshim/internal/hcserror"
- "github.com/sirupsen/logrus"
+ "github.com/Microsoft/hcsshim/internal/oc"
+ "go.opencensus.io/trace"
)
// DeactivateLayer will dismount a layer that was mounted via ActivateLayer.
-func DeactivateLayer(path string) (err error) {
+func DeactivateLayer(ctx context.Context, path string) (err error) {
title := "hcsshim::DeactivateLayer"
- fields := logrus.Fields{
- "path": path,
- }
- logrus.WithFields(fields).Debug(title)
- defer func() {
- if err != nil {
- fields[logrus.ErrorKey] = err
- logrus.WithFields(fields).Error(err)
- } else {
- logrus.WithFields(fields).Debug(title + " - succeeded")
- }
- }()
+ ctx, span := trace.StartSpan(ctx, title)
+ defer span.End()
+ defer func() { oc.SetSpanStatus(span, err) }()
+ span.AddAttributes(trace.StringAttribute("path", path))
err = deactivateLayer(&stdDriverInfo, path)
if err != nil {
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/destroylayer.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/destroylayer.go
index 4da690c20..bf197e3b0 100644
--- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/destroylayer.go
+++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/destroylayer.go
@@ -1,26 +1,21 @@
package wclayer
import (
+ "context"
+
"github.com/Microsoft/hcsshim/internal/hcserror"
- "github.com/sirupsen/logrus"
+ "github.com/Microsoft/hcsshim/internal/oc"
+ "go.opencensus.io/trace"
)
// DestroyLayer will remove the on-disk files representing the layer with the given
// path, including that layer's containing folder, if any.
-func DestroyLayer(path string) (err error) {
+func DestroyLayer(ctx context.Context, path string) (err error) {
title := "hcsshim::DestroyLayer"
- fields := logrus.Fields{
- "path": path,
- }
- logrus.WithFields(fields).Debug(title)
- defer func() {
- if err != nil {
- fields[logrus.ErrorKey] = err
- logrus.WithFields(fields).Error(err)
- } else {
- logrus.WithFields(fields).Debug(title + " - succeeded")
- }
- }()
+ ctx, span := trace.StartSpan(ctx, title)
+ defer span.End()
+ defer func() { oc.SetSpanStatus(span, err) }()
+ span.AddAttributes(trace.StringAttribute("path", path))
err = destroyLayer(&stdDriverInfo, path)
if err != nil {
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/expandscratchsize.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/expandscratchsize.go
index b3b431e35..93f27da8a 100644
--- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/expandscratchsize.go
+++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/expandscratchsize.go
@@ -1,32 +1,27 @@
package wclayer
import (
+ "context"
"os"
"path/filepath"
"syscall"
"unsafe"
"github.com/Microsoft/hcsshim/internal/hcserror"
+ "github.com/Microsoft/hcsshim/internal/oc"
"github.com/Microsoft/hcsshim/osversion"
- "github.com/sirupsen/logrus"
+ "go.opencensus.io/trace"
)
// ExpandScratchSize expands the size of a layer to at least size bytes.
-func ExpandScratchSize(path string, size uint64) (err error) {
+func ExpandScratchSize(ctx context.Context, path string, size uint64) (err error) {
title := "hcsshim::ExpandScratchSize"
- fields := logrus.Fields{
- "path": path,
- "size": size,
- }
- logrus.WithFields(fields).Debug(title)
- defer func() {
- if err != nil {
- fields[logrus.ErrorKey] = err
- logrus.WithFields(fields).Error(err)
- } else {
- logrus.WithFields(fields).Debug(title + " - succeeded")
- }
- }()
+ ctx, span := trace.StartSpan(ctx, title)
+ defer span.End()
+ defer func() { oc.SetSpanStatus(span, err) }()
+ span.AddAttributes(
+ trace.StringAttribute("path", path),
+ trace.Int64Attribute("size", int64(size)))
err = expandSandboxSize(&stdDriverInfo, path, size)
if err != nil {
@@ -36,7 +31,7 @@ func ExpandScratchSize(path string, size uint64) (err error) {
// Manually expand the volume now in order to work around bugs in 19H1 and
// prerelease versions of Vb. Remove once this is fixed in Windows.
if build := osversion.Get().Build; build >= osversion.V19H1 && build < 19020 {
- err = expandSandboxVolume(path)
+ err = expandSandboxVolume(ctx, path)
if err != nil {
return err
}
@@ -84,7 +79,7 @@ func attachVhd(path string) (syscall.Handle, error) {
return handle, nil
}
-func expandSandboxVolume(path string) error {
+func expandSandboxVolume(ctx context.Context, path string) error {
// Mount the sandbox VHD temporarily.
vhdPath := filepath.Join(path, "sandbox.vhdx")
vhd, err := attachVhd(vhdPath)
@@ -94,7 +89,7 @@ func expandSandboxVolume(path string) error {
defer syscall.Close(vhd)
// Open the volume.
- volumePath, err := GetLayerMountPath(path)
+ volumePath, err := GetLayerMountPath(ctx, path)
if err != nil {
return err
}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/exportlayer.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/exportlayer.go
index 0425b3395..09f0de1a4 100644
--- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/exportlayer.go
+++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/exportlayer.go
@@ -1,12 +1,15 @@
package wclayer
import (
+ "context"
"io/ioutil"
"os"
+ "strings"
"github.com/Microsoft/go-winio"
"github.com/Microsoft/hcsshim/internal/hcserror"
- "github.com/sirupsen/logrus"
+ "github.com/Microsoft/hcsshim/internal/oc"
+ "go.opencensus.io/trace"
)
// ExportLayer will create a folder at exportFolderPath and fill that folder with
@@ -14,24 +17,18 @@ import (
// format includes any metadata required for later importing the layer (using
// ImportLayer), and requires the full list of parent layer paths in order to
// perform the export.
-func ExportLayer(path string, exportFolderPath string, parentLayerPaths []string) (err error) {
+func ExportLayer(ctx context.Context, path string, exportFolderPath string, parentLayerPaths []string) (err error) {
title := "hcsshim::ExportLayer"
- fields := logrus.Fields{
- "path": path,
- "exportFolderPath": exportFolderPath,
- }
- logrus.WithFields(fields).Debug(title)
- defer func() {
- if err != nil {
- fields[logrus.ErrorKey] = err
- logrus.WithFields(fields).Error(err)
- } else {
- logrus.WithFields(fields).Debug(title + " - succeeded")
- }
- }()
+ ctx, span := trace.StartSpan(ctx, title)
+ defer span.End()
+ defer func() { oc.SetSpanStatus(span, err) }()
+ span.AddAttributes(
+ trace.StringAttribute("path", path),
+ trace.StringAttribute("exportFolderPath", exportFolderPath),
+ trace.StringAttribute("parentLayerPaths", strings.Join(parentLayerPaths, ", ")))
// Generate layer descriptors
- layers, err := layerPathsToDescriptors(parentLayerPaths)
+ layers, err := layerPathsToDescriptors(ctx, parentLayerPaths)
if err != nil {
return err
}
@@ -52,25 +49,46 @@ type LayerReader interface {
// NewLayerReader returns a new layer reader for reading the contents of an on-disk layer.
// The caller must have taken the SeBackupPrivilege privilege
// to call this and any methods on the resulting LayerReader.
-func NewLayerReader(path string, parentLayerPaths []string) (LayerReader, error) {
+func NewLayerReader(ctx context.Context, path string, parentLayerPaths []string) (_ LayerReader, err error) {
+ ctx, span := trace.StartSpan(ctx, "hcsshim::NewLayerReader")
+ defer func() {
+ if err != nil {
+ oc.SetSpanStatus(span, err)
+ span.End()
+ }
+ }()
+ span.AddAttributes(
+ trace.StringAttribute("path", path),
+ trace.StringAttribute("parentLayerPaths", strings.Join(parentLayerPaths, ", ")))
+
exportPath, err := ioutil.TempDir("", "hcs")
if err != nil {
return nil, err
}
- err = ExportLayer(path, exportPath, parentLayerPaths)
+ err = ExportLayer(ctx, path, exportPath, parentLayerPaths)
if err != nil {
os.RemoveAll(exportPath)
return nil, err
}
- return &legacyLayerReaderWrapper{newLegacyLayerReader(exportPath)}, nil
+ return &legacyLayerReaderWrapper{
+ ctx: ctx,
+ s: span,
+ legacyLayerReader: newLegacyLayerReader(exportPath),
+ }, nil
}
type legacyLayerReaderWrapper struct {
+ ctx context.Context
+ s *trace.Span
+
*legacyLayerReader
}
-func (r *legacyLayerReaderWrapper) Close() error {
- err := r.legacyLayerReader.Close()
+func (r *legacyLayerReaderWrapper) Close() (err error) {
+ defer r.s.End()
+ defer func() { oc.SetSpanStatus(r.s, err) }()
+
+ err = r.legacyLayerReader.Close()
os.RemoveAll(r.root)
return err
}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/getlayermountpath.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/getlayermountpath.go
index d60b6ed53..942e3bbf9 100644
--- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/getlayermountpath.go
+++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/getlayermountpath.go
@@ -1,36 +1,31 @@
package wclayer
import (
+ "context"
"syscall"
"github.com/Microsoft/hcsshim/internal/hcserror"
- "github.com/sirupsen/logrus"
+ "github.com/Microsoft/hcsshim/internal/log"
+ "github.com/Microsoft/hcsshim/internal/oc"
+ "go.opencensus.io/trace"
)
// GetLayerMountPath will look for a mounted layer with the given path and return
// the path at which that layer can be accessed. This path may be a volume path
// if the layer is a mounted read-write layer, otherwise it is expected to be the
// folder path at which the layer is stored.
-func GetLayerMountPath(path string) (_ string, err error) {
+func GetLayerMountPath(ctx context.Context, path string) (_ string, err error) {
title := "hcsshim::GetLayerMountPath"
- fields := logrus.Fields{
- "path": path,
- }
- logrus.WithFields(fields).Debug(title)
- defer func() {
- if err != nil {
- fields[logrus.ErrorKey] = err
- logrus.WithFields(fields).Error(err)
- } else {
- logrus.WithFields(fields).Debug(title + " - succeeded")
- }
- }()
+ ctx, span := trace.StartSpan(ctx, title)
+ defer span.End()
+ defer func() { oc.SetSpanStatus(span, err) }()
+ span.AddAttributes(trace.StringAttribute("path", path))
var mountPathLength uintptr
mountPathLength = 0
// Call the procedure itself.
- logrus.WithFields(fields).Debug("Calling proc (1)")
+ log.G(ctx).Debug("Calling proc (1)")
err = getLayerMountPath(&stdDriverInfo, path, &mountPathLength, nil)
if err != nil {
return "", hcserror.New(err, title+" - failed", "(first call)")
@@ -44,13 +39,13 @@ func GetLayerMountPath(path string) (_ string, err error) {
mountPathp[0] = 0
// Call the procedure again
- logrus.WithFields(fields).Debug("Calling proc (2)")
+ log.G(ctx).Debug("Calling proc (2)")
err = getLayerMountPath(&stdDriverInfo, path, &mountPathLength, &mountPathp[0])
if err != nil {
return "", hcserror.New(err, title+" - failed", "(second call)")
}
mountPath := syscall.UTF16ToString(mountPathp[0:])
- fields["mountPath"] = mountPath
+ span.AddAttributes(trace.StringAttribute("mountPath", mountPath))
return mountPath, nil
}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/getsharedbaseimages.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/getsharedbaseimages.go
index dbd83ef2b..a50378f49 100644
--- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/getsharedbaseimages.go
+++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/getsharedbaseimages.go
@@ -1,29 +1,29 @@
package wclayer
import (
+ "context"
+
"github.com/Microsoft/hcsshim/internal/hcserror"
"github.com/Microsoft/hcsshim/internal/interop"
- "github.com/sirupsen/logrus"
+ "github.com/Microsoft/hcsshim/internal/oc"
+ "go.opencensus.io/trace"
)
// GetSharedBaseImages will enumerate the images stored in the common central
// image store and return descriptive info about those images for the purpose
// of registering them with the graphdriver, graph, and tagstore.
-func GetSharedBaseImages() (imageData string, err error) {
+func GetSharedBaseImages(ctx context.Context) (_ string, err error) {
title := "hcsshim::GetSharedBaseImages"
- logrus.Debug(title)
- defer func() {
- if err != nil {
- logrus.WithError(err).Error(err)
- } else {
- logrus.WithField("imageData", imageData).Debug(title + " - succeeded")
- }
- }()
+ ctx, span := trace.StartSpan(ctx, title)
+ defer span.End()
+ defer func() { oc.SetSpanStatus(span, err) }()
var buffer *uint16
err = getBaseImages(&buffer)
if err != nil {
return "", hcserror.New(err, title+" - failed", "")
}
- return interop.ConvertAndFreeCoTaskMemString(buffer), nil
+ imageData := interop.ConvertAndFreeCoTaskMemString(buffer)
+ span.AddAttributes(trace.StringAttribute("imageData", imageData))
+ return imageData, nil
}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/grantvmaccess.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/grantvmaccess.go
index 05735df6c..aa7c8ae1f 100644
--- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/grantvmaccess.go
+++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/grantvmaccess.go
@@ -1,26 +1,22 @@
package wclayer
import (
+ "context"
+
"github.com/Microsoft/hcsshim/internal/hcserror"
- "github.com/sirupsen/logrus"
+ "github.com/Microsoft/hcsshim/internal/oc"
+ "go.opencensus.io/trace"
)
// GrantVmAccess adds access to a file for a given VM
-func GrantVmAccess(vmid string, filepath string) (err error) {
+func GrantVmAccess(ctx context.Context, vmid string, filepath string) (err error) {
title := "hcsshim::GrantVmAccess"
- fields := logrus.Fields{
- "vm-id": vmid,
- "path": filepath,
- }
- logrus.WithFields(fields).Debug(title)
- defer func() {
- if err != nil {
- fields[logrus.ErrorKey] = err
- logrus.WithFields(fields).Error(err)
- } else {
- logrus.WithFields(fields).Debug(title + " - succeeded")
- }
- }()
+ ctx, span := trace.StartSpan(ctx, title)
+ defer span.End()
+ defer func() { oc.SetSpanStatus(span, err) }()
+ span.AddAttributes(
+ trace.StringAttribute("vm-id", vmid),
+ trace.StringAttribute("path", filepath))
err = grantVmAccess(vmid, filepath)
if err != nil {
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/importlayer.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/importlayer.go
index 76a804f2a..b3c150d66 100644
--- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/importlayer.go
+++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/importlayer.go
@@ -1,38 +1,35 @@
package wclayer
import (
+ "context"
"io/ioutil"
"os"
"path/filepath"
+ "strings"
"github.com/Microsoft/go-winio"
"github.com/Microsoft/hcsshim/internal/hcserror"
+ "github.com/Microsoft/hcsshim/internal/oc"
"github.com/Microsoft/hcsshim/internal/safefile"
- "github.com/sirupsen/logrus"
+ "go.opencensus.io/trace"
)
// ImportLayer will take the contents of the folder at importFolderPath and import
// that into a layer with the id layerId. Note that in order to correctly populate
// the layer and interperet the transport format, all parent layers must already
// be present on the system at the paths provided in parentLayerPaths.
-func ImportLayer(path string, importFolderPath string, parentLayerPaths []string) (err error) {
+func ImportLayer(ctx context.Context, path string, importFolderPath string, parentLayerPaths []string) (err error) {
title := "hcsshim::ImportLayer"
- fields := logrus.Fields{
- "path": path,
- "importFolderPath": importFolderPath,
- }
- logrus.WithFields(fields).Debug(title)
- defer func() {
- if err != nil {
- fields[logrus.ErrorKey] = err
- logrus.WithFields(fields).Error(err)
- } else {
- logrus.WithFields(fields).Debug(title + " - succeeded")
- }
- }()
+ ctx, span := trace.StartSpan(ctx, title)
+ defer span.End()
+ defer func() { oc.SetSpanStatus(span, err) }()
+ span.AddAttributes(
+ trace.StringAttribute("path", path),
+ trace.StringAttribute("importFolderPath", importFolderPath),
+ trace.StringAttribute("parentLayerPaths", strings.Join(parentLayerPaths, ", ")))
// Generate layer descriptors
- layers, err := layerPathsToDescriptors(parentLayerPaths)
+ layers, err := layerPathsToDescriptors(ctx, parentLayerPaths)
if err != nil {
return err
}
@@ -60,20 +57,26 @@ type LayerWriter interface {
}
type legacyLayerWriterWrapper struct {
+ ctx context.Context
+ s *trace.Span
+
*legacyLayerWriter
path string
parentLayerPaths []string
}
-func (r *legacyLayerWriterWrapper) Close() error {
+func (r *legacyLayerWriterWrapper) Close() (err error) {
+ defer r.s.End()
+ defer func() { oc.SetSpanStatus(r.s, err) }()
defer os.RemoveAll(r.root.Name())
defer r.legacyLayerWriter.CloseRoots()
- err := r.legacyLayerWriter.Close()
+
+ err = r.legacyLayerWriter.Close()
if err != nil {
return err
}
- if err = ImportLayer(r.destRoot.Name(), r.path, r.parentLayerPaths); err != nil {
+ if err = ImportLayer(r.ctx, r.destRoot.Name(), r.path, r.parentLayerPaths); err != nil {
return err
}
for _, name := range r.Tombstones {
@@ -90,13 +93,26 @@ func (r *legacyLayerWriterWrapper) Close() error {
return err
}
}
+
+ // The reapplyDirectoryTimes must be called AFTER we are done with Tombstone
+ // deletion and hard link creation. This is because Tombstone deletion and hard link
+ // creation updates the directory last write timestamps so that will change the
+ // timestamps added by the `Add` call. Some container applications depend on the
+ // correctness of these timestamps and so we should change the timestamps back to
+ // the original value (i.e the value provided in the Add call) after this
+ // processing is done.
+ err = reapplyDirectoryTimes(r.destRoot, r.changedDi)
+ if err != nil {
+ return err
+ }
+
// Prepare the utility VM for use if one is present in the layer.
if r.HasUtilityVM {
err := safefile.EnsureNotReparsePointRelative("UtilityVM", r.destRoot)
if err != nil {
return err
}
- err = ProcessUtilityVMImage(filepath.Join(r.destRoot.Name(), "UtilityVM"))
+ err = ProcessUtilityVMImage(r.ctx, filepath.Join(r.destRoot.Name(), "UtilityVM"))
if err != nil {
return err
}
@@ -107,7 +123,18 @@ func (r *legacyLayerWriterWrapper) Close() error {
// NewLayerWriter returns a new layer writer for creating a layer on disk.
// The caller must have taken the SeBackupPrivilege and SeRestorePrivilege privileges
// to call this and any methods on the resulting LayerWriter.
-func NewLayerWriter(path string, parentLayerPaths []string) (LayerWriter, error) {
+func NewLayerWriter(ctx context.Context, path string, parentLayerPaths []string) (_ LayerWriter, err error) {
+ ctx, span := trace.StartSpan(ctx, "hcsshim::NewLayerWriter")
+ defer func() {
+ if err != nil {
+ oc.SetSpanStatus(span, err)
+ span.End()
+ }
+ }()
+ span.AddAttributes(
+ trace.StringAttribute("path", path),
+ trace.StringAttribute("parentLayerPaths", strings.Join(parentLayerPaths, ", ")))
+
if len(parentLayerPaths) == 0 {
// This is a base layer. It gets imported differently.
f, err := safefile.OpenRoot(path)
@@ -115,6 +142,8 @@ func NewLayerWriter(path string, parentLayerPaths []string) (LayerWriter, error)
return nil, err
}
return &baseLayerWriter{
+ ctx: ctx,
+ s: span,
root: f,
}, nil
}
@@ -128,6 +157,8 @@ func NewLayerWriter(path string, parentLayerPaths []string) (LayerWriter, error)
return nil, err
}
return &legacyLayerWriterWrapper{
+ ctx: ctx,
+ s: span,
legacyLayerWriter: w,
path: importPath,
parentLayerPaths: parentLayerPaths,
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/layerexists.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/layerexists.go
index 258167a57..6dd6f2d57 100644
--- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/layerexists.go
+++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/layerexists.go
@@ -1,26 +1,21 @@
package wclayer
import (
+ "context"
+
"github.com/Microsoft/hcsshim/internal/hcserror"
- "github.com/sirupsen/logrus"
+ "github.com/Microsoft/hcsshim/internal/oc"
+ "go.opencensus.io/trace"
)
// LayerExists will return true if a layer with the given id exists and is known
// to the system.
-func LayerExists(path string) (_ bool, err error) {
+func LayerExists(ctx context.Context, path string) (_ bool, err error) {
title := "hcsshim::LayerExists"
- fields := logrus.Fields{
- "path": path,
- }
- logrus.WithFields(fields).Debug(title)
- defer func() {
- if err != nil {
- fields[logrus.ErrorKey] = err
- logrus.WithFields(fields).Error(err)
- } else {
- logrus.WithFields(fields).Debug(title + " - succeeded")
- }
- }()
+ ctx, span := trace.StartSpan(ctx, title)
+ defer span.End()
+ defer func() { oc.SetSpanStatus(span, err) }()
+ span.AddAttributes(trace.StringAttribute("path", path))
// Call the procedure itself.
var exists uint32
@@ -28,6 +23,6 @@ func LayerExists(path string) (_ bool, err error) {
if err != nil {
return false, hcserror.New(err, title+" - failed", "")
}
- fields["layer-exists"] = exists != 0
+ span.AddAttributes(trace.BoolAttribute("layer-exists", exists != 0))
return exists != 0, nil
}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/layerid.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/layerid.go
index 443596fba..0ce34a30f 100644
--- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/layerid.go
+++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/layerid.go
@@ -1,13 +1,22 @@
package wclayer
import (
+ "context"
"path/filepath"
"github.com/Microsoft/go-winio/pkg/guid"
+ "github.com/Microsoft/hcsshim/internal/oc"
+ "go.opencensus.io/trace"
)
// LayerID returns the layer ID of a layer on disk.
-func LayerID(path string) (guid.GUID, error) {
+func LayerID(ctx context.Context, path string) (_ guid.GUID, err error) {
+ title := "hcsshim::LayerID"
+ ctx, span := trace.StartSpan(ctx, title)
+ defer span.End()
+ defer func() { oc.SetSpanStatus(span, err) }()
+ span.AddAttributes(trace.StringAttribute("path", path))
+
_, file := filepath.Split(path)
- return NameToGuid(file)
+ return NameToGuid(ctx, file)
}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/layerutils.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/layerutils.go
index 06671309d..1ec893c6a 100644
--- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/layerutils.go
+++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/layerutils.go
@@ -4,6 +4,7 @@ package wclayer
// functionality.
import (
+ "context"
"syscall"
"github.com/Microsoft/go-winio/pkg/guid"
@@ -68,12 +69,12 @@ type WC_LAYER_DESCRIPTOR struct {
Pathp *uint16
}
-func layerPathsToDescriptors(parentLayerPaths []string) ([]WC_LAYER_DESCRIPTOR, error) {
+func layerPathsToDescriptors(ctx context.Context, parentLayerPaths []string) ([]WC_LAYER_DESCRIPTOR, error) {
// Array of descriptors that gets constructed.
var layers []WC_LAYER_DESCRIPTOR
for i := 0; i < len(parentLayerPaths); i++ {
- g, err := LayerID(parentLayerPaths[i])
+ g, err := LayerID(ctx, parentLayerPaths[i])
if err != nil {
logrus.WithError(err).Debug("Failed to convert name to guid")
return nil, err
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/legacy.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/legacy.go
index b8ea5d263..dc3caf751 100644
--- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/legacy.go
+++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/legacy.go
@@ -15,6 +15,7 @@ import (
"github.com/Microsoft/go-winio"
"github.com/Microsoft/hcsshim/internal/longpath"
"github.com/Microsoft/hcsshim/internal/safefile"
+ "github.com/Microsoft/hcsshim/internal/winapi"
)
var errorIterationCanceled = errors.New("")
@@ -341,7 +342,7 @@ type legacyLayerWriter struct {
backupWriter *winio.BackupFileWriter
Tombstones []string
HasUtilityVM bool
- uvmDi []dirInfo
+ changedDi []dirInfo
addedFiles map[string]bool
PendingLinks []pendingLink
pendingDirs []pendingDir
@@ -472,8 +473,8 @@ func copyFileWithMetadata(srcRoot, destRoot *os.File, subPath string, isDir bool
srcRoot,
syscall.GENERIC_READ|winio.ACCESS_SYSTEM_SECURITY,
syscall.FILE_SHARE_READ,
- safefile.FILE_OPEN,
- safefile.FILE_OPEN_REPARSE_POINT)
+ winapi.FILE_OPEN,
+ winapi.FILE_OPEN_REPARSE_POINT)
if err != nil {
return nil, err
}
@@ -488,14 +489,14 @@ func copyFileWithMetadata(srcRoot, destRoot *os.File, subPath string, isDir bool
extraFlags := uint32(0)
if isDir {
- extraFlags |= safefile.FILE_DIRECTORY_FILE
+ extraFlags |= winapi.FILE_DIRECTORY_FILE
}
dest, err := safefile.OpenRelative(
subPath,
destRoot,
syscall.GENERIC_READ|syscall.GENERIC_WRITE|winio.WRITE_DAC|winio.WRITE_OWNER|winio.ACCESS_SYSTEM_SECURITY,
syscall.FILE_SHARE_READ,
- safefile.FILE_CREATE,
+ winapi.FILE_CREATE,
extraFlags)
if err != nil {
return nil, err
@@ -555,7 +556,7 @@ func cloneTree(srcRoot *os.File, destRoot *os.File, subPath string, mutatedFiles
if err != nil {
return err
}
- if isDir && !isReparsePoint {
+ if isDir {
di = append(di, dirInfo{path: relPath, fileInfo: *fi})
}
} else {
@@ -583,6 +584,10 @@ func (w *legacyLayerWriter) Add(name string, fileInfo *winio.FileBasicInfo) erro
return w.initUtilityVM()
}
+ if (fileInfo.FileAttributes & syscall.FILE_ATTRIBUTE_DIRECTORY) != 0 {
+ w.changedDi = append(w.changedDi, dirInfo{path: name, fileInfo: *fileInfo})
+ }
+
name = filepath.Clean(name)
if hasPathPrefix(name, utilityVMPath) {
if !w.HasUtilityVM {
@@ -591,7 +596,7 @@ func (w *legacyLayerWriter) Add(name string, fileInfo *winio.FileBasicInfo) erro
if !hasPathPrefix(name, utilityVMFilesPath) && name != utilityVMFilesPath {
return errors.New("invalid UtilityVM layer")
}
- createDisposition := uint32(safefile.FILE_OPEN)
+ createDisposition := uint32(winapi.FILE_OPEN)
if (fileInfo.FileAttributes & syscall.FILE_ATTRIBUTE_DIRECTORY) != 0 {
st, err := safefile.LstatRelative(name, w.destRoot)
if err != nil && !os.IsNotExist(err) {
@@ -612,16 +617,13 @@ func (w *legacyLayerWriter) Add(name string, fileInfo *winio.FileBasicInfo) erro
return err
}
}
- if fileInfo.FileAttributes&syscall.FILE_ATTRIBUTE_REPARSE_POINT == 0 {
- w.uvmDi = append(w.uvmDi, dirInfo{path: name, fileInfo: *fileInfo})
- }
} else {
// Overwrite any existing hard link.
err := safefile.RemoveRelative(name, w.destRoot)
if err != nil && !os.IsNotExist(err) {
return err
}
- createDisposition = safefile.FILE_CREATE
+ createDisposition = winapi.FILE_CREATE
}
f, err := safefile.OpenRelative(
@@ -630,7 +632,7 @@ func (w *legacyLayerWriter) Add(name string, fileInfo *winio.FileBasicInfo) erro
syscall.GENERIC_READ|syscall.GENERIC_WRITE|winio.WRITE_DAC|winio.WRITE_OWNER|winio.ACCESS_SYSTEM_SECURITY,
syscall.FILE_SHARE_READ,
createDisposition,
- safefile.FILE_OPEN_REPARSE_POINT,
+ winapi.FILE_OPEN_REPARSE_POINT,
)
if err != nil {
return err
@@ -667,7 +669,7 @@ func (w *legacyLayerWriter) Add(name string, fileInfo *winio.FileBasicInfo) erro
w.currentIsDir = true
}
- f, err := safefile.OpenRelative(fname, w.root, syscall.GENERIC_READ|syscall.GENERIC_WRITE, syscall.FILE_SHARE_READ, safefile.FILE_CREATE, 0)
+ f, err := safefile.OpenRelative(fname, w.root, syscall.GENERIC_READ|syscall.GENERIC_WRITE, syscall.FILE_SHARE_READ, winapi.FILE_CREATE, 0)
if err != nil {
return err
}
@@ -805,11 +807,5 @@ func (w *legacyLayerWriter) Close() error {
return err
}
}
- if w.HasUtilityVM {
- err := reapplyDirectoryTimes(w.destRoot, w.uvmDi)
- if err != nil {
- return err
- }
- }
return nil
}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/nametoguid.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/nametoguid.go
index a259c1b82..b732857b3 100644
--- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/nametoguid.go
+++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/nametoguid.go
@@ -1,34 +1,29 @@
package wclayer
import (
+ "context"
+
"github.com/Microsoft/go-winio/pkg/guid"
"github.com/Microsoft/hcsshim/internal/hcserror"
- "github.com/sirupsen/logrus"
+ "github.com/Microsoft/hcsshim/internal/oc"
+ "go.opencensus.io/trace"
)
// NameToGuid converts the given string into a GUID using the algorithm in the
// Host Compute Service, ensuring GUIDs generated with the same string are common
// across all clients.
-func NameToGuid(name string) (id guid.GUID, err error) {
+func NameToGuid(ctx context.Context, name string) (_ guid.GUID, err error) {
title := "hcsshim::NameToGuid"
- fields := logrus.Fields{
- "name": name,
- }
- logrus.WithFields(fields).Debug(title)
- defer func() {
- if err != nil {
- fields[logrus.ErrorKey] = err
- logrus.WithFields(fields).Error(err)
- } else {
- logrus.WithFields(fields).Debug(title + " - succeeded")
- }
- }()
+ ctx, span := trace.StartSpan(ctx, title)
+ defer span.End()
+ defer func() { oc.SetSpanStatus(span, err) }()
+ span.AddAttributes(trace.StringAttribute("name", name))
+ var id guid.GUID
err = nameToGuid(name, &id)
if err != nil {
- err = hcserror.New(err, title+" - failed", "")
- return
+ return guid.GUID{}, hcserror.New(err, title+" - failed", "")
}
- fields["guid"] = id.String()
- return
+ span.AddAttributes(trace.StringAttribute("guid", id.String()))
+ return id, nil
}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/preparelayer.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/preparelayer.go
index 2b65b0186..55f7730d0 100644
--- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/preparelayer.go
+++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/preparelayer.go
@@ -1,10 +1,13 @@
package wclayer
import (
+ "context"
+ "strings"
"sync"
"github.com/Microsoft/hcsshim/internal/hcserror"
- "github.com/sirupsen/logrus"
+ "github.com/Microsoft/hcsshim/internal/oc"
+ "go.opencensus.io/trace"
)
var prepareLayerLock sync.Mutex
@@ -14,23 +17,17 @@ var prepareLayerLock sync.Mutex
// parent layers, and is necessary in order to view or interact with the layer
// as an actual filesystem (reading and writing files, creating directories, etc).
// Disabling the filter must be done via UnprepareLayer.
-func PrepareLayer(path string, parentLayerPaths []string) (err error) {
+func PrepareLayer(ctx context.Context, path string, parentLayerPaths []string) (err error) {
title := "hcsshim::PrepareLayer"
- fields := logrus.Fields{
- "path": path,
- }
- logrus.WithFields(fields).Debug(title)
- defer func() {
- if err != nil {
- fields[logrus.ErrorKey] = err
- logrus.WithFields(fields).Error(err)
- } else {
- logrus.WithFields(fields).Debug(title + " - succeeded")
- }
- }()
+ ctx, span := trace.StartSpan(ctx, title)
+ defer span.End()
+ defer func() { oc.SetSpanStatus(span, err) }()
+ span.AddAttributes(
+ trace.StringAttribute("path", path),
+ trace.StringAttribute("parentLayerPaths", strings.Join(parentLayerPaths, ", ")))
// Generate layer descriptors
- layers, err := layerPathsToDescriptors(parentLayerPaths)
+ layers, err := layerPathsToDescriptors(ctx, parentLayerPaths)
if err != nil {
return err
}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/processimage.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/processimage.go
index 884207c3e..aabb31368 100644
--- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/processimage.go
+++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/processimage.go
@@ -1,23 +1,41 @@
package wclayer
-import "os"
+import (
+ "context"
+ "os"
+
+ "github.com/Microsoft/hcsshim/internal/oc"
+ "go.opencensus.io/trace"
+)
// ProcessBaseLayer post-processes a base layer that has had its files extracted.
// The files should have been extracted to \Files.
-func ProcessBaseLayer(path string) error {
- err := processBaseImage(path)
+func ProcessBaseLayer(ctx context.Context, path string) (err error) {
+ title := "hcsshim::ProcessBaseLayer"
+ ctx, span := trace.StartSpan(ctx, title)
+ defer span.End()
+ defer func() { oc.SetSpanStatus(span, err) }()
+ span.AddAttributes(trace.StringAttribute("path", path))
+
+ err = processBaseImage(path)
if err != nil {
- return &os.PathError{Op: "ProcessBaseLayer", Path: path, Err: err}
+ return &os.PathError{Op: title, Path: path, Err: err}
}
return nil
}
// ProcessUtilityVMImage post-processes a utility VM image that has had its files extracted.
// The files should have been extracted to \Files.
-func ProcessUtilityVMImage(path string) error {
- err := processUtilityImage(path)
+func ProcessUtilityVMImage(ctx context.Context, path string) (err error) {
+ title := "hcsshim::ProcessUtilityVMImage"
+ ctx, span := trace.StartSpan(ctx, title)
+ defer span.End()
+ defer func() { oc.SetSpanStatus(span, err) }()
+ span.AddAttributes(trace.StringAttribute("path", path))
+
+ err = processUtilityImage(path)
if err != nil {
- return &os.PathError{Op: "ProcessUtilityVMImage", Path: path, Err: err}
+ return &os.PathError{Op: title, Path: path, Err: err}
}
return nil
}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/unpreparelayer.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/unpreparelayer.go
index bccd45969..84f81848f 100644
--- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/unpreparelayer.go
+++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/unpreparelayer.go
@@ -1,26 +1,21 @@
package wclayer
import (
+ "context"
+
"github.com/Microsoft/hcsshim/internal/hcserror"
- "github.com/sirupsen/logrus"
+ "github.com/Microsoft/hcsshim/internal/oc"
+ "go.opencensus.io/trace"
)
// UnprepareLayer disables the filesystem filter for the read-write layer with
// the given id.
-func UnprepareLayer(path string) (err error) {
+func UnprepareLayer(ctx context.Context, path string) (err error) {
title := "hcsshim::UnprepareLayer"
- fields := logrus.Fields{
- "path": path,
- }
- logrus.WithFields(fields).Debug(title)
- defer func() {
- if err != nil {
- fields[logrus.ErrorKey] = err
- logrus.WithFields(fields).Error(err)
- } else {
- logrus.WithFields(fields).Debug(title + " - succeeded")
- }
- }()
+ ctx, span := trace.StartSpan(ctx, title)
+ defer span.End()
+ defer func() { oc.SetSpanStatus(span, err) }()
+ span.AddAttributes(trace.StringAttribute("path", path))
err = unprepareLayer(&stdDriverInfo, path)
if err != nil {
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/wclayer.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/wclayer.go
index dc40bf519..9b1e06d50 100644
--- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/wclayer.go
+++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/wclayer.go
@@ -1,3 +1,6 @@
+// Package wclayer provides bindings to HCS's legacy layer management API and
+// provides a higher level interface around these calls for container layer
+// management.
package wclayer
import "github.com/Microsoft/go-winio/pkg/guid"
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/winapi/devices.go b/vendor/github.com/Microsoft/hcsshim/internal/winapi/devices.go
new file mode 100644
index 000000000..df28ea242
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/winapi/devices.go
@@ -0,0 +1,13 @@
+package winapi
+
+import "github.com/Microsoft/go-winio/pkg/guid"
+
+//sys CMGetDeviceIDListSize(pulLen *uint32, pszFilter *byte, uFlags uint32) (hr error) = cfgmgr32.CM_Get_Device_ID_List_SizeA
+//sys CMGetDeviceIDList(pszFilter *byte, buffer *byte, bufferLen uint32, uFlags uint32) (hr error)= cfgmgr32.CM_Get_Device_ID_ListA
+//sys CMLocateDevNode(pdnDevInst *uint32, pDeviceID string, uFlags uint32) (hr error) = cfgmgr32.CM_Locate_DevNodeW
+//sys CMGetDevNodeProperty(dnDevInst uint32, propertyKey *DevPropKey, propertyType *uint32, propertyBuffer *uint16, propertyBufferSize *uint32, uFlags uint32) (hr error) = cfgmgr32.CM_Get_DevNode_PropertyW
+
+type DevPropKey struct {
+ Fmtid guid.GUID
+ Pid uint32
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/winapi/errors.go b/vendor/github.com/Microsoft/hcsshim/internal/winapi/errors.go
new file mode 100644
index 000000000..4e80ef68c
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/winapi/errors.go
@@ -0,0 +1,15 @@
+package winapi
+
+import "syscall"
+
+//sys RtlNtStatusToDosError(status uint32) (winerr error) = ntdll.RtlNtStatusToDosError
+
+const (
+ STATUS_REPARSE_POINT_ENCOUNTERED = 0xC000050B
+ ERROR_NO_MORE_ITEMS = 0x103
+ ERROR_MORE_DATA syscall.Errno = 234
+)
+
+func NTSuccess(status uint32) bool {
+ return status == 0
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/winapi/filesystem.go b/vendor/github.com/Microsoft/hcsshim/internal/winapi/filesystem.go
new file mode 100644
index 000000000..490576b94
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/winapi/filesystem.go
@@ -0,0 +1,110 @@
+package winapi
+
+//sys NtCreateFile(handle *uintptr, accessMask uint32, oa *ObjectAttributes, iosb *IOStatusBlock, allocationSize *uint64, fileAttributes uint32, shareAccess uint32, createDisposition uint32, createOptions uint32, eaBuffer *byte, eaLength uint32) (status uint32) = ntdll.NtCreateFile
+//sys NtSetInformationFile(handle uintptr, iosb *IOStatusBlock, information uintptr, length uint32, class uint32) (status uint32) = ntdll.NtSetInformationFile
+
+//sys NtOpenDirectoryObject(handle *uintptr, accessMask uint32, oa *ObjectAttributes) (status uint32) = ntdll.NtOpenDirectoryObject
+//sys NtQueryDirectoryObject(handle uintptr, buffer *byte, length uint32, singleEntry bool, restartScan bool, context *uint32, returnLength *uint32)(status uint32) = ntdll.NtQueryDirectoryObject
+
+const (
+ FileLinkInformationClass = 11
+ FileDispositionInformationExClass = 64
+
+ FILE_READ_ATTRIBUTES = 0x0080
+ FILE_WRITE_ATTRIBUTES = 0x0100
+ DELETE = 0x10000
+
+ FILE_OPEN = 1
+ FILE_CREATE = 2
+
+ FILE_LIST_DIRECTORY = 0x00000001
+ FILE_DIRECTORY_FILE = 0x00000001
+ FILE_SYNCHRONOUS_IO_NONALERT = 0x00000020
+ FILE_OPEN_FOR_BACKUP_INTENT = 0x00004000
+ FILE_OPEN_REPARSE_POINT = 0x00200000
+
+ FILE_DISPOSITION_DELETE = 0x00000001
+
+ OBJ_DONT_REPARSE = 0x1000
+
+ STATUS_MORE_ENTRIES = 0x105
+ STATUS_NO_MORE_ENTRIES = 0x8000001a
+)
+
+// Select entries from FILE_INFO_BY_HANDLE_CLASS.
+//
+// C declaration:
+// typedef enum _FILE_INFO_BY_HANDLE_CLASS {
+// FileBasicInfo,
+// FileStandardInfo,
+// FileNameInfo,
+// FileRenameInfo,
+// FileDispositionInfo,
+// FileAllocationInfo,
+// FileEndOfFileInfo,
+// FileStreamInfo,
+// FileCompressionInfo,
+// FileAttributeTagInfo,
+// FileIdBothDirectoryInfo,
+// FileIdBothDirectoryRestartInfo,
+// FileIoPriorityHintInfo,
+// FileRemoteProtocolInfo,
+// FileFullDirectoryInfo,
+// FileFullDirectoryRestartInfo,
+// FileStorageInfo,
+// FileAlignmentInfo,
+// FileIdInfo,
+// FileIdExtdDirectoryInfo,
+// FileIdExtdDirectoryRestartInfo,
+// FileDispositionInfoEx,
+// FileRenameInfoEx,
+// FileCaseSensitiveInfo,
+// FileNormalizedNameInfo,
+// MaximumFileInfoByHandleClass
+// } FILE_INFO_BY_HANDLE_CLASS, *PFILE_INFO_BY_HANDLE_CLASS;
+//
+// Documentation: https://docs.microsoft.com/en-us/windows/win32/api/minwinbase/ne-minwinbase-file_info_by_handle_class
+const (
+ FileIdInfo = 18
+)
+
+type FileDispositionInformationEx struct {
+ Flags uintptr
+}
+
+type IOStatusBlock struct {
+ Status, Information uintptr
+}
+
+type ObjectAttributes struct {
+ Length uintptr
+ RootDirectory uintptr
+ ObjectName uintptr
+ Attributes uintptr
+ SecurityDescriptor uintptr
+ SecurityQoS uintptr
+}
+
+type ObjectDirectoryInformation struct {
+ Name UnicodeString
+ TypeName UnicodeString
+}
+
+type FileLinkInformation struct {
+ ReplaceIfExists bool
+ RootDirectory uintptr
+ FileNameLength uint32
+ FileName [1]uint16
+}
+
+// C declaration:
+// typedef struct _FILE_ID_INFO {
+// ULONGLONG VolumeSerialNumber;
+// FILE_ID_128 FileId;
+// } FILE_ID_INFO, *PFILE_ID_INFO;
+//
+// Documentation: https://docs.microsoft.com/en-us/windows/win32/api/winbase/ns-winbase-file_id_info
+type FILE_ID_INFO struct {
+ VolumeSerialNumber uint64
+ FileID [16]byte
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/winapi/iocp.go b/vendor/github.com/Microsoft/hcsshim/internal/winapi/iocp.go
new file mode 100644
index 000000000..4e609cbf1
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/winapi/iocp.go
@@ -0,0 +1,3 @@
+package winapi
+
+//sys GetQueuedCompletionStatus(cphandle windows.Handle, qty *uint32, key *uintptr, overlapped **windows.Overlapped, timeout uint32) (err error)
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/winapi/jobobject.go b/vendor/github.com/Microsoft/hcsshim/internal/winapi/jobobject.go
new file mode 100644
index 000000000..6cb411cc4
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/winapi/jobobject.go
@@ -0,0 +1,185 @@
+package winapi
+
+import (
+ "unsafe"
+
+ "golang.org/x/sys/windows"
+)
+
+// Messages that can be received from an assigned io completion port.
+// https://docs.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-jobobject_associate_completion_port
+const (
+ JOB_OBJECT_MSG_END_OF_JOB_TIME uint32 = 1
+ JOB_OBJECT_MSG_END_OF_PROCESS_TIME uint32 = 2
+ JOB_OBJECT_MSG_ACTIVE_PROCESS_LIMIT uint32 = 3
+ JOB_OBJECT_MSG_ACTIVE_PROCESS_ZERO uint32 = 4
+ JOB_OBJECT_MSG_NEW_PROCESS uint32 = 6
+ JOB_OBJECT_MSG_EXIT_PROCESS uint32 = 7
+ JOB_OBJECT_MSG_ABNORMAL_EXIT_PROCESS uint32 = 8
+ JOB_OBJECT_MSG_PROCESS_MEMORY_LIMIT uint32 = 9
+ JOB_OBJECT_MSG_JOB_MEMORY_LIMIT uint32 = 10
+ JOB_OBJECT_MSG_NOTIFICATION_LIMIT uint32 = 11
+)
+
+// IO limit flags
+//
+// https://docs.microsoft.com/en-us/windows/win32/api/jobapi2/ns-jobapi2-jobobject_io_rate_control_information
+const JOB_OBJECT_IO_RATE_CONTROL_ENABLE = 0x1
+
+const JOBOBJECT_IO_ATTRIBUTION_CONTROL_ENABLE uint32 = 0x1
+
+// https://docs.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-jobobject_cpu_rate_control_information
+const (
+ JOB_OBJECT_CPU_RATE_CONTROL_ENABLE uint32 = 1 << iota
+ JOB_OBJECT_CPU_RATE_CONTROL_WEIGHT_BASED
+ JOB_OBJECT_CPU_RATE_CONTROL_HARD_CAP
+ JOB_OBJECT_CPU_RATE_CONTROL_NOTIFY
+ JOB_OBJECT_CPU_RATE_CONTROL_MIN_MAX_RATE
+)
+
+// JobObjectInformationClass values. Used for a call to QueryInformationJobObject
+//
+// https://docs.microsoft.com/en-us/windows/win32/api/jobapi2/nf-jobapi2-queryinformationjobobject
+const (
+ JobObjectBasicAccountingInformation uint32 = 1
+ JobObjectBasicProcessIdList uint32 = 3
+ JobObjectBasicAndIoAccountingInformation uint32 = 8
+ JobObjectLimitViolationInformation uint32 = 13
+ JobObjectMemoryUsageInformation uint32 = 28
+ JobObjectNotificationLimitInformation2 uint32 = 33
+ JobObjectIoAttribution uint32 = 42
+)
+
+// https://docs.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-jobobject_basic_limit_information
+type JOBOBJECT_BASIC_LIMIT_INFORMATION struct {
+ PerProcessUserTimeLimit int64
+ PerJobUserTimeLimit int64
+ LimitFlags uint32
+ MinimumWorkingSetSize uintptr
+ MaximumWorkingSetSize uintptr
+ ActiveProcessLimit uint32
+ Affinity uintptr
+ PriorityClass uint32
+ SchedulingClass uint32
+}
+
+// https://docs.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-jobobject_cpu_rate_control_information
+type JOBOBJECT_CPU_RATE_CONTROL_INFORMATION struct {
+ ControlFlags uint32
+ Value uint32
+}
+
+// https://docs.microsoft.com/en-us/windows/win32/api/jobapi2/ns-jobapi2-jobobject_io_rate_control_information
+type JOBOBJECT_IO_RATE_CONTROL_INFORMATION struct {
+ MaxIops int64
+ MaxBandwidth int64
+ ReservationIops int64
+ BaseIOSize uint32
+ VolumeName string
+ ControlFlags uint32
+}
+
+// https://docs.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-jobobject_basic_process_id_list
+type JOBOBJECT_BASIC_PROCESS_ID_LIST struct {
+ NumberOfAssignedProcesses uint32
+ NumberOfProcessIdsInList uint32
+ ProcessIdList [1]uintptr
+}
+
+// AllPids returns all the process Ids in the job object.
+func (p *JOBOBJECT_BASIC_PROCESS_ID_LIST) AllPids() []uintptr {
+ return (*[(1 << 27) - 1]uintptr)(unsafe.Pointer(&p.ProcessIdList[0]))[:p.NumberOfProcessIdsInList]
+}
+
+// https://docs.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-jobobject_basic_accounting_information
+type JOBOBJECT_BASIC_ACCOUNTING_INFORMATION struct {
+ TotalUserTime int64
+ TotalKernelTime int64
+ ThisPeriodTotalUserTime int64
+ ThisPeriodTotalKernelTime int64
+ TotalPageFaultCount uint32
+ TotalProcesses uint32
+ ActiveProcesses uint32
+ TotalTerminateProcesses uint32
+}
+
+//https://docs.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-jobobject_basic_and_io_accounting_information
+type JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION struct {
+ BasicInfo JOBOBJECT_BASIC_ACCOUNTING_INFORMATION
+ IoInfo windows.IO_COUNTERS
+}
+
+// typedef struct _JOBOBJECT_MEMORY_USAGE_INFORMATION {
+// ULONG64 JobMemory;
+// ULONG64 PeakJobMemoryUsed;
+// } JOBOBJECT_MEMORY_USAGE_INFORMATION, *PJOBOBJECT_MEMORY_USAGE_INFORMATION;
+//
+type JOBOBJECT_MEMORY_USAGE_INFORMATION struct {
+ JobMemory uint64
+ PeakJobMemoryUsed uint64
+}
+
+// typedef struct _JOBOBJECT_IO_ATTRIBUTION_STATS {
+// ULONG_PTR IoCount;
+// ULONGLONG TotalNonOverlappedQueueTime;
+// ULONGLONG TotalNonOverlappedServiceTime;
+// ULONGLONG TotalSize;
+// } JOBOBJECT_IO_ATTRIBUTION_STATS, *PJOBOBJECT_IO_ATTRIBUTION_STATS;
+//
+type JOBOBJECT_IO_ATTRIBUTION_STATS struct {
+ IoCount uintptr
+ TotalNonOverlappedQueueTime uint64
+ TotalNonOverlappedServiceTime uint64
+ TotalSize uint64
+}
+
+// typedef struct _JOBOBJECT_IO_ATTRIBUTION_INFORMATION {
+// ULONG ControlFlags;
+// JOBOBJECT_IO_ATTRIBUTION_STATS ReadStats;
+// JOBOBJECT_IO_ATTRIBUTION_STATS WriteStats;
+// } JOBOBJECT_IO_ATTRIBUTION_INFORMATION, *PJOBOBJECT_IO_ATTRIBUTION_INFORMATION;
+//
+type JOBOBJECT_IO_ATTRIBUTION_INFORMATION struct {
+ ControlFlags uint32
+ ReadStats JOBOBJECT_IO_ATTRIBUTION_STATS
+ WriteStats JOBOBJECT_IO_ATTRIBUTION_STATS
+}
+
+// https://docs.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-jobobject_associate_completion_port
+type JOBOBJECT_ASSOCIATE_COMPLETION_PORT struct {
+ CompletionKey windows.Handle
+ CompletionPort windows.Handle
+}
+
+// BOOL IsProcessInJob(
+// HANDLE ProcessHandle,
+// HANDLE JobHandle,
+// PBOOL Result
+// );
+//
+//sys IsProcessInJob(procHandle windows.Handle, jobHandle windows.Handle, result *bool) (err error) = kernel32.IsProcessInJob
+
+// BOOL QueryInformationJobObject(
+// HANDLE hJob,
+// JOBOBJECTINFOCLASS JobObjectInformationClass,
+// LPVOID lpJobObjectInformation,
+// DWORD cbJobObjectInformationLength,
+// LPDWORD lpReturnLength
+// );
+//
+//sys QueryInformationJobObject(jobHandle windows.Handle, infoClass uint32, jobObjectInfo uintptr, jobObjectInformationLength uint32, lpReturnLength *uint32) (err error) = kernel32.QueryInformationJobObject
+
+// HANDLE OpenJobObjectW(
+// DWORD dwDesiredAccess,
+// BOOL bInheritHandle,
+// LPCWSTR lpName
+// );
+//
+//sys OpenJobObject(desiredAccess uint32, inheritHandle bool, lpName *uint16) (handle windows.Handle, err error) = kernel32.OpenJobObjectW
+
+// DWORD SetIoRateControlInformationJobObject(
+// HANDLE hJob,
+// JOBOBJECT_IO_RATE_CONTROL_INFORMATION *IoRateControlInfo
+// );
+//
+//sys SetIoRateControlInformationJobObject(jobHandle windows.Handle, ioRateControlInfo *JOBOBJECT_IO_RATE_CONTROL_INFORMATION) (ret uint32, err error) = kernel32.SetIoRateControlInformationJobObject
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/winapi/logon.go b/vendor/github.com/Microsoft/hcsshim/internal/winapi/logon.go
new file mode 100644
index 000000000..b6e7cfd46
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/winapi/logon.go
@@ -0,0 +1,30 @@
+package winapi
+
+// BOOL LogonUserA(
+// LPCWSTR lpszUsername,
+// LPCWSTR lpszDomain,
+// LPCWSTR lpszPassword,
+// DWORD dwLogonType,
+// DWORD dwLogonProvider,
+// PHANDLE phToken
+// );
+//
+//sys LogonUser(username *uint16, domain *uint16, password *uint16, logonType uint32, logonProvider uint32, token *windows.Token) (err error) = advapi32.LogonUserW
+
+// Logon types
+const (
+ LOGON32_LOGON_INTERACTIVE uint32 = 2
+ LOGON32_LOGON_NETWORK uint32 = 3
+ LOGON32_LOGON_BATCH uint32 = 4
+ LOGON32_LOGON_SERVICE uint32 = 5
+ LOGON32_LOGON_UNLOCK uint32 = 7
+ LOGON32_LOGON_NETWORK_CLEARTEXT uint32 = 8
+ LOGON32_LOGON_NEW_CREDENTIALS uint32 = 9
+)
+
+// Logon providers
+const (
+ LOGON32_PROVIDER_DEFAULT uint32 = 0
+ LOGON32_PROVIDER_WINNT40 uint32 = 2
+ LOGON32_PROVIDER_WINNT50 uint32 = 3
+)
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/winapi/memory.go b/vendor/github.com/Microsoft/hcsshim/internal/winapi/memory.go
new file mode 100644
index 000000000..ccaf5a624
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/winapi/memory.go
@@ -0,0 +1,11 @@
+package winapi
+
+// VOID RtlMoveMemory(
+// _Out_ VOID UNALIGNED *Destination,
+// _In_ const VOID UNALIGNED *Source,
+// _In_ SIZE_T Length
+// );
+//sys RtlMoveMemory(destination *byte, source *byte, length uintptr) (err error) = kernel32.RtlMoveMemory
+
+//sys LocalAlloc(flags uint32, size int) (ptr uintptr) = kernel32.LocalAlloc
+//sys LocalFree(ptr uintptr) = kernel32.LocalFree
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/winapi/net.go b/vendor/github.com/Microsoft/hcsshim/internal/winapi/net.go
new file mode 100644
index 000000000..f37910024
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/winapi/net.go
@@ -0,0 +1,3 @@
+package winapi
+
+//sys SetJobCompartmentId(handle windows.Handle, compartmentId uint32) (win32Err error) = iphlpapi.SetJobCompartmentId
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/winapi/path.go b/vendor/github.com/Microsoft/hcsshim/internal/winapi/path.go
new file mode 100644
index 000000000..0ae8f33ea
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/winapi/path.go
@@ -0,0 +1,11 @@
+package winapi
+
+// DWORD SearchPathW(
+// LPCWSTR lpPath,
+// LPCWSTR lpFileName,
+// LPCWSTR lpExtension,
+// DWORD nBufferLength,
+// LPWSTR lpBuffer,
+// LPWSTR *lpFilePart
+// );
+//sys SearchPath(lpPath *uint16, lpFileName *uint16, lpExtension *uint16, nBufferLength uint32, lpBuffer *uint16, lpFilePath **uint16) (size uint32, err error) = kernel32.SearchPathW
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/winapi/process.go b/vendor/github.com/Microsoft/hcsshim/internal/winapi/process.go
new file mode 100644
index 000000000..adf0168ea
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/winapi/process.go
@@ -0,0 +1,3 @@
+package winapi
+
+const PROCESS_ALL_ACCESS uint32 = 2097151
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/winapi/processor.go b/vendor/github.com/Microsoft/hcsshim/internal/winapi/processor.go
new file mode 100644
index 000000000..ce79ac2cd
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/winapi/processor.go
@@ -0,0 +1,7 @@
+package winapi
+
+// Get count from all processor groups.
+// https://docs.microsoft.com/en-us/windows/win32/procthread/processor-groups
+const ALL_PROCESSOR_GROUPS = 0xFFFF
+
+//sys GetActiveProcessorCount(groupNumber uint16) (amount uint32) = kernel32.GetActiveProcessorCount
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/winapi/utils.go b/vendor/github.com/Microsoft/hcsshim/internal/winapi/utils.go
new file mode 100644
index 000000000..f3055d417
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/winapi/utils.go
@@ -0,0 +1,60 @@
+package winapi
+
+import (
+ "errors"
+ "syscall"
+ "unicode/utf16"
+ "unsafe"
+)
+
+type UnicodeString struct {
+ Length uint16
+ MaximumLength uint16
+ Buffer *uint16
+}
+
+//String converts a UnicodeString to a golang string
+func (uni UnicodeString) String() string {
+ p := (*[0xffff]uint16)(unsafe.Pointer(uni.Buffer))
+
+ // UnicodeString is not guaranteed to be null terminated, therefore
+ // use the UnicodeString's Length field
+ lengthInChars := uni.Length / 2
+ return syscall.UTF16ToString(p[:lengthInChars])
+}
+
+// NewUnicodeString allocates a new UnicodeString and copies `s` into
+// the buffer of the new UnicodeString.
+func NewUnicodeString(s string) (*UnicodeString, error) {
+ ws := utf16.Encode(([]rune)(s))
+ if len(ws) > 32767 {
+ return nil, syscall.ENAMETOOLONG
+ }
+
+ uni := &UnicodeString{
+ Length: uint16(len(ws) * 2),
+ MaximumLength: uint16(len(ws) * 2),
+ Buffer: &make([]uint16, len(ws))[0],
+ }
+ copy((*[32768]uint16)(unsafe.Pointer(uni.Buffer))[:], ws)
+ return uni, nil
+}
+
+// ConvertStringSetToSlice is a helper function used to convert the contents of
+// `buf` into a string slice. `buf` contains a set of null terminated strings
+// with an additional null at the end to indicate the end of the set.
+func ConvertStringSetToSlice(buf []byte) ([]string, error) {
+ var results []string
+ prev := 0
+ for i := range buf {
+ if buf[i] == 0 {
+ if prev == i {
+ // found two null characters in a row, return result
+ return results, nil
+ }
+ results = append(results, string(buf[prev:i]))
+ prev = i + 1
+ }
+ }
+ return nil, errors.New("string set malformed: missing null terminator at end of buffer")
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/winapi/winapi.go b/vendor/github.com/Microsoft/hcsshim/internal/winapi/winapi.go
new file mode 100644
index 000000000..77ea13e3e
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/winapi/winapi.go
@@ -0,0 +1,5 @@
+// Package winapi contains various low-level bindings to Windows APIs. It can
+// be thought of as an extension to golang.org/x/sys/windows.
+package winapi
+
+//go:generate go run ..\..\mksyscall_windows.go -output zsyscall_windows.go net.go iocp.go jobobject.go path.go logon.go memory.go processor.go devices.go filesystem.go errors.go
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/winapi/zsyscall_windows.go b/vendor/github.com/Microsoft/hcsshim/internal/winapi/zsyscall_windows.go
new file mode 100644
index 000000000..0a990951d
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/winapi/zsyscall_windows.go
@@ -0,0 +1,294 @@
+// Code generated mksyscall_windows.exe DO NOT EDIT
+
+package winapi
+
+import (
+ "syscall"
+ "unsafe"
+
+ "golang.org/x/sys/windows"
+)
+
+var _ unsafe.Pointer
+
+// Do the interface allocations only once for common
+// Errno values.
+const (
+ errnoERROR_IO_PENDING = 997
+)
+
+var (
+ errERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING)
+)
+
+// errnoErr returns common boxed Errno values, to prevent
+// allocations at runtime.
+func errnoErr(e syscall.Errno) error {
+ switch e {
+ case 0:
+ return nil
+ case errnoERROR_IO_PENDING:
+ return errERROR_IO_PENDING
+ }
+ // TODO: add more here, after collecting data on the common
+ // error values see on Windows. (perhaps when running
+ // all.bat?)
+ return e
+}
+
+var (
+ modiphlpapi = windows.NewLazySystemDLL("iphlpapi.dll")
+ modkernel32 = windows.NewLazySystemDLL("kernel32.dll")
+ modadvapi32 = windows.NewLazySystemDLL("advapi32.dll")
+ modcfgmgr32 = windows.NewLazySystemDLL("cfgmgr32.dll")
+ modntdll = windows.NewLazySystemDLL("ntdll.dll")
+
+ procSetJobCompartmentId = modiphlpapi.NewProc("SetJobCompartmentId")
+ procIsProcessInJob = modkernel32.NewProc("IsProcessInJob")
+ procQueryInformationJobObject = modkernel32.NewProc("QueryInformationJobObject")
+ procOpenJobObjectW = modkernel32.NewProc("OpenJobObjectW")
+ procSetIoRateControlInformationJobObject = modkernel32.NewProc("SetIoRateControlInformationJobObject")
+ procGetQueuedCompletionStatus = modkernel32.NewProc("GetQueuedCompletionStatus")
+ procSearchPathW = modkernel32.NewProc("SearchPathW")
+ procLogonUserW = modadvapi32.NewProc("LogonUserW")
+ procRtlMoveMemory = modkernel32.NewProc("RtlMoveMemory")
+ procLocalAlloc = modkernel32.NewProc("LocalAlloc")
+ procLocalFree = modkernel32.NewProc("LocalFree")
+ procGetActiveProcessorCount = modkernel32.NewProc("GetActiveProcessorCount")
+ procCM_Get_Device_ID_List_SizeA = modcfgmgr32.NewProc("CM_Get_Device_ID_List_SizeA")
+ procCM_Get_Device_ID_ListA = modcfgmgr32.NewProc("CM_Get_Device_ID_ListA")
+ procCM_Locate_DevNodeW = modcfgmgr32.NewProc("CM_Locate_DevNodeW")
+ procCM_Get_DevNode_PropertyW = modcfgmgr32.NewProc("CM_Get_DevNode_PropertyW")
+ procNtCreateFile = modntdll.NewProc("NtCreateFile")
+ procNtSetInformationFile = modntdll.NewProc("NtSetInformationFile")
+ procNtOpenDirectoryObject = modntdll.NewProc("NtOpenDirectoryObject")
+ procNtQueryDirectoryObject = modntdll.NewProc("NtQueryDirectoryObject")
+ procRtlNtStatusToDosError = modntdll.NewProc("RtlNtStatusToDosError")
+)
+
+func SetJobCompartmentId(handle windows.Handle, compartmentId uint32) (win32Err error) {
+ r0, _, _ := syscall.Syscall(procSetJobCompartmentId.Addr(), 2, uintptr(handle), uintptr(compartmentId), 0)
+ if r0 != 0 {
+ win32Err = syscall.Errno(r0)
+ }
+ return
+}
+
+func IsProcessInJob(procHandle windows.Handle, jobHandle windows.Handle, result *bool) (err error) {
+ r1, _, e1 := syscall.Syscall(procIsProcessInJob.Addr(), 3, uintptr(procHandle), uintptr(jobHandle), uintptr(unsafe.Pointer(result)))
+ if r1 == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
+func QueryInformationJobObject(jobHandle windows.Handle, infoClass uint32, jobObjectInfo uintptr, jobObjectInformationLength uint32, lpReturnLength *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procQueryInformationJobObject.Addr(), 5, uintptr(jobHandle), uintptr(infoClass), uintptr(jobObjectInfo), uintptr(jobObjectInformationLength), uintptr(unsafe.Pointer(lpReturnLength)), 0)
+ if r1 == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
+func OpenJobObject(desiredAccess uint32, inheritHandle bool, lpName *uint16) (handle windows.Handle, err error) {
+ var _p0 uint32
+ if inheritHandle {
+ _p0 = 1
+ } else {
+ _p0 = 0
+ }
+ r0, _, e1 := syscall.Syscall(procOpenJobObjectW.Addr(), 3, uintptr(desiredAccess), uintptr(_p0), uintptr(unsafe.Pointer(lpName)))
+ handle = windows.Handle(r0)
+ if handle == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
+func SetIoRateControlInformationJobObject(jobHandle windows.Handle, ioRateControlInfo *JOBOBJECT_IO_RATE_CONTROL_INFORMATION) (ret uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procSetIoRateControlInformationJobObject.Addr(), 2, uintptr(jobHandle), uintptr(unsafe.Pointer(ioRateControlInfo)), 0)
+ ret = uint32(r0)
+ if ret == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
+func GetQueuedCompletionStatus(cphandle windows.Handle, qty *uint32, key *uintptr, overlapped **windows.Overlapped, timeout uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procGetQueuedCompletionStatus.Addr(), 5, uintptr(cphandle), uintptr(unsafe.Pointer(qty)), uintptr(unsafe.Pointer(key)), uintptr(unsafe.Pointer(overlapped)), uintptr(timeout), 0)
+ if r1 == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
+func SearchPath(lpPath *uint16, lpFileName *uint16, lpExtension *uint16, nBufferLength uint32, lpBuffer *uint16, lpFilePath **uint16) (size uint32, err error) {
+ r0, _, e1 := syscall.Syscall6(procSearchPathW.Addr(), 6, uintptr(unsafe.Pointer(lpPath)), uintptr(unsafe.Pointer(lpFileName)), uintptr(unsafe.Pointer(lpExtension)), uintptr(nBufferLength), uintptr(unsafe.Pointer(lpBuffer)), uintptr(unsafe.Pointer(lpFilePath)))
+ size = uint32(r0)
+ if size == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
+func LogonUser(username *uint16, domain *uint16, password *uint16, logonType uint32, logonProvider uint32, token *windows.Token) (err error) {
+ r1, _, e1 := syscall.Syscall6(procLogonUserW.Addr(), 6, uintptr(unsafe.Pointer(username)), uintptr(unsafe.Pointer(domain)), uintptr(unsafe.Pointer(password)), uintptr(logonType), uintptr(logonProvider), uintptr(unsafe.Pointer(token)))
+ if r1 == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
+func RtlMoveMemory(destination *byte, source *byte, length uintptr) (err error) {
+ r1, _, e1 := syscall.Syscall(procRtlMoveMemory.Addr(), 3, uintptr(unsafe.Pointer(destination)), uintptr(unsafe.Pointer(source)), uintptr(length))
+ if r1 == 0 {
+ if e1 != 0 {
+ err = errnoErr(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return
+}
+
+func LocalAlloc(flags uint32, size int) (ptr uintptr) {
+ r0, _, _ := syscall.Syscall(procLocalAlloc.Addr(), 2, uintptr(flags), uintptr(size), 0)
+ ptr = uintptr(r0)
+ return
+}
+
+func LocalFree(ptr uintptr) {
+ syscall.Syscall(procLocalFree.Addr(), 1, uintptr(ptr), 0, 0)
+ return
+}
+
+func GetActiveProcessorCount(groupNumber uint16) (amount uint32) {
+ r0, _, _ := syscall.Syscall(procGetActiveProcessorCount.Addr(), 1, uintptr(groupNumber), 0, 0)
+ amount = uint32(r0)
+ return
+}
+
+func CMGetDeviceIDListSize(pulLen *uint32, pszFilter *byte, uFlags uint32) (hr error) {
+ r0, _, _ := syscall.Syscall(procCM_Get_Device_ID_List_SizeA.Addr(), 3, uintptr(unsafe.Pointer(pulLen)), uintptr(unsafe.Pointer(pszFilter)), uintptr(uFlags))
+ if int32(r0) < 0 {
+ if r0&0x1fff0000 == 0x00070000 {
+ r0 &= 0xffff
+ }
+ hr = syscall.Errno(r0)
+ }
+ return
+}
+
+func CMGetDeviceIDList(pszFilter *byte, buffer *byte, bufferLen uint32, uFlags uint32) (hr error) {
+ r0, _, _ := syscall.Syscall6(procCM_Get_Device_ID_ListA.Addr(), 4, uintptr(unsafe.Pointer(pszFilter)), uintptr(unsafe.Pointer(buffer)), uintptr(bufferLen), uintptr(uFlags), 0, 0)
+ if int32(r0) < 0 {
+ if r0&0x1fff0000 == 0x00070000 {
+ r0 &= 0xffff
+ }
+ hr = syscall.Errno(r0)
+ }
+ return
+}
+
+func CMLocateDevNode(pdnDevInst *uint32, pDeviceID string, uFlags uint32) (hr error) {
+ var _p0 *uint16
+ _p0, hr = syscall.UTF16PtrFromString(pDeviceID)
+ if hr != nil {
+ return
+ }
+ return _CMLocateDevNode(pdnDevInst, _p0, uFlags)
+}
+
+func _CMLocateDevNode(pdnDevInst *uint32, pDeviceID *uint16, uFlags uint32) (hr error) {
+ r0, _, _ := syscall.Syscall(procCM_Locate_DevNodeW.Addr(), 3, uintptr(unsafe.Pointer(pdnDevInst)), uintptr(unsafe.Pointer(pDeviceID)), uintptr(uFlags))
+ if int32(r0) < 0 {
+ if r0&0x1fff0000 == 0x00070000 {
+ r0 &= 0xffff
+ }
+ hr = syscall.Errno(r0)
+ }
+ return
+}
+
+func CMGetDevNodeProperty(dnDevInst uint32, propertyKey *DevPropKey, propertyType *uint32, propertyBuffer *uint16, propertyBufferSize *uint32, uFlags uint32) (hr error) {
+ r0, _, _ := syscall.Syscall6(procCM_Get_DevNode_PropertyW.Addr(), 6, uintptr(dnDevInst), uintptr(unsafe.Pointer(propertyKey)), uintptr(unsafe.Pointer(propertyType)), uintptr(unsafe.Pointer(propertyBuffer)), uintptr(unsafe.Pointer(propertyBufferSize)), uintptr(uFlags))
+ if int32(r0) < 0 {
+ if r0&0x1fff0000 == 0x00070000 {
+ r0 &= 0xffff
+ }
+ hr = syscall.Errno(r0)
+ }
+ return
+}
+
+func NtCreateFile(handle *uintptr, accessMask uint32, oa *ObjectAttributes, iosb *IOStatusBlock, allocationSize *uint64, fileAttributes uint32, shareAccess uint32, createDisposition uint32, createOptions uint32, eaBuffer *byte, eaLength uint32) (status uint32) {
+ r0, _, _ := syscall.Syscall12(procNtCreateFile.Addr(), 11, uintptr(unsafe.Pointer(handle)), uintptr(accessMask), uintptr(unsafe.Pointer(oa)), uintptr(unsafe.Pointer(iosb)), uintptr(unsafe.Pointer(allocationSize)), uintptr(fileAttributes), uintptr(shareAccess), uintptr(createDisposition), uintptr(createOptions), uintptr(unsafe.Pointer(eaBuffer)), uintptr(eaLength), 0)
+ status = uint32(r0)
+ return
+}
+
+func NtSetInformationFile(handle uintptr, iosb *IOStatusBlock, information uintptr, length uint32, class uint32) (status uint32) {
+ r0, _, _ := syscall.Syscall6(procNtSetInformationFile.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(iosb)), uintptr(information), uintptr(length), uintptr(class), 0)
+ status = uint32(r0)
+ return
+}
+
+func NtOpenDirectoryObject(handle *uintptr, accessMask uint32, oa *ObjectAttributes) (status uint32) {
+ r0, _, _ := syscall.Syscall(procNtOpenDirectoryObject.Addr(), 3, uintptr(unsafe.Pointer(handle)), uintptr(accessMask), uintptr(unsafe.Pointer(oa)))
+ status = uint32(r0)
+ return
+}
+
+func NtQueryDirectoryObject(handle uintptr, buffer *byte, length uint32, singleEntry bool, restartScan bool, context *uint32, returnLength *uint32) (status uint32) {
+ var _p0 uint32
+ if singleEntry {
+ _p0 = 1
+ } else {
+ _p0 = 0
+ }
+ var _p1 uint32
+ if restartScan {
+ _p1 = 1
+ } else {
+ _p1 = 0
+ }
+ r0, _, _ := syscall.Syscall9(procNtQueryDirectoryObject.Addr(), 7, uintptr(handle), uintptr(unsafe.Pointer(buffer)), uintptr(length), uintptr(_p0), uintptr(_p1), uintptr(unsafe.Pointer(context)), uintptr(unsafe.Pointer(returnLength)), 0, 0)
+ status = uint32(r0)
+ return
+}
+
+func RtlNtStatusToDosError(status uint32) (winerr error) {
+ r0, _, _ := syscall.Syscall(procRtlNtStatusToDosError.Addr(), 1, uintptr(status), 0, 0)
+ if r0 != 0 {
+ winerr = syscall.Errno(r0)
+ }
+ return
+}
diff --git a/vendor/github.com/Microsoft/hcsshim/layer.go b/vendor/github.com/Microsoft/hcsshim/layer.go
index f60ba5501..891616370 100644
--- a/vendor/github.com/Microsoft/hcsshim/layer.go
+++ b/vendor/github.com/Microsoft/hcsshim/layer.go
@@ -1,6 +1,7 @@
package hcsshim
import (
+ "context"
"crypto/sha1"
"path/filepath"
@@ -13,59 +14,59 @@ func layerPath(info *DriverInfo, id string) string {
}
func ActivateLayer(info DriverInfo, id string) error {
- return wclayer.ActivateLayer(layerPath(&info, id))
+ return wclayer.ActivateLayer(context.Background(), layerPath(&info, id))
}
func CreateLayer(info DriverInfo, id, parent string) error {
- return wclayer.CreateLayer(layerPath(&info, id), parent)
+ return wclayer.CreateLayer(context.Background(), layerPath(&info, id), parent)
}
// New clients should use CreateScratchLayer instead. Kept in to preserve API compatibility.
func CreateSandboxLayer(info DriverInfo, layerId, parentId string, parentLayerPaths []string) error {
- return wclayer.CreateScratchLayer(layerPath(&info, layerId), parentLayerPaths)
+ return wclayer.CreateScratchLayer(context.Background(), layerPath(&info, layerId), parentLayerPaths)
}
func CreateScratchLayer(info DriverInfo, layerId, parentId string, parentLayerPaths []string) error {
- return wclayer.CreateScratchLayer(layerPath(&info, layerId), parentLayerPaths)
+ return wclayer.CreateScratchLayer(context.Background(), layerPath(&info, layerId), parentLayerPaths)
}
func DeactivateLayer(info DriverInfo, id string) error {
- return wclayer.DeactivateLayer(layerPath(&info, id))
+ return wclayer.DeactivateLayer(context.Background(), layerPath(&info, id))
}
func DestroyLayer(info DriverInfo, id string) error {
- return wclayer.DestroyLayer(layerPath(&info, id))
+ return wclayer.DestroyLayer(context.Background(), layerPath(&info, id))
}
// New clients should use ExpandScratchSize instead. Kept in to preserve API compatibility.
func ExpandSandboxSize(info DriverInfo, layerId string, size uint64) error {
- return wclayer.ExpandScratchSize(layerPath(&info, layerId), size)
+ return wclayer.ExpandScratchSize(context.Background(), layerPath(&info, layerId), size)
}
func ExpandScratchSize(info DriverInfo, layerId string, size uint64) error {
- return wclayer.ExpandScratchSize(layerPath(&info, layerId), size)
+ return wclayer.ExpandScratchSize(context.Background(), layerPath(&info, layerId), size)
}
func ExportLayer(info DriverInfo, layerId string, exportFolderPath string, parentLayerPaths []string) error {
- return wclayer.ExportLayer(layerPath(&info, layerId), exportFolderPath, parentLayerPaths)
+ return wclayer.ExportLayer(context.Background(), layerPath(&info, layerId), exportFolderPath, parentLayerPaths)
}
func GetLayerMountPath(info DriverInfo, id string) (string, error) {
- return wclayer.GetLayerMountPath(layerPath(&info, id))
+ return wclayer.GetLayerMountPath(context.Background(), layerPath(&info, id))
}
func GetSharedBaseImages() (imageData string, err error) {
- return wclayer.GetSharedBaseImages()
+ return wclayer.GetSharedBaseImages(context.Background())
}
func ImportLayer(info DriverInfo, layerID string, importFolderPath string, parentLayerPaths []string) error {
- return wclayer.ImportLayer(layerPath(&info, layerID), importFolderPath, parentLayerPaths)
+ return wclayer.ImportLayer(context.Background(), layerPath(&info, layerID), importFolderPath, parentLayerPaths)
}
func LayerExists(info DriverInfo, id string) (bool, error) {
- return wclayer.LayerExists(layerPath(&info, id))
+ return wclayer.LayerExists(context.Background(), layerPath(&info, id))
}
func PrepareLayer(info DriverInfo, layerId string, parentLayerPaths []string) error {
- return wclayer.PrepareLayer(layerPath(&info, layerId), parentLayerPaths)
+ return wclayer.PrepareLayer(context.Background(), layerPath(&info, layerId), parentLayerPaths)
}
func ProcessBaseLayer(path string) error {
- return wclayer.ProcessBaseLayer(path)
+ return wclayer.ProcessBaseLayer(context.Background(), path)
}
func ProcessUtilityVMImage(path string) error {
- return wclayer.ProcessUtilityVMImage(path)
+ return wclayer.ProcessUtilityVMImage(context.Background(), path)
}
func UnprepareLayer(info DriverInfo, layerId string) error {
- return wclayer.UnprepareLayer(layerPath(&info, layerId))
+ return wclayer.UnprepareLayer(context.Background(), layerPath(&info, layerId))
}
type DriverInfo struct {
@@ -76,7 +77,7 @@ type DriverInfo struct {
type GUID [16]byte
func NameToGuid(name string) (id GUID, err error) {
- g, err := wclayer.NameToGuid(name)
+ g, err := wclayer.NameToGuid(context.Background(), name)
return g.ToWindowsArray(), err
}
@@ -94,13 +95,13 @@ func (g *GUID) ToString() string {
type LayerReader = wclayer.LayerReader
func NewLayerReader(info DriverInfo, layerID string, parentLayerPaths []string) (LayerReader, error) {
- return wclayer.NewLayerReader(layerPath(&info, layerID), parentLayerPaths)
+ return wclayer.NewLayerReader(context.Background(), layerPath(&info, layerID), parentLayerPaths)
}
type LayerWriter = wclayer.LayerWriter
func NewLayerWriter(info DriverInfo, layerID string, parentLayerPaths []string) (LayerWriter, error) {
- return wclayer.NewLayerWriter(layerPath(&info, layerID), parentLayerPaths)
+ return wclayer.NewLayerWriter(context.Background(), layerPath(&info, layerID), parentLayerPaths)
}
type WC_LAYER_DESCRIPTOR = wclayer.WC_LAYER_DESCRIPTOR
diff --git a/vendor/github.com/Microsoft/hcsshim/osversion/windowsbuilds.go b/vendor/github.com/Microsoft/hcsshim/osversion/windowsbuilds.go
index 726d1c8c1..e9267b955 100644
--- a/vendor/github.com/Microsoft/hcsshim/osversion/windowsbuilds.go
+++ b/vendor/github.com/Microsoft/hcsshim/osversion/windowsbuilds.go
@@ -24,4 +24,15 @@ const (
// V19H1 (version 1903) corresponds to Windows Server 1903 (semi-annual
// channel).
V19H1 = 18362
+
+ // V19H2 (version 1909) corresponds to Windows Server 1909 (semi-annual
+ // channel).
+ V19H2 = 18363
+
+ // V20H1 (version 2004) corresponds to Windows Server 2004 (semi-annual
+ // channel).
+ V20H1 = 19041
+
+ // V20H2 corresponds to Windows Server 20H2 (semi-annual channel).
+ V20H2 = 19042
)
diff --git a/vendor/github.com/NYTimes/gziphandler/.travis.yml b/vendor/github.com/NYTimes/gziphandler/.travis.yml
index d2b67f69c..94dfae362 100644
--- a/vendor/github.com/NYTimes/gziphandler/.travis.yml
+++ b/vendor/github.com/NYTimes/gziphandler/.travis.yml
@@ -1,6 +1,10 @@
language: go
-
go:
- - 1.7
- - 1.8
+ - 1.x
- tip
+env:
+ - GO111MODULE=on
+install:
+ - go mod download
+script:
+ - go test -race -v
diff --git a/vendor/github.com/NYTimes/gziphandler/LICENSE b/vendor/github.com/NYTimes/gziphandler/LICENSE
new file mode 100644
index 000000000..df6192d36
--- /dev/null
+++ b/vendor/github.com/NYTimes/gziphandler/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ 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 2016-2017 The New York Times Company
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/vendor/github.com/NYTimes/gziphandler/LICENSE.md b/vendor/github.com/NYTimes/gziphandler/LICENSE.md
deleted file mode 100644
index b7e2ecb63..000000000
--- a/vendor/github.com/NYTimes/gziphandler/LICENSE.md
+++ /dev/null
@@ -1,13 +0,0 @@
-Copyright (c) 2015 The New York Times Company
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this library except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
diff --git a/vendor/github.com/NYTimes/gziphandler/README.md b/vendor/github.com/NYTimes/gziphandler/README.md
index 6d7246070..6259acaca 100644
--- a/vendor/github.com/NYTimes/gziphandler/README.md
+++ b/vendor/github.com/NYTimes/gziphandler/README.md
@@ -6,6 +6,10 @@ response body, for clients which support it. Although it's usually simpler to
leave that to a reverse proxy (like nginx or Varnish), this package is useful
when that's undesirable.
+## Install
+```bash
+go get -u github.com/NYTimes/gziphandler
+```
## Usage
@@ -48,5 +52,5 @@ The docs can be found at [godoc.org][docs], as usual.
-[docs]: https://godoc.org/github.com/nytimes/gziphandler
-[license]: https://github.com/nytimes/gziphandler/blob/master/LICENSE.md
+[docs]: https://godoc.org/github.com/NYTimes/gziphandler
+[license]: https://github.com/NYTimes/gziphandler/blob/master/LICENSE
diff --git a/vendor/github.com/NYTimes/gziphandler/gzip.go b/vendor/github.com/NYTimes/gziphandler/gzip.go
index ea6dba1e7..c112bbdf8 100644
--- a/vendor/github.com/NYTimes/gziphandler/gzip.go
+++ b/vendor/github.com/NYTimes/gziphandler/gzip.go
@@ -1,10 +1,11 @@
-package gziphandler
+package gziphandler // import "github.com/NYTimes/gziphandler"
import (
"bufio"
"compress/gzip"
"fmt"
"io"
+ "mime"
"net"
"net/http"
"strconv"
@@ -28,9 +29,11 @@ const (
// The examples seem to indicate that it is.
DefaultQValue = 1.0
- // DefaultMinSize defines the minimum size to reach to enable compression.
- // It's 512 bytes.
- DefaultMinSize = 512
+ // DefaultMinSize is the default minimum size until we enable gzip compression.
+ // 1500 bytes is the MTU size for the internet since that is the largest size allowed at the network layer.
+ // If you take a file that is 1300 bytes and compress it to 800 bytes, it’s still transmitted in that same 1500 byte packet regardless, so you’ve gained nothing.
+ // That being the case, you should restrict the gzip compression to files with a size greater than a single packet, 1400 bytes (1.4KB) is a safe value.
+ DefaultMinSize = 1400
)
// gzipWriterPools stores a sync.Pool for each compression level for reuse of
@@ -80,40 +83,71 @@ type GzipResponseWriter struct {
minSize int // Specifed the minimum response size to gzip. If the response length is bigger than this value, it is compressed.
buf []byte // Holds the first part of the write before reaching the minSize or the end of the write.
+ ignore bool // If true, then we immediately passthru writes to the underlying ResponseWriter.
+
+ contentTypes []parsedContentType // Only compress if the response is one of these content-types. All are accepted if empty.
+}
+
+type GzipResponseWriterWithCloseNotify struct {
+ *GzipResponseWriter
+}
+
+func (w GzipResponseWriterWithCloseNotify) CloseNotify() <-chan bool {
+ return w.ResponseWriter.(http.CloseNotifier).CloseNotify()
}
// Write appends data to the gzip writer.
func (w *GzipResponseWriter) Write(b []byte) (int, error) {
- // If content type is not set.
- if _, ok := w.Header()[contentType]; !ok {
- // It infer it from the uncompressed body.
- w.Header().Set(contentType, http.DetectContentType(b))
- }
-
// GZIP responseWriter is initialized. Use the GZIP responseWriter.
if w.gw != nil {
- n, err := w.gw.Write(b)
- return n, err
+ return w.gw.Write(b)
+ }
+
+ // If we have already decided not to use GZIP, immediately passthrough.
+ if w.ignore {
+ return w.ResponseWriter.Write(b)
}
// Save the write into a buffer for later use in GZIP responseWriter (if content is long enough) or at close with regular responseWriter.
// On the first write, w.buf changes from nil to a valid slice
w.buf = append(w.buf, b...)
- // If the global writes are bigger than the minSize, compression is enable.
- if len(w.buf) >= w.minSize {
- err := w.startGzip()
- if err != nil {
- return 0, err
+ var (
+ cl, _ = strconv.Atoi(w.Header().Get(contentLength))
+ ct = w.Header().Get(contentType)
+ ce = w.Header().Get(contentEncoding)
+ )
+ // Only continue if they didn't already choose an encoding or a known unhandled content length or type.
+ if ce == "" && (cl == 0 || cl >= w.minSize) && (ct == "" || handleContentType(w.contentTypes, ct)) {
+ // If the current buffer is less than minSize and a Content-Length isn't set, then wait until we have more data.
+ if len(w.buf) < w.minSize && cl == 0 {
+ return len(b), nil
+ }
+ // If the Content-Length is larger than minSize or the current buffer is larger than minSize, then continue.
+ if cl >= w.minSize || len(w.buf) >= w.minSize {
+ // If a Content-Type wasn't specified, infer it from the current buffer.
+ if ct == "" {
+ ct = http.DetectContentType(w.buf)
+ w.Header().Set(contentType, ct)
+ }
+ // If the Content-Type is acceptable to GZIP, initialize the GZIP writer.
+ if handleContentType(w.contentTypes, ct) {
+ if err := w.startGzip(); err != nil {
+ return 0, err
+ }
+ return len(b), nil
+ }
}
}
-
+ // If we got here, we should not GZIP this response.
+ if err := w.startPlain(); err != nil {
+ return 0, err
+ }
return len(b), nil
}
-// startGzip initialize any GZIP specific informations.
+// startGzip initializes a GZIP writer and writes the buffer.
func (w *GzipResponseWriter) startGzip() error {
-
// Set the GZIP header.
w.Header().Set(contentEncoding, "gzip")
@@ -125,28 +159,57 @@ func (w *GzipResponseWriter) startGzip() error {
// Write the header to gzip response.
if w.code != 0 {
w.ResponseWriter.WriteHeader(w.code)
+ // Ensure that no other WriteHeader's happen
+ w.code = 0
}
- // Initialize the GZIP response.
- w.init()
-
- // Flush the buffer into the gzip reponse.
- n, err := w.gw.Write(w.buf)
+ // Initialize and flush the buffer into the gzip response if there are any bytes.
+ // If there aren't any, we shouldn't initialize it yet because on Close it will
+ // write the gzip header even if nothing was ever written.
+ if len(w.buf) > 0 {
+ // Initialize the GZIP response.
+ w.init()
+ n, err := w.gw.Write(w.buf)
+
+ // This should never happen (per io.Writer docs), but if the write didn't
+ // accept the entire buffer but returned no specific error, we have no clue
+ // what's going on, so abort just to be safe.
+ if err == nil && n < len(w.buf) {
+ err = io.ErrShortWrite
+ }
+ return err
+ }
+ return nil
+}
+// startPlain writes to sent bytes and buffer the underlying ResponseWriter without gzip.
+func (w *GzipResponseWriter) startPlain() error {
+ if w.code != 0 {
+ w.ResponseWriter.WriteHeader(w.code)
+ // Ensure that no other WriteHeader's happen
+ w.code = 0
+ }
+ w.ignore = true
+ // If Write was never called then don't call Write on the underlying ResponseWriter.
+ if w.buf == nil {
+ return nil
+ }
+ n, err := w.ResponseWriter.Write(w.buf)
+ w.buf = nil
// This should never happen (per io.Writer docs), but if the write didn't
// accept the entire buffer but returned no specific error, we have no clue
// what's going on, so abort just to be safe.
if err == nil && n < len(w.buf) {
- return io.ErrShortWrite
+ err = io.ErrShortWrite
}
-
- w.buf = nil
return err
}
// WriteHeader just saves the response code until close or GZIP effective writes.
func (w *GzipResponseWriter) WriteHeader(code int) {
- w.code = code
+ if w.code == 0 {
+ w.code = code
+ }
}
// init graps a new gzip writer from the gzipWriterPool and writes the correct
@@ -161,19 +224,18 @@ func (w *GzipResponseWriter) init() {
// Close will close the gzip.Writer and will put it back in the gzipWriterPool.
func (w *GzipResponseWriter) Close() error {
+ if w.ignore {
+ return nil
+ }
+
if w.gw == nil {
- // Gzip not trigged yet, write out regular response.
- if w.code != 0 {
- w.ResponseWriter.WriteHeader(w.code)
- }
- if w.buf != nil {
- _, writeErr := w.ResponseWriter.Write(w.buf)
- // Returns the error if any at write.
- if writeErr != nil {
- return fmt.Errorf("gziphandler: write to regular responseWriter at close gets error: %q", writeErr.Error())
- }
+ // GZIP not triggered yet, write out regular response.
+ err := w.startPlain()
+ // Returns the error if any at write.
+ if err != nil {
+ err = fmt.Errorf("gziphandler: write to regular responseWriter at close gets error: %q", err.Error())
}
- return nil
+ return err
}
err := w.gw.Close()
@@ -186,6 +248,14 @@ func (w *GzipResponseWriter) Close() error {
// http.ResponseWriter if it is an http.Flusher. This makes GzipResponseWriter
// an http.Flusher.
func (w *GzipResponseWriter) Flush() {
+ if w.gw == nil && !w.ignore {
+ // Only flush once startGzip or startPlain has been called.
+ //
+ // Flush is thus a no-op until we're certain whether a plain
+ // or gzipped response will be served.
+ return
+ }
+
if w.gw != nil {
w.gw.Flush()
}
@@ -230,27 +300,44 @@ func NewGzipLevelHandler(level int) (func(http.Handler) http.Handler, error) {
// NewGzipLevelAndMinSize behave as NewGzipLevelHandler except it let the caller
// specify the minimum size before compression.
func NewGzipLevelAndMinSize(level, minSize int) (func(http.Handler) http.Handler, error) {
- if level != gzip.DefaultCompression && (level < gzip.BestSpeed || level > gzip.BestCompression) {
- return nil, fmt.Errorf("invalid compression level requested: %d", level)
+ return GzipHandlerWithOpts(CompressionLevel(level), MinSize(minSize))
+}
+
+func GzipHandlerWithOpts(opts ...option) (func(http.Handler) http.Handler, error) {
+ c := &config{
+ level: gzip.DefaultCompression,
+ minSize: DefaultMinSize,
}
- if minSize < 0 {
- return nil, fmt.Errorf("minimum size must be more than zero")
+
+ for _, o := range opts {
+ o(c)
+ }
+
+ if err := c.validate(); err != nil {
+ return nil, err
}
+
return func(h http.Handler) http.Handler {
- index := poolIndex(level)
+ index := poolIndex(c.level)
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Header().Add(vary, acceptEncoding)
-
if acceptsGzip(r) {
gw := &GzipResponseWriter{
ResponseWriter: w,
index: index,
- minSize: minSize,
+ minSize: c.minSize,
+ contentTypes: c.contentTypes,
}
defer gw.Close()
- h.ServeHTTP(gw, r)
+ if _, ok := w.(http.CloseNotifier); ok {
+ gwcn := GzipResponseWriterWithCloseNotify{gw}
+ h.ServeHTTP(gwcn, r)
+ } else {
+ h.ServeHTTP(gw, r)
+ }
+
} else {
h.ServeHTTP(w, r)
}
@@ -258,6 +345,98 @@ func NewGzipLevelAndMinSize(level, minSize int) (func(http.Handler) http.Handler
}, nil
}
+// Parsed representation of one of the inputs to ContentTypes.
+// See https://golang.org/pkg/mime/#ParseMediaType
+type parsedContentType struct {
+ mediaType string
+ params map[string]string
+}
+
+// equals returns whether this content type matches another content type.
+func (pct parsedContentType) equals(mediaType string, params map[string]string) bool {
+ if pct.mediaType != mediaType {
+ return false
+ }
+ // if pct has no params, don't care about other's params
+ if len(pct.params) == 0 {
+ return true
+ }
+
+ // if pct has any params, they must be identical to other's.
+ if len(pct.params) != len(params) {
+ return false
+ }
+ for k, v := range pct.params {
+ if w, ok := params[k]; !ok || v != w {
+ return false
+ }
+ }
+ return true
+}
+
+// Used for functional configuration.
+type config struct {
+ minSize int
+ level int
+ contentTypes []parsedContentType
+}
+
+func (c *config) validate() error {
+ if c.level != gzip.DefaultCompression && (c.level < gzip.BestSpeed || c.level > gzip.BestCompression) {
+ return fmt.Errorf("invalid compression level requested: %d", c.level)
+ }
+
+ if c.minSize < 0 {
+ return fmt.Errorf("minimum size must be more than zero")
+ }
+
+ return nil
+}
+
+type option func(c *config)
+
+func MinSize(size int) option {
+ return func(c *config) {
+ c.minSize = size
+ }
+}
+
+func CompressionLevel(level int) option {
+ return func(c *config) {
+ c.level = level
+ }
+}
+
+// ContentTypes specifies a list of content types to compare
+// the Content-Type header to before compressing. If none
+// match, the response will be returned as-is.
+//
+// Content types are compared in a case-insensitive, whitespace-ignored
+// manner.
+//
+// A MIME type without any other directive will match a content type
+// that has the same MIME type, regardless of that content type's other
+// directives. I.e., "text/html" will match both "text/html" and
+// "text/html; charset=utf-8".
+//
+// A MIME type with any other directive will only match a content type
+// that has the same MIME type and other directives. I.e.,
+// "text/html; charset=utf-8" will only match "text/html; charset=utf-8".
+//
+// By default, responses are gzipped regardless of
+// Content-Type.
+func ContentTypes(types []string) option {
+ return func(c *config) {
+ c.contentTypes = []parsedContentType{}
+ for _, v := range types {
+ mediaType, params, err := mime.ParseMediaType(v)
+ if err == nil {
+ c.contentTypes = append(c.contentTypes, parsedContentType{mediaType, params})
+ }
+ }
+ }
+}
+
// GzipHandler wraps an HTTP handler, to transparently gzip the response body if
// the client supports it (via the Accept-Encoding header). This will compress at
// the default compression level.
@@ -273,6 +452,27 @@ func acceptsGzip(r *http.Request) bool {
return acceptedEncodings["gzip"] > 0.0
}
+// returns true if we've been configured to compress the specific content type.
+func handleContentType(contentTypes []parsedContentType, ct string) bool {
+ // If contentTypes is empty we handle all content types.
+ if len(contentTypes) == 0 {
+ return true
+ }
+
+ mediaType, params, err := mime.ParseMediaType(ct)
+ if err != nil {
+ return false
+ }
+
+ for _, c := range contentTypes {
+ if c.equals(mediaType, params) {
+ return true
+ }
+ }
+
+ return false
+}
+
// parseEncodings attempts to parse a list of codings, per RFC 2616, as might
// appear in an Accept-Encoding header. It returns a map of content-codings to
// quality values, and an error containing the errors encountered. It's probably
diff --git a/vendor/github.com/andybalholm/brotli/go.mod b/vendor/github.com/andybalholm/brotli/go.mod
deleted file mode 100644
index cb505fa05..000000000
--- a/vendor/github.com/andybalholm/brotli/go.mod
+++ /dev/null
@@ -1,5 +0,0 @@
-module github.com/andybalholm/brotli
-
-go 1.12
-
-require github.com/golang/gddo v0.0.0-20190419222130-af0f2af80721
diff --git a/vendor/github.com/andybalholm/brotli/go.sum b/vendor/github.com/andybalholm/brotli/go.sum
deleted file mode 100644
index 2ed61f383..000000000
--- a/vendor/github.com/andybalholm/brotli/go.sum
+++ /dev/null
@@ -1,2 +0,0 @@
-github.com/golang/gddo v0.0.0-20190419222130-af0f2af80721 h1:KRMr9A3qfbVM7iV/WcLY/rL5LICqwMHLhwRXKu99fXw=
-github.com/golang/gddo v0.0.0-20190419222130-af0f2af80721/go.mod h1:xEhNfoBDX1hzLm2Nf80qUvZ2sVwoMZ8d6IE2SrsQfh4=
diff --git a/vendor/github.com/asaskevich/govalidator/README.md b/vendor/github.com/asaskevich/govalidator/README.md
index bfe6e35b1..78f999e83 100644
--- a/vendor/github.com/asaskevich/govalidator/README.md
+++ b/vendor/github.com/asaskevich/govalidator/README.md
@@ -83,14 +83,14 @@ This was changed to prevent data races when accessing custom validators.
import "github.com/asaskevich/govalidator"
// before
-govalidator.CustomTypeTagMap["customByteArrayValidator"] = CustomTypeValidator(func(i interface{}, o interface{}) bool {
+govalidator.CustomTypeTagMap["customByteArrayValidator"] = func(i interface{}, o interface{}) bool {
// ...
-})
+}
// after
-govalidator.CustomTypeTagMap.Set("customByteArrayValidator", CustomTypeValidator(func(i interface{}, o interface{}) bool {
+govalidator.CustomTypeTagMap.Set("customByteArrayValidator", func(i interface{}, o interface{}) bool {
// ...
-}))
+})
```
#### List of functions:
@@ -238,7 +238,7 @@ func Trim(str, chars string) string
func Truncate(str string, length int, ending string) string
func TruncatingErrorf(str string, args ...interface{}) error
func UnderscoreToCamelCase(s string) string
-func ValidateMap(s map[string]interface{}, m map[string]interface{}) (bool, error)
+func ValidateMap(inputMap map[string]interface{}, validationMap map[string]interface{}) (bool, error)
func ValidateStruct(s interface{}) (bool, error)
func WhiteList(str, chars string) string
type ConditionIterator
@@ -461,7 +461,7 @@ var inputMap = map[string]interface{}{
},
}
-result, err := govalidator.ValidateMap(mapTemplate, inputMap)
+result, err := govalidator.ValidateMap(inputMap, mapTemplate)
if err != nil {
println("error: " + err.Error())
}
@@ -487,7 +487,7 @@ type StructWithCustomByteArray struct {
CustomMinLength int `valid:"-"`
}
-govalidator.CustomTypeTagMap.Set("customByteArrayValidator", CustomTypeValidator(func(i interface{}, context interface{}) bool {
+govalidator.CustomTypeTagMap.Set("customByteArrayValidator", func(i interface{}, context interface{}) bool {
switch v := context.(type) { // you can type switch on the context interface being validated
case StructWithCustomByteArray:
// you can check and validate against some other field in the context,
@@ -507,14 +507,25 @@ govalidator.CustomTypeTagMap.Set("customByteArrayValidator", CustomTypeValidator
}
}
return false
-}))
-govalidator.CustomTypeTagMap.Set("customMinLengthValidator", CustomTypeValidator(func(i interface{}, context interface{}) bool {
+})
+govalidator.CustomTypeTagMap.Set("customMinLengthValidator", func(i interface{}, context interface{}) bool {
switch v := context.(type) { // this validates a field against the value in another field, i.e. dependent validation
case StructWithCustomByteArray:
return len(v.ID) >= v.CustomMinLength
}
return false
-}))
+})
+```
+
+###### Loop over Error()
+By default .Error() returns all errors in a single String. To access each error you can do this:
+```go
+ if err != nil {
+ errs := err.(govalidator.Errors).Errors()
+ for _, e := range errs {
+ fmt.Println(e.Error())
+ }
+ }
```
###### Custom error messages
@@ -602,4 +613,4 @@ Support this project by becoming a sponsor. Your logo will show up here with a l
## License
-[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fasaskevich%2Fgovalidator.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fasaskevich%2Fgovalidator?ref=badge_large)
\ No newline at end of file
+[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fasaskevich%2Fgovalidator.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fasaskevich%2Fgovalidator?ref=badge_large)
diff --git a/vendor/github.com/asaskevich/govalidator/error.go b/vendor/github.com/asaskevich/govalidator/error.go
index 655b750cb..1da2336f4 100644
--- a/vendor/github.com/asaskevich/govalidator/error.go
+++ b/vendor/github.com/asaskevich/govalidator/error.go
@@ -1,6 +1,9 @@
package govalidator
-import "strings"
+import (
+ "sort"
+ "strings"
+)
// Errors is an array of multiple errors and conforms to the error interface.
type Errors []error
@@ -15,6 +18,7 @@ func (es Errors) Error() string {
for _, e := range es {
errs = append(errs, e.Error())
}
+ sort.Strings(errs)
return strings.Join(errs, ";")
}
diff --git a/vendor/github.com/asaskevich/govalidator/go.mod b/vendor/github.com/asaskevich/govalidator/go.mod
deleted file mode 100644
index c1ce891df..000000000
--- a/vendor/github.com/asaskevich/govalidator/go.mod
+++ /dev/null
@@ -1,3 +0,0 @@
-module github.com/asaskevich/govalidator
-
-go 1.12
diff --git a/vendor/github.com/asaskevich/govalidator/patterns.go b/vendor/github.com/asaskevich/govalidator/patterns.go
index 1cf972683..e55451cff 100644
--- a/vendor/github.com/asaskevich/govalidator/patterns.go
+++ b/vendor/github.com/asaskevich/govalidator/patterns.go
@@ -48,6 +48,7 @@ const (
hasUpperCase string = ".*[[:upper:]]"
hasWhitespace string = ".*[[:space:]]"
hasWhitespaceOnly string = "^[[:space:]]+$"
+ IMEI string = "^[0-9a-f]{14}$|^\\d{15}$|^\\d{18}$"
)
// Used by IsFilePath func
@@ -100,4 +101,5 @@ var (
rxHasUpperCase = regexp.MustCompile(hasUpperCase)
rxHasWhitespace = regexp.MustCompile(hasWhitespace)
rxHasWhitespaceOnly = regexp.MustCompile(hasWhitespaceOnly)
+ rxIMEI = regexp.MustCompile(IMEI)
)
diff --git a/vendor/github.com/asaskevich/govalidator/types.go b/vendor/github.com/asaskevich/govalidator/types.go
index f42a346c1..b57b666f5 100644
--- a/vendor/github.com/asaskevich/govalidator/types.go
+++ b/vendor/github.com/asaskevich/govalidator/types.go
@@ -162,6 +162,7 @@ var TagMap = map[string]Validator{
"ISO3166Alpha2": IsISO3166Alpha2,
"ISO3166Alpha3": IsISO3166Alpha3,
"ISO4217": IsISO4217,
+ "IMEI": IsIMEI,
}
// ISO3166Entry stores country codes
diff --git a/vendor/github.com/asaskevich/govalidator/validator.go b/vendor/github.com/asaskevich/govalidator/validator.go
index 14682e01e..298f9920d 100644
--- a/vendor/github.com/asaskevich/govalidator/validator.go
+++ b/vendor/github.com/asaskevich/govalidator/validator.go
@@ -282,7 +282,7 @@ func HasLowerCase(str string) bool {
return rxHasLowerCase.MatchString(str)
}
-// HasUpperCase check if the string contians as least 1 uppercase. Empty string is valid.
+// HasUpperCase check if the string contains as least 1 uppercase. Empty string is valid.
func HasUpperCase(str string) bool {
if IsNull(str) {
return true
@@ -575,7 +575,7 @@ func IsDNSName(str string) bool {
// IsHash checks if a string is a hash of type algorithm.
// Algorithm is one of ['md4', 'md5', 'sha1', 'sha256', 'sha384', 'sha512', 'ripemd128', 'ripemd160', 'tiger128', 'tiger160', 'tiger192', 'crc32', 'crc32b']
func IsHash(str string, algorithm string) bool {
- len := "0"
+ var len string
algo := strings.ToLower(algorithm)
if algo == "crc32" || algo == "crc32b" {
@@ -737,6 +737,11 @@ func IsLongitude(str string) bool {
return rxLongitude.MatchString(str)
}
+// IsIMEI check if a string is valid IMEI
+func IsIMEI(str string) bool {
+ return rxIMEI.MatchString(str)
+}
+
// IsRsaPublicKey check if a string is valid public key with provided length
func IsRsaPublicKey(str string, keylen int) bool {
bb := bytes.NewBufferString(str)
@@ -808,8 +813,9 @@ func PrependPathToErrors(err error, path string) error {
// ValidateMap use validation map for fields.
// result will be equal to `false` if there are any errors.
-// m is the validation map in the form
-// map[string]interface{}{"name":"required,alpha","address":map[string]interface{}{"line1":"required,alphanum"}}
+// s is the map containing the data to be validated.
+// m is the validation map in the form:
+// map[string]interface{}{"name":"required,alpha","address":map[string]interface{}{"line1":"required,alphanum"}}
func ValidateMap(s map[string]interface{}, m map[string]interface{}) (bool, error) {
if s == nil {
return true, nil
@@ -1498,11 +1504,11 @@ func ErrorsByField(e error) map[string]string {
}
// prototype for ValidateStruct
- switch e.(type) {
+ switch e := e.(type) {
case Error:
- m[e.(Error).Name] = e.(Error).Err.Error()
+ m[e.Name] = e.Err.Error()
case Errors:
- for _, item := range e.(Errors).Errors() {
+ for _, item := range e.Errors() {
n := ErrorsByField(item)
for k, v := range n {
m[k] = v
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/go.mod b/vendor/github.com/aws/aws-sdk-go-v2/config/go.mod
deleted file mode 100644
index 114b3473e..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/config/go.mod
+++ /dev/null
@@ -1,22 +0,0 @@
-module github.com/aws/aws-sdk-go-v2/config
-
-go 1.15
-
-require (
- github.com/aws/aws-sdk-go-v2 v1.0.0
- github.com/aws/aws-sdk-go-v2/credentials v1.0.0
- github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.0
- github.com/aws/aws-sdk-go-v2/service/sts v1.0.0
- github.com/aws/smithy-go v1.0.0
- github.com/google/go-cmp v0.5.4
- github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.0.0
-)
-
-replace (
- github.com/aws/aws-sdk-go-v2 => ../
- github.com/aws/aws-sdk-go-v2/credentials => ../credentials/
- github.com/aws/aws-sdk-go-v2/feature/ec2/imds => ../feature/ec2/imds/
- github.com/aws/aws-sdk-go-v2/service/sts => ../service/sts/
-)
-
-replace github.com/aws/aws-sdk-go-v2/service/internal/presigned-url => ../service/internal/presigned-url/
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/go.sum b/vendor/github.com/aws/aws-sdk-go-v2/config/go.sum
deleted file mode 100644
index 244464e39..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/config/go.sum
+++ /dev/null
@@ -1,16 +0,0 @@
-github.com/aws/smithy-go v1.0.0 h1:hkhcRKG9rJ4Fn+RbfXY7Tz7b3ITLDyolBnLLBhwbg/c=
-github.com/aws/smithy-go v1.0.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw=
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/google/go-cmp v0.4.1 h1:/exdXoGamhu5ONeUJH0deniYLWYvQwW66yvlfiiKTu0=
-github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M=
-github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
-github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
-github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
-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=
-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=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go.mod b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go.mod
deleted file mode 100644
index 5941776e8..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go.mod
+++ /dev/null
@@ -1,19 +0,0 @@
-module github.com/aws/aws-sdk-go-v2/credentials
-
-go 1.15
-
-require (
- github.com/aws/aws-sdk-go-v2 v1.0.0
- github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.0
- github.com/aws/aws-sdk-go-v2/service/sts v1.0.0
- github.com/aws/smithy-go v1.0.0
- github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.0.0
-)
-
-replace (
- github.com/aws/aws-sdk-go-v2 => ../
- github.com/aws/aws-sdk-go-v2/feature/ec2/imds => ../feature/ec2/imds/
- github.com/aws/aws-sdk-go-v2/service/sts => ../service/sts/
-)
-
-replace github.com/aws/aws-sdk-go-v2/service/internal/presigned-url => ../service/internal/presigned-url/
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go.sum b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go.sum
deleted file mode 100644
index 8f7f803c0..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go.sum
+++ /dev/null
@@ -1,19 +0,0 @@
-github.com/aws/smithy-go v1.0.0 h1:hkhcRKG9rJ4Fn+RbfXY7Tz7b3ITLDyolBnLLBhwbg/c=
-github.com/aws/smithy-go v1.0.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw=
-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/google/go-cmp v0.4.1 h1:/exdXoGamhu5ONeUJH0deniYLWYvQwW66yvlfiiKTu0=
-github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M=
-github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
-github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
-github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
-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=
-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=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go.mod b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go.mod
deleted file mode 100644
index f0979519a..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go.mod
+++ /dev/null
@@ -1,11 +0,0 @@
-module github.com/aws/aws-sdk-go-v2/feature/ec2/imds
-
-go 1.15
-
-require (
- github.com/aws/aws-sdk-go-v2 v1.0.0
- github.com/aws/smithy-go v1.0.0
- github.com/google/go-cmp v0.5.4
-)
-
-replace github.com/aws/aws-sdk-go-v2 => ../../../
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go.sum b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go.sum
deleted file mode 100644
index b66e1d584..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go.sum
+++ /dev/null
@@ -1,15 +0,0 @@
-github.com/aws/smithy-go v1.0.0 h1:hkhcRKG9rJ4Fn+RbfXY7Tz7b3ITLDyolBnLLBhwbg/c=
-github.com/aws/smithy-go v1.0.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw=
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/google/go-cmp v0.4.1 h1:/exdXoGamhu5ONeUJH0deniYLWYvQwW66yvlfiiKTu0=
-github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M=
-github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
-github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
-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=
-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=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/go.mod b/vendor/github.com/aws/aws-sdk-go-v2/go.mod
deleted file mode 100644
index 51745a870..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/go.mod
+++ /dev/null
@@ -1,9 +0,0 @@
-module github.com/aws/aws-sdk-go-v2
-
-require (
- github.com/aws/smithy-go v1.5.0
- github.com/google/go-cmp v0.5.4
- github.com/jmespath/go-jmespath v0.4.0
-)
-
-go 1.15
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/go.sum b/vendor/github.com/aws/aws-sdk-go-v2/go.sum
deleted file mode 100644
index 81b599cfb..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/go.sum
+++ /dev/null
@@ -1,19 +0,0 @@
-github.com/aws/smithy-go v1.5.0 h1:2grDq7LxZlo8BZUDeqRfQnQWLZpInmh2TLPPkJku3YM=
-github.com/aws/smithy-go v1.5.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E=
-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/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M=
-github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
-github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
-github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8=
-github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
-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=
-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=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
-gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go.mod b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go.mod
deleted file mode 100644
index 377e7c48a..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go.mod
+++ /dev/null
@@ -1,7 +0,0 @@
-module github.com/aws/aws-sdk-go-v2/internal/ini
-
-go 1.15
-
-require github.com/aws/aws-sdk-go-v2 v1.7.0
-
-replace github.com/aws/aws-sdk-go-v2 => ../../
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go.sum b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go.sum
deleted file mode 100644
index 5d05a0ff7..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go.sum
+++ /dev/null
@@ -1,10 +0,0 @@
-github.com/aws/smithy-go v1.5.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E=
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
-github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
-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=
-golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/go.mod b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/go.mod
deleted file mode 100644
index f0e9d0306..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/go.mod
+++ /dev/null
@@ -1,11 +0,0 @@
-module github.com/aws/aws-sdk-go-v2/service/autoscaling
-
-go 1.15
-
-require (
- github.com/aws/aws-sdk-go-v2 v1.0.0
- github.com/aws/smithy-go v1.0.0
- github.com/jmespath/go-jmespath v0.4.0
-)
-
-replace github.com/aws/aws-sdk-go-v2 => ../../
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/go.sum b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/go.sum
deleted file mode 100644
index 9b99314a4..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/go.sum
+++ /dev/null
@@ -1,21 +0,0 @@
-github.com/aws/smithy-go v1.0.0 h1:hkhcRKG9rJ4Fn+RbfXY7Tz7b3ITLDyolBnLLBhwbg/c=
-github.com/aws/smithy-go v1.0.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw=
-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/google/go-cmp v0.4.1 h1:/exdXoGamhu5ONeUJH0deniYLWYvQwW66yvlfiiKTu0=
-github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M=
-github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
-github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
-github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8=
-github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
-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=
-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=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
-gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudformation/go.mod b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudformation/go.mod
deleted file mode 100644
index 8b7684d26..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudformation/go.mod
+++ /dev/null
@@ -1,11 +0,0 @@
-module github.com/aws/aws-sdk-go-v2/service/cloudformation
-
-go 1.15
-
-require (
- github.com/aws/aws-sdk-go-v2 v1.0.0
- github.com/aws/smithy-go v1.0.0
- github.com/jmespath/go-jmespath v0.4.0
-)
-
-replace github.com/aws/aws-sdk-go-v2 => ../../
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudformation/go.sum b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudformation/go.sum
deleted file mode 100644
index 9b99314a4..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudformation/go.sum
+++ /dev/null
@@ -1,21 +0,0 @@
-github.com/aws/smithy-go v1.0.0 h1:hkhcRKG9rJ4Fn+RbfXY7Tz7b3ITLDyolBnLLBhwbg/c=
-github.com/aws/smithy-go v1.0.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw=
-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/google/go-cmp v0.4.1 h1:/exdXoGamhu5ONeUJH0deniYLWYvQwW66yvlfiiKTu0=
-github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M=
-github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
-github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
-github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8=
-github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
-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=
-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=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
-gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatch/go.mod b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatch/go.mod
deleted file mode 100644
index f28695b59..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatch/go.mod
+++ /dev/null
@@ -1,11 +0,0 @@
-module github.com/aws/aws-sdk-go-v2/service/cloudwatch
-
-go 1.15
-
-require (
- github.com/aws/aws-sdk-go-v2 v1.0.0
- github.com/aws/smithy-go v1.0.0
- github.com/jmespath/go-jmespath v0.4.0
-)
-
-replace github.com/aws/aws-sdk-go-v2 => ../../
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatch/go.sum b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatch/go.sum
deleted file mode 100644
index 9b99314a4..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatch/go.sum
+++ /dev/null
@@ -1,21 +0,0 @@
-github.com/aws/smithy-go v1.0.0 h1:hkhcRKG9rJ4Fn+RbfXY7Tz7b3ITLDyolBnLLBhwbg/c=
-github.com/aws/smithy-go v1.0.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw=
-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/google/go-cmp v0.4.1 h1:/exdXoGamhu5ONeUJH0deniYLWYvQwW66yvlfiiKTu0=
-github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M=
-github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
-github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
-github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8=
-github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
-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=
-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=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
-gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/go.mod b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/go.mod
deleted file mode 100644
index bda12a805..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/go.mod
+++ /dev/null
@@ -1,14 +0,0 @@
-module github.com/aws/aws-sdk-go-v2/service/ec2
-
-go 1.15
-
-require (
- github.com/aws/aws-sdk-go-v2 v1.7.0
- github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.2.0
- github.com/aws/smithy-go v1.5.0
- github.com/jmespath/go-jmespath v0.4.0
-)
-
-replace github.com/aws/aws-sdk-go-v2 => ../../
-
-replace github.com/aws/aws-sdk-go-v2/service/internal/presigned-url => ../../service/internal/presigned-url/
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/go.sum b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/go.sum
deleted file mode 100644
index 81b599cfb..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/go.sum
+++ /dev/null
@@ -1,19 +0,0 @@
-github.com/aws/smithy-go v1.5.0 h1:2grDq7LxZlo8BZUDeqRfQnQWLZpInmh2TLPPkJku3YM=
-github.com/aws/smithy-go v1.5.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E=
-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/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M=
-github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
-github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
-github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8=
-github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
-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=
-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=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
-gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ecr/go.mod b/vendor/github.com/aws/aws-sdk-go-v2/service/ecr/go.mod
deleted file mode 100644
index 0a6c2a7e6..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/ecr/go.mod
+++ /dev/null
@@ -1,11 +0,0 @@
-module github.com/aws/aws-sdk-go-v2/service/ecr
-
-go 1.15
-
-require (
- github.com/aws/aws-sdk-go-v2 v1.0.0
- github.com/aws/smithy-go v1.0.0
- github.com/jmespath/go-jmespath v0.4.0
-)
-
-replace github.com/aws/aws-sdk-go-v2 => ../../
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ecr/go.sum b/vendor/github.com/aws/aws-sdk-go-v2/service/ecr/go.sum
deleted file mode 100644
index 9b99314a4..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/ecr/go.sum
+++ /dev/null
@@ -1,21 +0,0 @@
-github.com/aws/smithy-go v1.0.0 h1:hkhcRKG9rJ4Fn+RbfXY7Tz7b3ITLDyolBnLLBhwbg/c=
-github.com/aws/smithy-go v1.0.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw=
-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/google/go-cmp v0.4.1 h1:/exdXoGamhu5ONeUJH0deniYLWYvQwW66yvlfiiKTu0=
-github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M=
-github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
-github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
-github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8=
-github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
-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=
-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=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
-gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/go.mod b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/go.mod
deleted file mode 100644
index f81a1c0d5..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/go.mod
+++ /dev/null
@@ -1,11 +0,0 @@
-module github.com/aws/aws-sdk-go-v2/service/eks
-
-go 1.15
-
-require (
- github.com/aws/aws-sdk-go-v2 v1.0.0
- github.com/aws/smithy-go v1.0.0
- github.com/jmespath/go-jmespath v0.4.0
-)
-
-replace github.com/aws/aws-sdk-go-v2 => ../../
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/go.sum b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/go.sum
deleted file mode 100644
index 9b99314a4..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/go.sum
+++ /dev/null
@@ -1,21 +0,0 @@
-github.com/aws/smithy-go v1.0.0 h1:hkhcRKG9rJ4Fn+RbfXY7Tz7b3ITLDyolBnLLBhwbg/c=
-github.com/aws/smithy-go v1.0.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw=
-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/google/go-cmp v0.4.1 h1:/exdXoGamhu5ONeUJH0deniYLWYvQwW66yvlfiiKTu0=
-github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M=
-github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
-github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
-github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8=
-github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
-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=
-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=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
-gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/go.mod b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/go.mod
deleted file mode 100644
index e956f7b3d..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/go.mod
+++ /dev/null
@@ -1,10 +0,0 @@
-module github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2
-
-go 1.15
-
-require (
- github.com/aws/aws-sdk-go-v2 v1.0.0
- github.com/aws/smithy-go v1.0.0
-)
-
-replace github.com/aws/aws-sdk-go-v2 => ../../
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/go.sum b/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/go.sum
deleted file mode 100644
index b66e1d584..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/go.sum
+++ /dev/null
@@ -1,15 +0,0 @@
-github.com/aws/smithy-go v1.0.0 h1:hkhcRKG9rJ4Fn+RbfXY7Tz7b3ITLDyolBnLLBhwbg/c=
-github.com/aws/smithy-go v1.0.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw=
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/google/go-cmp v0.4.1 h1:/exdXoGamhu5ONeUJH0deniYLWYvQwW66yvlfiiKTu0=
-github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M=
-github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
-github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
-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=
-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=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/go.mod b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/go.mod
deleted file mode 100644
index aa0a4a865..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/go.mod
+++ /dev/null
@@ -1,10 +0,0 @@
-module github.com/aws/aws-sdk-go-v2/service/iam
-
-go 1.15
-
-require (
- github.com/aws/aws-sdk-go-v2 v1.0.0
- github.com/aws/smithy-go v1.0.0
-)
-
-replace github.com/aws/aws-sdk-go-v2 => ../../
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/go.sum b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/go.sum
deleted file mode 100644
index b66e1d584..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/go.sum
+++ /dev/null
@@ -1,15 +0,0 @@
-github.com/aws/smithy-go v1.0.0 h1:hkhcRKG9rJ4Fn+RbfXY7Tz7b3ITLDyolBnLLBhwbg/c=
-github.com/aws/smithy-go v1.0.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw=
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/google/go-cmp v0.4.1 h1:/exdXoGamhu5ONeUJH0deniYLWYvQwW66yvlfiiKTu0=
-github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M=
-github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
-github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
-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=
-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=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go.mod b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go.mod
deleted file mode 100644
index d48582d60..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go.mod
+++ /dev/null
@@ -1,5 +0,0 @@
-module github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding
-
-go 1.15
-
-require github.com/aws/smithy-go v1.0.0
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go.sum b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go.sum
deleted file mode 100644
index daae852e5..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go.sum
+++ /dev/null
@@ -1,8 +0,0 @@
-github.com/aws/smithy-go v0.5.1-0.20210115041537-09631dea532e h1:CBuNt8z4Dh3Vf1q5BgoJgAidIDS585A/f/gpaGO45yk=
-github.com/aws/smithy-go v0.5.1-0.20210115041537-09631dea532e/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw=
-github.com/aws/smithy-go v1.0.0 h1:hkhcRKG9rJ4Fn+RbfXY7Tz7b3ITLDyolBnLLBhwbg/c=
-github.com/aws/smithy-go v1.0.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw=
-github.com/google/go-cmp v0.4.1 h1:/exdXoGamhu5ONeUJH0deniYLWYvQwW66yvlfiiKTu0=
-github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-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=
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go.mod b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go.mod
deleted file mode 100644
index 9cee0c42d..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go.mod
+++ /dev/null
@@ -1,11 +0,0 @@
-module github.com/aws/aws-sdk-go-v2/service/internal/presigned-url
-
-go 1.15
-
-require (
- github.com/aws/aws-sdk-go-v2 v1.7.0
- github.com/aws/smithy-go v1.5.0
- github.com/google/go-cmp v0.5.4
-)
-
-replace github.com/aws/aws-sdk-go-v2 => ../../../
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go.sum b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go.sum
deleted file mode 100644
index 60dfc8fa1..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go.sum
+++ /dev/null
@@ -1,13 +0,0 @@
-github.com/aws/smithy-go v1.5.0 h1:2grDq7LxZlo8BZUDeqRfQnQWLZpInmh2TLPPkJku3YM=
-github.com/aws/smithy-go v1.5.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E=
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M=
-github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
-github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
-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=
-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=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go.mod b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go.mod
deleted file mode 100644
index a84017959..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go.mod
+++ /dev/null
@@ -1,10 +0,0 @@
-module github.com/aws/aws-sdk-go-v2/service/internal/s3shared
-
-go 1.15
-
-require (
- github.com/aws/aws-sdk-go-v2 v1.0.0
- github.com/aws/smithy-go v1.0.0
-)
-
-replace github.com/aws/aws-sdk-go-v2 => ../../../
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go.sum b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go.sum
deleted file mode 100644
index 244464e39..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go.sum
+++ /dev/null
@@ -1,16 +0,0 @@
-github.com/aws/smithy-go v1.0.0 h1:hkhcRKG9rJ4Fn+RbfXY7Tz7b3ITLDyolBnLLBhwbg/c=
-github.com/aws/smithy-go v1.0.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw=
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/google/go-cmp v0.4.1 h1:/exdXoGamhu5ONeUJH0deniYLWYvQwW66yvlfiiKTu0=
-github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M=
-github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
-github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
-github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
-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=
-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=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/go.mod b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/go.mod
deleted file mode 100644
index 2563634ee..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/go.mod
+++ /dev/null
@@ -1,10 +0,0 @@
-module github.com/aws/aws-sdk-go-v2/service/kms
-
-go 1.15
-
-require (
- github.com/aws/aws-sdk-go-v2 v1.0.0
- github.com/aws/smithy-go v1.0.0
-)
-
-replace github.com/aws/aws-sdk-go-v2 => ../../
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/go.sum b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/go.sum
deleted file mode 100644
index b66e1d584..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/go.sum
+++ /dev/null
@@ -1,15 +0,0 @@
-github.com/aws/smithy-go v1.0.0 h1:hkhcRKG9rJ4Fn+RbfXY7Tz7b3ITLDyolBnLLBhwbg/c=
-github.com/aws/smithy-go v1.0.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw=
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/google/go-cmp v0.4.1 h1:/exdXoGamhu5ONeUJH0deniYLWYvQwW66yvlfiiKTu0=
-github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M=
-github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
-github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
-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=
-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=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go.mod b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go.mod
deleted file mode 100644
index 8f50b28e2..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go.mod
+++ /dev/null
@@ -1,20 +0,0 @@
-module github.com/aws/aws-sdk-go-v2/service/s3
-
-go 1.15
-
-require (
- github.com/aws/aws-sdk-go-v2 v1.0.0
- github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.0.0
- github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.0.0
- github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.0.0
- github.com/aws/smithy-go v1.0.0
- github.com/google/go-cmp v0.5.4
-)
-
-replace github.com/aws/aws-sdk-go-v2 => ../../
-
-replace github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding => ../../service/internal/accept-encoding/
-
-replace github.com/aws/aws-sdk-go-v2/service/internal/presigned-url => ../../service/internal/presigned-url/
-
-replace github.com/aws/aws-sdk-go-v2/service/internal/s3shared => ../../service/internal/s3shared/
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go.sum b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go.sum
deleted file mode 100644
index 2051d18c3..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go.sum
+++ /dev/null
@@ -1,17 +0,0 @@
-github.com/aws/smithy-go v0.5.1-0.20210115041537-09631dea532e h1:CBuNt8z4Dh3Vf1q5BgoJgAidIDS585A/f/gpaGO45yk=
-github.com/aws/smithy-go v0.5.1-0.20210115041537-09631dea532e/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw=
-github.com/aws/smithy-go v1.0.0 h1:hkhcRKG9rJ4Fn+RbfXY7Tz7b3ITLDyolBnLLBhwbg/c=
-github.com/aws/smithy-go v1.0.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw=
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/google/go-cmp v0.4.1 h1:/exdXoGamhu5ONeUJH0deniYLWYvQwW66yvlfiiKTu0=
-github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M=
-github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
-github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
-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=
-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=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/go.mod b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/go.mod
deleted file mode 100644
index 823e020a7..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/go.mod
+++ /dev/null
@@ -1,11 +0,0 @@
-module github.com/aws/aws-sdk-go-v2/service/ssm
-
-go 1.15
-
-require (
- github.com/aws/aws-sdk-go-v2 v1.0.0
- github.com/aws/smithy-go v1.0.0
- github.com/jmespath/go-jmespath v0.4.0
-)
-
-replace github.com/aws/aws-sdk-go-v2 => ../../
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/go.sum b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/go.sum
deleted file mode 100644
index 9b99314a4..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/go.sum
+++ /dev/null
@@ -1,21 +0,0 @@
-github.com/aws/smithy-go v1.0.0 h1:hkhcRKG9rJ4Fn+RbfXY7Tz7b3ITLDyolBnLLBhwbg/c=
-github.com/aws/smithy-go v1.0.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw=
-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/google/go-cmp v0.4.1 h1:/exdXoGamhu5ONeUJH0deniYLWYvQwW66yvlfiiKTu0=
-github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M=
-github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
-github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
-github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8=
-github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
-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=
-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=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
-gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go.mod b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go.mod
deleted file mode 100644
index 3ac111e13..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go.mod
+++ /dev/null
@@ -1,13 +0,0 @@
-module github.com/aws/aws-sdk-go-v2/service/sts
-
-go 1.15
-
-require (
- github.com/aws/aws-sdk-go-v2 v1.0.0
- github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.0.0
- github.com/aws/smithy-go v1.0.0
-)
-
-replace github.com/aws/aws-sdk-go-v2 => ../../
-
-replace github.com/aws/aws-sdk-go-v2/service/internal/presigned-url => ../../service/internal/presigned-url/
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go.sum b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go.sum
deleted file mode 100644
index b66e1d584..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go.sum
+++ /dev/null
@@ -1,15 +0,0 @@
-github.com/aws/smithy-go v1.0.0 h1:hkhcRKG9rJ4Fn+RbfXY7Tz7b3ITLDyolBnLLBhwbg/c=
-github.com/aws/smithy-go v1.0.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw=
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/google/go-cmp v0.4.1 h1:/exdXoGamhu5ONeUJH0deniYLWYvQwW66yvlfiiKTu0=
-github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M=
-github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
-github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
-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=
-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=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/aws/smithy-go/go.mod b/vendor/github.com/aws/smithy-go/go.mod
deleted file mode 100644
index 02a91c4a8..000000000
--- a/vendor/github.com/aws/smithy-go/go.mod
+++ /dev/null
@@ -1,5 +0,0 @@
-module github.com/aws/smithy-go
-
-go 1.15
-
-require github.com/google/go-cmp v0.5.4
diff --git a/vendor/github.com/aws/smithy-go/go.sum b/vendor/github.com/aws/smithy-go/go.sum
deleted file mode 100644
index 1ffcbdbe2..000000000
--- a/vendor/github.com/aws/smithy-go/go.sum
+++ /dev/null
@@ -1,4 +0,0 @@
-github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M=
-github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-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=
diff --git a/vendor/github.com/blang/semver/.travis.yml b/vendor/github.com/blang/semver/.travis.yml
new file mode 100644
index 000000000..102fb9a69
--- /dev/null
+++ b/vendor/github.com/blang/semver/.travis.yml
@@ -0,0 +1,21 @@
+language: go
+matrix:
+ include:
+ - go: 1.4.3
+ - go: 1.5.4
+ - go: 1.6.3
+ - go: 1.7
+ - go: tip
+ allow_failures:
+ - go: tip
+install:
+- go get golang.org/x/tools/cmd/cover
+- go get github.com/mattn/goveralls
+script:
+- echo "Test and track coverage" ; $HOME/gopath/bin/goveralls -package "." -service=travis-ci
+ -repotoken $COVERALLS_TOKEN
+- echo "Build examples" ; cd examples && go build
+- echo "Check if gofmt'd" ; diff -u <(echo -n) <(gofmt -d -s .)
+env:
+ global:
+ secure: HroGEAUQpVq9zX1b1VIkraLiywhGbzvNnTZq2TMxgK7JHP8xqNplAeF1izrR2i4QLL9nsY+9WtYss4QuPvEtZcVHUobw6XnL6radF7jS1LgfYZ9Y7oF+zogZ2I5QUMRLGA7rcxQ05s7mKq3XZQfeqaNts4bms/eZRefWuaFZbkw=
diff --git a/vendor/github.com/blang/semver/README.md b/vendor/github.com/blang/semver/README.md
index 4399639e2..08b2e4a3d 100644
--- a/vendor/github.com/blang/semver/README.md
+++ b/vendor/github.com/blang/semver/README.md
@@ -1,4 +1,4 @@
-semver for golang [![Build Status](https://drone.io/github.com/blang/semver/status.png)](https://drone.io/github.com/blang/semver/latest) [![GoDoc](https://godoc.org/github.com/blang/semver?status.png)](https://godoc.org/github.com/blang/semver) [![Coverage Status](https://img.shields.io/coveralls/blang/semver.svg)](https://coveralls.io/r/blang/semver?branch=master)
+semver for golang [![Build Status](https://travis-ci.org/blang/semver.svg?branch=master)](https://travis-ci.org/blang/semver) [![GoDoc](https://godoc.org/github.com/blang/semver?status.png)](https://godoc.org/github.com/blang/semver) [![Coverage Status](https://img.shields.io/coveralls/blang/semver.svg)](https://coveralls.io/r/blang/semver?branch=master)
======
semver is a [Semantic Versioning](http://semver.org/) library written in golang. It fully covers spec version `2.0.0`.
@@ -41,6 +41,7 @@ Features
- Compare Helper Methods
- InPlace manipulation
- Ranges `>=1.0.0 <2.0.0 || >=3.0.0 !3.0.1-beta.1`
+- Wildcards `>=1.x`, `<=2.5.x`
- Sortable (implements sort.Interface)
- database/sql compatible (sql.Scanner/Valuer)
- encoding/json compatible (json.Marshaler/Unmarshaler)
@@ -59,6 +60,8 @@ A condition is composed of an operator and a version. The supported operators ar
- `1.0.0`, `=1.0.0`, `==1.0.0` Equal to `1.0.0`
- `!1.0.0`, `!=1.0.0` Not equal to `1.0.0`. Excludes version `1.0.0`.
+Note that spaces between the operator and the version will be gracefully tolerated.
+
A `Range` can link multiple `Ranges` separated by space:
Ranges can be linked by logical AND:
diff --git a/vendor/github.com/blang/semver/package.json b/vendor/github.com/blang/semver/package.json
index 568be8d94..1cf8ebdd9 100644
--- a/vendor/github.com/blang/semver/package.json
+++ b/vendor/github.com/blang/semver/package.json
@@ -12,6 +12,6 @@
"license": "MIT",
"name": "semver",
"releaseCmd": "git commit -a -m \"gx publish $VERSION\"",
- "version": "3.4.0"
+ "version": "3.5.1"
}
diff --git a/vendor/github.com/briandowns/spinner/go.mod b/vendor/github.com/briandowns/spinner/go.mod
deleted file mode 100644
index df62180eb..000000000
--- a/vendor/github.com/briandowns/spinner/go.mod
+++ /dev/null
@@ -1,8 +0,0 @@
-module github.com/briandowns/spinner
-
-go 1.14
-
-require (
- github.com/fatih/color v1.7.0
- github.com/mattn/go-colorable v0.1.2 // indirect
-)
diff --git a/vendor/github.com/briandowns/spinner/go.sum b/vendor/github.com/briandowns/spinner/go.sum
deleted file mode 100644
index a0d4725a6..000000000
--- a/vendor/github.com/briandowns/spinner/go.sum
+++ /dev/null
@@ -1,8 +0,0 @@
-github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=
-github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
-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.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE=
-github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
-golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223 h1:DH4skfRX4EBpamg7iV4ZlCpblAHI6s6TDM39bFZumv8=
-golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
diff --git a/vendor/github.com/cespare/xxhash/v2/go.mod b/vendor/github.com/cespare/xxhash/v2/go.mod
deleted file mode 100644
index 49f67608b..000000000
--- a/vendor/github.com/cespare/xxhash/v2/go.mod
+++ /dev/null
@@ -1,3 +0,0 @@
-module github.com/cespare/xxhash/v2
-
-go 1.11
diff --git a/vendor/github.com/cespare/xxhash/v2/go.sum b/vendor/github.com/cespare/xxhash/v2/go.sum
deleted file mode 100644
index e69de29bb..000000000
diff --git a/vendor/github.com/cilium/ebpf/abi.go b/vendor/github.com/cilium/ebpf/abi.go
index e2ceccc4e..77227ffda 100644
--- a/vendor/github.com/cilium/ebpf/abi.go
+++ b/vendor/github.com/cilium/ebpf/abi.go
@@ -8,6 +8,8 @@ import (
"os"
"syscall"
+ "github.com/cilium/ebpf/internal"
+
"github.com/pkg/errors"
)
@@ -30,7 +32,7 @@ func newMapABIFromSpec(spec *MapSpec) *MapABI {
}
}
-func newMapABIFromFd(fd *bpfFD) (string, *MapABI, error) {
+func newMapABIFromFd(fd *internal.FD) (string, *MapABI, error) {
info, err := bpfGetMapInfoByFD(fd)
if err != nil {
if errors.Cause(err) == syscall.EINVAL {
@@ -49,7 +51,7 @@ func newMapABIFromFd(fd *bpfFD) (string, *MapABI, error) {
}, nil
}
-func newMapABIFromProc(fd *bpfFD) (*MapABI, error) {
+func newMapABIFromProc(fd *internal.FD) (*MapABI, error) {
var abi MapABI
err := scanFdInfo(fd, map[string]interface{}{
"map_type": &abi.Type,
@@ -93,7 +95,7 @@ func newProgramABIFromSpec(spec *ProgramSpec) *ProgramABI {
}
}
-func newProgramABIFromFd(fd *bpfFD) (string, *ProgramABI, error) {
+func newProgramABIFromFd(fd *internal.FD) (string, *ProgramABI, error) {
info, err := bpfGetProgInfoByFD(fd)
if err != nil {
if errors.Cause(err) == syscall.EINVAL {
@@ -104,10 +106,10 @@ func newProgramABIFromFd(fd *bpfFD) (string, *ProgramABI, error) {
}
var name string
- if bpfName := convertCString(info.name[:]); bpfName != "" {
+ if bpfName := internal.CString(info.name[:]); bpfName != "" {
name = bpfName
} else {
- name = convertCString(info.tag[:])
+ name = internal.CString(info.tag[:])
}
return name, &ProgramABI{
@@ -115,7 +117,7 @@ func newProgramABIFromFd(fd *bpfFD) (string, *ProgramABI, error) {
}, nil
}
-func newProgramABIFromProc(fd *bpfFD) (string, *ProgramABI, error) {
+func newProgramABIFromProc(fd *internal.FD) (string, *ProgramABI, error) {
var (
abi ProgramABI
name string
@@ -125,6 +127,12 @@ func newProgramABIFromProc(fd *bpfFD) (string, *ProgramABI, error) {
"prog_type": &abi.Type,
"prog_tag": &name,
})
+ if errors.Cause(err) == errMissingFields {
+ return "", nil, &internal.UnsupportedFeatureError{
+ Name: "reading ABI from /proc/self/fdinfo",
+ MinimumVersion: internal.Version{4, 11, 0},
+ }
+ }
if err != nil {
return "", nil, err
}
@@ -132,8 +140,8 @@ func newProgramABIFromProc(fd *bpfFD) (string, *ProgramABI, error) {
return name, &abi, nil
}
-func scanFdInfo(fd *bpfFD, fields map[string]interface{}) error {
- raw, err := fd.value()
+func scanFdInfo(fd *internal.FD, fields map[string]interface{}) error {
+ raw, err := fd.Value()
if err != nil {
return err
}
@@ -147,6 +155,8 @@ func scanFdInfo(fd *bpfFD, fields map[string]interface{}) error {
return errors.Wrap(scanFdInfoReader(fh, fields), fh.Name())
}
+var errMissingFields = errors.New("missing fields")
+
func scanFdInfoReader(r io.Reader, fields map[string]interface{}) error {
var (
scanner = bufio.NewScanner(r)
@@ -177,7 +187,7 @@ func scanFdInfoReader(r io.Reader, fields map[string]interface{}) error {
}
if scanned != len(fields) {
- return errors.Errorf("parsed %d instead of %d fields", scanned, len(fields))
+ return errMissingFields
}
return nil
diff --git a/vendor/github.com/cilium/ebpf/collection.go b/vendor/github.com/cilium/ebpf/collection.go
index 5ad1a5ec4..bf6a96d4a 100644
--- a/vendor/github.com/cilium/ebpf/collection.go
+++ b/vendor/github.com/cilium/ebpf/collection.go
@@ -2,6 +2,7 @@ package ebpf
import (
"github.com/cilium/ebpf/asm"
+ "github.com/cilium/ebpf/internal/btf"
"github.com/pkg/errors"
)
@@ -55,17 +56,61 @@ func NewCollection(spec *CollectionSpec) (*Collection, error) {
// NewCollectionWithOptions creates a Collection from a specification.
//
// Only maps referenced by at least one of the programs are initialized.
-func NewCollectionWithOptions(spec *CollectionSpec, opts CollectionOptions) (*Collection, error) {
- maps := make(map[string]*Map)
+func NewCollectionWithOptions(spec *CollectionSpec, opts CollectionOptions) (coll *Collection, err error) {
+ var (
+ maps = make(map[string]*Map)
+ progs = make(map[string]*Program)
+ btfs = make(map[*btf.Spec]*btf.Handle)
+ )
+
+ defer func() {
+ for _, btf := range btfs {
+ btf.Close()
+ }
+
+ if err == nil {
+ return
+ }
+
+ for _, m := range maps {
+ m.Close()
+ }
+
+ for _, p := range progs {
+ p.Close()
+ }
+ }()
+
+ loadBTF := func(spec *btf.Spec) (*btf.Handle, error) {
+ if btfs[spec] != nil {
+ return btfs[spec], nil
+ }
+
+ handle, err := btf.NewHandle(spec)
+ if err != nil {
+ return nil, err
+ }
+
+ btfs[spec] = handle
+ return handle, nil
+ }
+
for mapName, mapSpec := range spec.Maps {
- m, err := NewMap(mapSpec)
+ var handle *btf.Handle
+ if mapSpec.BTF != nil {
+ handle, err = loadBTF(btf.MapSpec(mapSpec.BTF))
+ if err != nil && !btf.IsNotSupported(err) {
+ return nil, err
+ }
+ }
+
+ m, err := newMapWithBTF(mapSpec, handle)
if err != nil {
return nil, errors.Wrapf(err, "map %s", mapName)
}
maps[mapName] = m
}
- progs := make(map[string]*Program)
for progName, origProgSpec := range spec.Programs {
progSpec := origProgSpec.Copy()
@@ -91,7 +136,15 @@ func NewCollectionWithOptions(spec *CollectionSpec, opts CollectionOptions) (*Co
}
}
- prog, err := NewProgramWithOptions(progSpec, opts.Programs)
+ var handle *btf.Handle
+ if progSpec.BTF != nil {
+ handle, err = loadBTF(btf.ProgramSpec(progSpec.BTF))
+ if err != nil && !btf.IsNotSupported(err) {
+ return nil, err
+ }
+ }
+
+ prog, err := newProgramWithBTF(progSpec, handle, opts.Programs)
if err != nil {
return nil, errors.Wrapf(err, "program %s", progName)
}
diff --git a/vendor/github.com/cilium/ebpf/elf_reader.go b/vendor/github.com/cilium/ebpf/elf_reader.go
index 3bdc0849b..c33b744f8 100644
--- a/vendor/github.com/cilium/ebpf/elf_reader.go
+++ b/vendor/github.com/cilium/ebpf/elf_reader.go
@@ -4,12 +4,13 @@ import (
"bytes"
"debug/elf"
"encoding/binary"
- "fmt"
"io"
"os"
"strings"
"github.com/cilium/ebpf/asm"
+ "github.com/cilium/ebpf/internal"
+ "github.com/cilium/ebpf/internal/btf"
"github.com/pkg/errors"
)
@@ -18,6 +19,8 @@ type elfCode struct {
*elf.File
symbols []elf.Symbol
symbolsPerSection map[elf.SectionIndex]map[uint64]string
+ license string
+ version uint32
}
// LoadCollectionSpec parses an ELF file into a CollectionSpec.
@@ -33,8 +36,8 @@ func LoadCollectionSpec(file string) (*CollectionSpec, error) {
}
// LoadCollectionSpecFromReader parses an ELF file into a CollectionSpec.
-func LoadCollectionSpecFromReader(code io.ReaderAt) (*CollectionSpec, error) {
- f, err := elf.NewFile(code)
+func LoadCollectionSpecFromReader(rd io.ReaderAt) (*CollectionSpec, error) {
+ f, err := elf.NewFile(rd)
if err != nil {
return nil, err
}
@@ -45,12 +48,17 @@ func LoadCollectionSpecFromReader(code io.ReaderAt) (*CollectionSpec, error) {
return nil, errors.Wrap(err, "load symbols")
}
- ec := &elfCode{f, symbols, symbolsPerSection(symbols)}
+ ec := &elfCode{f, symbols, symbolsPerSection(symbols), "", 0}
+
+ var (
+ licenseSection *elf.Section
+ versionSection *elf.Section
+ btfMaps = make(map[elf.SectionIndex]*elf.Section)
+ progSections = make(map[elf.SectionIndex]*elf.Section)
+ relSections = make(map[elf.SectionIndex]*elf.Section)
+ mapSections = make(map[elf.SectionIndex]*elf.Section)
+ )
- var licenseSection, versionSection *elf.Section
- progSections := make(map[elf.SectionIndex]*elf.Section)
- relSections := make(map[elf.SectionIndex]*elf.Section)
- mapSections := make(map[elf.SectionIndex]*elf.Section)
for i, sec := range ec.Sections {
switch {
case strings.HasPrefix(sec.Name, "license"):
@@ -59,6 +67,8 @@ func LoadCollectionSpecFromReader(code io.ReaderAt) (*CollectionSpec, error) {
versionSection = sec
case strings.HasPrefix(sec.Name, "maps"):
mapSections[elf.SectionIndex(i)] = sec
+ case sec.Name == ".maps":
+ btfMaps[elf.SectionIndex(i)] = sec
case sec.Type == elf.SHT_REL:
if int(sec.Info) >= len(ec.Sections) {
return nil, errors.Errorf("found relocation section %v for missing section %v", i, sec.Info)
@@ -67,7 +77,7 @@ func LoadCollectionSpecFromReader(code io.ReaderAt) (*CollectionSpec, error) {
// Store relocations under the section index of the target
idx := elf.SectionIndex(sec.Info)
if relSections[idx] != nil {
- return nil, errors.Errorf("section %d has multiple relocation sections", idx)
+ return nil, errors.Errorf("section %d has multiple relocation sections", sec.Info)
}
relSections[idx] = sec
case sec.Type == elf.SHT_PROGBITS && (sec.Flags&elf.SHF_EXECINSTR) != 0 && sec.Size > 0:
@@ -75,35 +85,38 @@ func LoadCollectionSpecFromReader(code io.ReaderAt) (*CollectionSpec, error) {
}
}
- license, err := loadLicense(licenseSection)
+ ec.license, err = loadLicense(licenseSection)
if err != nil {
return nil, errors.Wrap(err, "load license")
}
- version, err := loadVersion(versionSection, ec.ByteOrder)
+ ec.version, err = loadVersion(versionSection, ec.ByteOrder)
if err != nil {
return nil, errors.Wrap(err, "load version")
}
- maps, err := ec.loadMaps(mapSections)
+ btf, err := btf.LoadSpecFromReader(rd)
if err != nil {
- return nil, errors.Wrap(err, "load maps")
+ return nil, errors.Wrap(err, "load BTF")
}
- progs, libs, err := ec.loadPrograms(progSections, relSections, license, version)
- if err != nil {
- return nil, errors.Wrap(err, "load programs")
+ maps := make(map[string]*MapSpec)
+
+ if err := ec.loadMaps(maps, mapSections); err != nil {
+ return nil, errors.Wrap(err, "load maps")
}
- if len(libs) > 0 {
- for name, prog := range progs {
- prog.Instructions, err = link(prog.Instructions, libs...)
- if err != nil {
- return nil, errors.Wrapf(err, "program %s", name)
- }
+ if len(btfMaps) > 0 {
+ if err := ec.loadBTFMaps(maps, btfMaps, btf); err != nil {
+ return nil, errors.Wrap(err, "load BTF maps")
}
}
+ progs, err := ec.loadPrograms(progSections, relSections, btf)
+ if err != nil {
+ return nil, errors.Wrap(err, "load programs")
+ }
+
return &CollectionSpec{maps, progs}, nil
}
@@ -128,52 +141,74 @@ func loadVersion(sec *elf.Section, bo binary.ByteOrder) (uint32, error) {
return version, errors.Wrapf(err, "section %s", sec.Name)
}
-func (ec *elfCode) loadPrograms(progSections, relSections map[elf.SectionIndex]*elf.Section, license string, version uint32) (map[string]*ProgramSpec, []asm.Instructions, error) {
+func (ec *elfCode) loadPrograms(progSections, relSections map[elf.SectionIndex]*elf.Section, btf *btf.Spec) (map[string]*ProgramSpec, error) {
var (
- progs = make(map[string]*ProgramSpec)
- libs []asm.Instructions
+ progs []*ProgramSpec
+ libs []*ProgramSpec
)
+
for idx, prog := range progSections {
syms := ec.symbolsPerSection[idx]
if len(syms) == 0 {
- return nil, nil, errors.Errorf("section %v: missing symbols", prog.Name)
+ return nil, errors.Errorf("section %v: missing symbols", prog.Name)
}
funcSym := syms[0]
if funcSym == "" {
- return nil, nil, errors.Errorf("section %v: no label at start", prog.Name)
+ return nil, errors.Errorf("section %v: no label at start", prog.Name)
}
rels, err := ec.loadRelocations(relSections[idx])
if err != nil {
- return nil, nil, errors.Wrapf(err, "program %s: can't load relocations", funcSym)
+ return nil, errors.Wrapf(err, "program %s: can't load relocations", funcSym)
}
- insns, err := ec.loadInstructions(prog, syms, rels)
+ insns, length, err := ec.loadInstructions(prog, syms, rels)
if err != nil {
- return nil, nil, errors.Wrapf(err, "program %s: can't unmarshal instructions", funcSym)
+ return nil, errors.Wrapf(err, "program %s: can't unmarshal instructions", funcSym)
+ }
+
+ progType, attachType := getProgType(prog.Name)
+
+ spec := &ProgramSpec{
+ Name: funcSym,
+ Type: progType,
+ AttachType: attachType,
+ License: ec.license,
+ KernelVersion: ec.version,
+ Instructions: insns,
}
- if progType, attachType := getProgType(prog.Name); progType == UnspecifiedProgram {
+ if btf != nil {
+ spec.BTF, err = btf.Program(prog.Name, length)
+ if err != nil {
+ return nil, errors.Wrapf(err, "BTF for section %s (program %s)", prog.Name, funcSym)
+ }
+ }
+
+ if spec.Type == UnspecifiedProgram {
// There is no single name we can use for "library" sections,
// since they may contain multiple functions. We'll decode the
// labels they contain later on, and then link sections that way.
- libs = append(libs, insns)
+ libs = append(libs, spec)
} else {
- progs[funcSym] = &ProgramSpec{
- Name: funcSym,
- Type: progType,
- AttachType: attachType,
- License: license,
- KernelVersion: version,
- Instructions: insns,
- }
+ progs = append(progs, spec)
+ }
+ }
+
+ res := make(map[string]*ProgramSpec, len(progs))
+ for _, prog := range progs {
+ err := link(prog, libs)
+ if err != nil {
+ return nil, errors.Wrapf(err, "program %s", prog.Name)
}
+ res[prog.Name] = prog
}
- return progs, libs, nil
+
+ return res, nil
}
-func (ec *elfCode) loadInstructions(section *elf.Section, symbols, relocations map[uint64]string) (asm.Instructions, error) {
+func (ec *elfCode) loadInstructions(section *elf.Section, symbols, relocations map[uint64]string) (asm.Instructions, uint64, error) {
var (
r = section.Open()
insns asm.Instructions
@@ -183,10 +218,10 @@ func (ec *elfCode) loadInstructions(section *elf.Section, symbols, relocations m
for {
n, err := ins.Unmarshal(r, ec.ByteOrder)
if err == io.EOF {
- return insns, nil
+ return insns, offset, nil
}
if err != nil {
- return nil, errors.Wrapf(err, "offset %d", offset)
+ return nil, 0, errors.Wrapf(err, "offset %d", offset)
}
ins.Symbol = symbols[offset]
@@ -197,19 +232,15 @@ func (ec *elfCode) loadInstructions(section *elf.Section, symbols, relocations m
}
}
-func (ec *elfCode) loadMaps(mapSections map[elf.SectionIndex]*elf.Section) (map[string]*MapSpec, error) {
- var (
- maps = make(map[string]*MapSpec)
- b = make([]byte, 1)
- )
+func (ec *elfCode) loadMaps(maps map[string]*MapSpec, mapSections map[elf.SectionIndex]*elf.Section) error {
for idx, sec := range mapSections {
syms := ec.symbolsPerSection[idx]
if len(syms) == 0 {
- return nil, errors.Errorf("section %v: no symbols", sec.Name)
+ return errors.Errorf("section %v: no symbols", sec.Name)
}
if sec.Size%uint64(len(syms)) != 0 {
- return nil, errors.Errorf("section %v: map descriptors are not of equal size", sec.Name)
+ return errors.Errorf("section %v: map descriptors are not of equal size", sec.Name)
}
var (
@@ -219,12 +250,11 @@ func (ec *elfCode) loadMaps(mapSections map[elf.SectionIndex]*elf.Section) (map[
for i, offset := 0, uint64(0); i < len(syms); i, offset = i+1, offset+size {
mapSym := syms[offset]
if mapSym == "" {
- fmt.Println(syms)
- return nil, errors.Errorf("section %s: missing symbol for map at offset %d", sec.Name, offset)
+ return errors.Errorf("section %s: missing symbol for map at offset %d", sec.Name, offset)
}
if maps[mapSym] != nil {
- return nil, errors.Errorf("section %v: map %v already exists", sec.Name, mapSym)
+ return errors.Errorf("section %v: map %v already exists", sec.Name, mapSym)
}
lr := io.LimitReader(r, int64(size))
@@ -232,51 +262,152 @@ func (ec *elfCode) loadMaps(mapSections map[elf.SectionIndex]*elf.Section) (map[
var spec MapSpec
switch {
case binary.Read(lr, ec.ByteOrder, &spec.Type) != nil:
- return nil, errors.Errorf("map %v: missing type", mapSym)
+ return errors.Errorf("map %v: missing type", mapSym)
case binary.Read(lr, ec.ByteOrder, &spec.KeySize) != nil:
- return nil, errors.Errorf("map %v: missing key size", mapSym)
+ return errors.Errorf("map %v: missing key size", mapSym)
case binary.Read(lr, ec.ByteOrder, &spec.ValueSize) != nil:
- return nil, errors.Errorf("map %v: missing value size", mapSym)
+ return errors.Errorf("map %v: missing value size", mapSym)
case binary.Read(lr, ec.ByteOrder, &spec.MaxEntries) != nil:
- return nil, errors.Errorf("map %v: missing max entries", mapSym)
+ return errors.Errorf("map %v: missing max entries", mapSym)
case binary.Read(lr, ec.ByteOrder, &spec.Flags) != nil:
- return nil, errors.Errorf("map %v: missing flags", mapSym)
+ return errors.Errorf("map %v: missing flags", mapSym)
}
- for {
- _, err := lr.Read(b)
- if err == io.EOF {
- break
- }
- if err != nil {
- return nil, err
- }
- if b[0] != 0 {
- return nil, errors.Errorf("map %v: unknown and non-zero fields in definition", mapSym)
- }
+ if _, err := io.Copy(internal.DiscardZeroes{}, lr); err != nil {
+ return errors.Errorf("map %v: unknown and non-zero fields in definition", mapSym)
}
maps[mapSym] = &spec
}
}
- return maps, nil
+
+ return nil
+}
+
+func (ec *elfCode) loadBTFMaps(maps map[string]*MapSpec, mapSections map[elf.SectionIndex]*elf.Section, spec *btf.Spec) error {
+
+ if spec == nil {
+ return errors.Errorf("missing BTF")
+ }
+
+ for idx, sec := range mapSections {
+ syms := ec.symbolsPerSection[idx]
+ if len(syms) == 0 {
+ return errors.Errorf("section %v: no symbols", sec.Name)
+ }
+
+ for _, sym := range syms {
+ if maps[sym] != nil {
+ return errors.Errorf("section %v: map %v already exists", sec.Name, sym)
+ }
+
+ btfMap, err := spec.Map(sym)
+ if err != nil {
+ return errors.Wrapf(err, "map %v: can't get BTF", sym)
+ }
+
+ spec, err := mapSpecFromBTF(btfMap)
+ if err != nil {
+ return errors.Wrapf(err, "map %v", sym)
+ }
+
+ maps[sym] = spec
+ }
+ }
+
+ return nil
+}
+
+func mapSpecFromBTF(btfMap *btf.Map) (*MapSpec, error) {
+ var (
+ mapType, flags, maxEntries uint32
+ err error
+ )
+ for _, member := range btf.MapType(btfMap).Members {
+ switch member.Name {
+ case "type":
+ mapType, err = uintFromBTF(member.Type)
+ if err != nil {
+ return nil, errors.Wrap(err, "can't get type")
+ }
+
+ case "map_flags":
+ flags, err = uintFromBTF(member.Type)
+ if err != nil {
+ return nil, errors.Wrap(err, "can't get BTF map flags")
+ }
+
+ case "max_entries":
+ maxEntries, err = uintFromBTF(member.Type)
+ if err != nil {
+ return nil, errors.Wrap(err, "can't get BTF map max entries")
+ }
+
+ case "key":
+ case "value":
+ default:
+ return nil, errors.Errorf("unrecognized field %s in BTF map definition", member.Name)
+ }
+ }
+
+ keySize, err := btf.Sizeof(btf.MapKey(btfMap))
+ if err != nil {
+ return nil, errors.Wrap(err, "can't get size of BTF key")
+ }
+
+ valueSize, err := btf.Sizeof(btf.MapValue(btfMap))
+ if err != nil {
+ return nil, errors.Wrap(err, "can't get size of BTF value")
+ }
+
+ return &MapSpec{
+ Type: MapType(mapType),
+ KeySize: uint32(keySize),
+ ValueSize: uint32(valueSize),
+ MaxEntries: maxEntries,
+ Flags: flags,
+ BTF: btfMap,
+ }, nil
+}
+
+// uintFromBTF resolves the __uint macro, which is a pointer to a sized
+// array, e.g. for int (*foo)[10], this function will return 10.
+func uintFromBTF(typ btf.Type) (uint32, error) {
+ ptr, ok := typ.(*btf.Pointer)
+ if !ok {
+ return 0, errors.Errorf("not a pointer: %v", typ)
+ }
+
+ arr, ok := ptr.Target.(*btf.Array)
+ if !ok {
+ return 0, errors.Errorf("not a pointer to array: %v", typ)
+ }
+
+ return arr.Nelems, nil
}
func getProgType(v string) (ProgramType, AttachType) {
types := map[string]ProgramType{
// From https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/lib/bpf/libbpf.c#n3568
- "socket": SocketFilter,
- "seccomp": SocketFilter,
- "kprobe/": Kprobe,
- "kretprobe/": Kprobe,
- "tracepoint/": TracePoint,
- "xdp": XDP,
- "perf_event": PerfEvent,
- "sockops": SockOps,
- "sk_skb": SkSKB,
- "sk_msg": SkMsg,
- "lirc_mode2": LircMode2,
- "flow_dissector": FlowDissector,
+ "socket": SocketFilter,
+ "seccomp": SocketFilter,
+ "kprobe/": Kprobe,
+ "uprobe/": Kprobe,
+ "kretprobe/": Kprobe,
+ "uretprobe/": Kprobe,
+ "tracepoint/": TracePoint,
+ "raw_tracepoint/": RawTracepoint,
+ "xdp": XDP,
+ "perf_event": PerfEvent,
+ "lwt_in": LWTIn,
+ "lwt_out": LWTOut,
+ "lwt_xmit": LWTXmit,
+ "lwt_seg6local": LWTSeg6Local,
+ "sockops": SockOps,
+ "sk_skb": SkSKB,
+ "sk_msg": SkMsg,
+ "lirc_mode2": LircMode2,
+ "flow_dissector": FlowDissector,
"cgroup_skb/": CGroupSKB,
"cgroup/dev": CGroupDevice,
diff --git a/vendor/github.com/cilium/ebpf/feature.go b/vendor/github.com/cilium/ebpf/feature.go
deleted file mode 100644
index 9104bc9c4..000000000
--- a/vendor/github.com/cilium/ebpf/feature.go
+++ /dev/null
@@ -1,19 +0,0 @@
-package ebpf
-
-import (
- "sync"
-)
-
-type featureTest struct {
- Fn func() bool
-
- once sync.Once
- result bool
-}
-
-func (ft *featureTest) Result() bool {
- ft.once.Do(func() {
- ft.result = ft.Fn()
- })
- return ft.result
-}
diff --git a/vendor/github.com/cilium/ebpf/go.mod b/vendor/github.com/cilium/ebpf/go.mod
deleted file mode 100644
index 687bdec9f..000000000
--- a/vendor/github.com/cilium/ebpf/go.mod
+++ /dev/null
@@ -1,8 +0,0 @@
-module github.com/cilium/ebpf
-
-go 1.12
-
-require (
- github.com/pkg/errors v0.8.1
- golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7
-)
diff --git a/vendor/github.com/cilium/ebpf/go.sum b/vendor/github.com/cilium/ebpf/go.sum
deleted file mode 100644
index 9edd97934..000000000
--- a/vendor/github.com/cilium/ebpf/go.sum
+++ /dev/null
@@ -1,4 +0,0 @@
-github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
-github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
-golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7 h1:HmbHVPwrPEKPGLAcHSrMe6+hqSUlvZU0rab6x5EXfGU=
-golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
diff --git a/vendor/github.com/cilium/ebpf/internal/btf/btf.go b/vendor/github.com/cilium/ebpf/internal/btf/btf.go
new file mode 100644
index 000000000..b2122f37e
--- /dev/null
+++ b/vendor/github.com/cilium/ebpf/internal/btf/btf.go
@@ -0,0 +1,530 @@
+package btf
+
+import (
+ "bytes"
+ "debug/elf"
+ "encoding/binary"
+ "io"
+ "io/ioutil"
+ "math"
+ "reflect"
+ "unsafe"
+
+ "github.com/cilium/ebpf/internal"
+ "github.com/cilium/ebpf/internal/unix"
+
+ "github.com/pkg/errors"
+)
+
+const btfMagic = 0xeB9F
+
+// Spec represents decoded BTF.
+type Spec struct {
+ rawTypes []rawType
+ strings stringTable
+ types map[string][]Type
+ funcInfos map[string]extInfo
+ lineInfos map[string]extInfo
+}
+
+type btfHeader struct {
+ Magic uint16
+ Version uint8
+ Flags uint8
+ HdrLen uint32
+
+ TypeOff uint32
+ TypeLen uint32
+ StringOff uint32
+ StringLen uint32
+}
+
+// LoadSpecFromReader reads BTF sections from an ELF.
+//
+// Returns a nil Spec and no error if no BTF was present.
+func LoadSpecFromReader(rd io.ReaderAt) (*Spec, error) {
+ file, err := elf.NewFile(rd)
+ if err != nil {
+ return nil, err
+ }
+ defer file.Close()
+
+ var (
+ btfSection *elf.Section
+ btfExtSection *elf.Section
+ )
+
+ for _, sec := range file.Sections {
+ switch sec.Name {
+ case ".BTF":
+ btfSection = sec
+ case ".BTF.ext":
+ btfExtSection = sec
+ }
+ }
+
+ if btfSection == nil {
+ return nil, nil
+ }
+
+ spec, err := parseBTF(btfSection.Open(), file.ByteOrder)
+ if err != nil {
+ return nil, err
+ }
+
+ if btfExtSection != nil {
+ spec.funcInfos, spec.lineInfos, err = parseExtInfos(btfExtSection.Open(), file.ByteOrder, spec.strings)
+ if err != nil {
+ return nil, errors.Wrap(err, "can't read ext info")
+ }
+ }
+
+ return spec, nil
+}
+
+func parseBTF(btf io.ReadSeeker, bo binary.ByteOrder) (*Spec, error) {
+ rawBTF, err := ioutil.ReadAll(btf)
+ if err != nil {
+ return nil, errors.Wrap(err, "can't read BTF")
+ }
+
+ rd := bytes.NewReader(rawBTF)
+
+ var header btfHeader
+ if err := binary.Read(rd, bo, &header); err != nil {
+ return nil, errors.Wrap(err, "can't read header")
+ }
+
+ if header.Magic != btfMagic {
+ return nil, errors.Errorf("incorrect magic value %v", header.Magic)
+ }
+
+ if header.Version != 1 {
+ return nil, errors.Errorf("unexpected version %v", header.Version)
+ }
+
+ if header.Flags != 0 {
+ return nil, errors.Errorf("unsupported flags %v", header.Flags)
+ }
+
+ remainder := int64(header.HdrLen) - int64(binary.Size(&header))
+ if remainder < 0 {
+ return nil, errors.New("header is too short")
+ }
+
+ if _, err := io.CopyN(internal.DiscardZeroes{}, rd, remainder); err != nil {
+ return nil, errors.Wrap(err, "header padding")
+ }
+
+ if _, err := rd.Seek(int64(header.HdrLen+header.StringOff), io.SeekStart); err != nil {
+ return nil, errors.Wrap(err, "can't seek to start of string section")
+ }
+
+ strings, err := readStringTable(io.LimitReader(rd, int64(header.StringLen)))
+ if err != nil {
+ return nil, errors.Wrap(err, "can't read type names")
+ }
+
+ if _, err := rd.Seek(int64(header.HdrLen+header.TypeOff), io.SeekStart); err != nil {
+ return nil, errors.Wrap(err, "can't seek to start of type section")
+ }
+
+ rawTypes, err := readTypes(io.LimitReader(rd, int64(header.TypeLen)), bo)
+ if err != nil {
+ return nil, errors.Wrap(err, "can't read types")
+ }
+
+ types, err := inflateRawTypes(rawTypes, strings)
+ if err != nil {
+ return nil, err
+ }
+
+ return &Spec{
+ rawTypes: rawTypes,
+ types: types,
+ strings: strings,
+ funcInfos: make(map[string]extInfo),
+ lineInfos: make(map[string]extInfo),
+ }, nil
+}
+
+func (s *Spec) marshal(bo binary.ByteOrder) ([]byte, error) {
+ var (
+ buf bytes.Buffer
+ header = new(btfHeader)
+ headerLen = binary.Size(header)
+ )
+
+ // Reserve space for the header. We have to write it last since
+ // we don't know the size of the type section yet.
+ _, _ = buf.Write(make([]byte, headerLen))
+
+ // Write type section, just after the header.
+ for _, typ := range s.rawTypes {
+ if typ.Kind() == kindDatasec {
+ // Datasec requires patching with information from the ELF
+ // file. We don't support this at the moment, so patch
+ // out any Datasec by turning it into a void*.
+ typ = rawType{}
+ typ.SetKind(kindPointer)
+ }
+
+ if err := typ.Marshal(&buf, bo); err != nil {
+ return nil, errors.Wrap(err, "can't marshal BTF")
+ }
+ }
+
+ typeLen := uint32(buf.Len() - headerLen)
+
+ // Write string section after type section.
+ _, _ = buf.Write(s.strings)
+
+ // Fill out the header, and write it out.
+ header = &btfHeader{
+ Magic: btfMagic,
+ Version: 1,
+ Flags: 0,
+ HdrLen: uint32(headerLen),
+ TypeOff: 0,
+ TypeLen: typeLen,
+ StringOff: typeLen,
+ StringLen: uint32(len(s.strings)),
+ }
+
+ raw := buf.Bytes()
+ err := binary.Write(sliceWriter(raw[:headerLen]), bo, header)
+ if err != nil {
+ return nil, errors.Wrap(err, "can't write header")
+ }
+
+ return raw, nil
+}
+
+type sliceWriter []byte
+
+func (sw sliceWriter) Write(p []byte) (int, error) {
+ if len(p) != len(sw) {
+ return 0, errors.New("size doesn't match")
+ }
+
+ return copy(sw, p), nil
+}
+
+// Program finds the BTF for a specific section.
+//
+// Length is the number of bytes in the raw BPF instruction stream.
+//
+// Returns an error if there is no BTF.
+func (s *Spec) Program(name string, length uint64) (*Program, error) {
+ if length == 0 {
+ return nil, errors.New("length musn't be zero")
+ }
+
+ funcInfos, funcOK := s.funcInfos[name]
+ lineInfos, lineOK := s.lineInfos[name]
+
+ if !funcOK && !lineOK {
+ return nil, errors.Errorf("no BTF for program %s", name)
+ }
+
+ return &Program{s, length, funcInfos, lineInfos}, nil
+}
+
+// Map finds the BTF for a map.
+//
+// Returns an error if there is no BTF for the given name.
+func (s *Spec) Map(name string) (*Map, error) {
+ var mapVar Var
+ if err := s.FindType(name, &mapVar); err != nil {
+ return nil, err
+ }
+
+ mapStruct, ok := mapVar.Type.(*Struct)
+ if !ok {
+ return nil, errors.Errorf("expected struct, have %s", mapVar.Type)
+ }
+
+ var key, value Type
+ for _, member := range mapStruct.Members {
+ switch member.Name {
+ case "key":
+ key = member.Type
+
+ case "value":
+ value = member.Type
+ }
+ }
+
+ if key == nil {
+ return nil, errors.Errorf("map %s: missing 'key' in type", name)
+ }
+
+ if value == nil {
+ return nil, errors.Errorf("map %s: missing 'value' in type", name)
+ }
+
+ return &Map{mapStruct, s, key, value}, nil
+}
+
+var errNotFound = errors.New("not found")
+
+// FindType searches for a type with a specific name.
+//
+// hint determines the type of the returned Type.
+//
+// Returns an error if there is no or multiple matches.
+func (s *Spec) FindType(name string, typ Type) error {
+ var (
+ wanted = reflect.TypeOf(typ)
+ candidate Type
+ )
+
+ for _, typ := range s.types[name] {
+ if reflect.TypeOf(typ) != wanted {
+ continue
+ }
+
+ if candidate != nil {
+ return errors.Errorf("type %s: multiple candidates for %T", name, typ)
+ }
+
+ candidate = typ
+ }
+
+ if candidate == nil {
+ return errors.WithMessagef(errNotFound, "type %s", name)
+ }
+
+ value := reflect.Indirect(reflect.ValueOf(copyType(candidate)))
+ reflect.Indirect(reflect.ValueOf(typ)).Set(value)
+ return nil
+}
+
+// Handle is a reference to BTF loaded into the kernel.
+type Handle struct {
+ fd *internal.FD
+}
+
+// NewHandle loads BTF into the kernel.
+//
+// Returns an error if BTF is not supported, which can
+// be checked by IsNotSupported.
+func NewHandle(spec *Spec) (*Handle, error) {
+ if err := haveBTF(); err != nil {
+ return nil, err
+ }
+
+ btf, err := spec.marshal(internal.NativeEndian)
+ if err != nil {
+ return nil, errors.Wrap(err, "can't marshal BTF")
+ }
+
+ if uint64(len(btf)) > math.MaxUint32 {
+ return nil, errors.New("BTF exceeds the maximum size")
+ }
+
+ attr := &bpfLoadBTFAttr{
+ btf: internal.NewSlicePointer(btf),
+ btfSize: uint32(len(btf)),
+ }
+
+ fd, err := bpfLoadBTF(attr)
+ if err != nil {
+ logBuf := make([]byte, 64*1024)
+ attr.logBuf = internal.NewSlicePointer(logBuf)
+ attr.btfLogSize = uint32(len(logBuf))
+ attr.btfLogLevel = 1
+ _, logErr := bpfLoadBTF(attr)
+ return nil, internal.ErrorWithLog(err, logBuf, logErr)
+ }
+
+ return &Handle{fd}, nil
+}
+
+// Close destroys the handle.
+//
+// Subsequent calls to FD will return an invalid value.
+func (h *Handle) Close() error {
+ return h.fd.Close()
+}
+
+// FD returns the file descriptor for the handle.
+func (h *Handle) FD() int {
+ value, err := h.fd.Value()
+ if err != nil {
+ return -1
+ }
+
+ return int(value)
+}
+
+// Map is the BTF for a map.
+type Map struct {
+ definition *Struct
+ spec *Spec
+ key, value Type
+}
+
+// MapSpec should be a method on Map, but is a free function
+// to hide it from users of the ebpf package.
+func MapSpec(m *Map) *Spec {
+ return m.spec
+}
+
+// MapType should be a method on Map, but is a free function
+// to hide it from users of the ebpf package.
+func MapType(m *Map) *Struct {
+ return m.definition
+}
+
+// MapKey should be a method on Map, but is a free function
+// to hide it from users of the ebpf package.
+func MapKey(m *Map) Type {
+ return m.key
+}
+
+// MapValue should be a method on Map, but is a free function
+// to hide it from users of the ebpf package.
+func MapValue(m *Map) Type {
+ return m.value
+}
+
+// Program is the BTF information for a stream of instructions.
+type Program struct {
+ spec *Spec
+ length uint64
+ funcInfos, lineInfos extInfo
+}
+
+// ProgramSpec returns the Spec needed for loading function and line infos into the kernel.
+//
+// This is a free function instead of a method to hide it from users
+// of package ebpf.
+func ProgramSpec(s *Program) *Spec {
+ return s.spec
+}
+
+// ProgramAppend the information from other to the Program.
+//
+// This is a free function instead of a method to hide it from users
+// of package ebpf.
+func ProgramAppend(s, other *Program) error {
+ funcInfos, err := s.funcInfos.append(other.funcInfos, s.length)
+ if err != nil {
+ return errors.Wrap(err, "func infos")
+ }
+
+ lineInfos, err := s.lineInfos.append(other.lineInfos, s.length)
+ if err != nil {
+ return errors.Wrap(err, "line infos")
+ }
+
+ s.length += other.length
+ s.funcInfos = funcInfos
+ s.lineInfos = lineInfos
+ return nil
+}
+
+// ProgramFuncInfos returns the binary form of BTF function infos.
+//
+// This is a free function instead of a method to hide it from users
+// of package ebpf.
+func ProgramFuncInfos(s *Program) (recordSize uint32, bytes []byte, err error) {
+ bytes, err = s.funcInfos.MarshalBinary()
+ if err != nil {
+ return 0, nil, err
+ }
+
+ return s.funcInfos.recordSize, bytes, nil
+}
+
+// ProgramLineInfos returns the binary form of BTF line infos.
+//
+// This is a free function instead of a method to hide it from users
+// of package ebpf.
+func ProgramLineInfos(s *Program) (recordSize uint32, bytes []byte, err error) {
+ bytes, err = s.lineInfos.MarshalBinary()
+ if err != nil {
+ return 0, nil, err
+ }
+
+ return s.lineInfos.recordSize, bytes, nil
+}
+
+// IsNotSupported returns true if the error indicates that the kernel
+// doesn't support BTF.
+func IsNotSupported(err error) bool {
+ ufe, ok := errors.Cause(err).(*internal.UnsupportedFeatureError)
+ return ok && ufe.Name == "BTF"
+}
+
+type bpfLoadBTFAttr struct {
+ btf internal.Pointer
+ logBuf internal.Pointer
+ btfSize uint32
+ btfLogSize uint32
+ btfLogLevel uint32
+}
+
+func bpfLoadBTF(attr *bpfLoadBTFAttr) (*internal.FD, error) {
+ const _BTFLoad = 18
+
+ fd, err := internal.BPF(_BTFLoad, unsafe.Pointer(attr), unsafe.Sizeof(*attr))
+ if err != nil {
+ return nil, err
+ }
+
+ return internal.NewFD(uint32(fd)), nil
+}
+
+func minimalBTF(bo binary.ByteOrder) []byte {
+ const minHeaderLength = 24
+
+ var (
+ types struct {
+ Integer btfType
+ Var btfType
+ btfVar struct{ Linkage uint32 }
+ }
+ typLen = uint32(binary.Size(&types))
+ strings = []byte{0, 'a', 0}
+ header = btfHeader{
+ Magic: btfMagic,
+ Version: 1,
+ HdrLen: minHeaderLength,
+ TypeOff: 0,
+ TypeLen: typLen,
+ StringOff: typLen,
+ StringLen: uint32(len(strings)),
+ }
+ )
+
+ // We use a BTF_KIND_VAR here, to make sure that
+ // the kernel understands BTF at least as well as we
+ // do. BTF_KIND_VAR was introduced ~5.1.
+ types.Integer.SetKind(kindPointer)
+ types.Var.NameOff = 1
+ types.Var.SetKind(kindVar)
+ types.Var.SizeType = 1
+
+ buf := new(bytes.Buffer)
+ _ = binary.Write(buf, bo, &header)
+ _ = binary.Write(buf, bo, &types)
+ buf.Write(strings)
+
+ return buf.Bytes()
+}
+
+var haveBTF = internal.FeatureTest("BTF", "5.1", func() bool {
+ btf := minimalBTF(internal.NativeEndian)
+ fd, err := bpfLoadBTF(&bpfLoadBTFAttr{
+ btf: internal.NewSlicePointer(btf),
+ btfSize: uint32(len(btf)),
+ })
+ if err == nil {
+ fd.Close()
+ }
+ // Check for EINVAL specifically, rather than err != nil since we
+ // otherwise misdetect due to insufficient permissions.
+ return errors.Cause(err) != unix.EINVAL
+})
diff --git a/vendor/github.com/cilium/ebpf/internal/btf/btf_types.go b/vendor/github.com/cilium/ebpf/internal/btf/btf_types.go
new file mode 100644
index 000000000..6570fedff
--- /dev/null
+++ b/vendor/github.com/cilium/ebpf/internal/btf/btf_types.go
@@ -0,0 +1,190 @@
+package btf
+
+import (
+ "encoding/binary"
+ "io"
+
+ "github.com/pkg/errors"
+)
+
+// btfKind describes a Type.
+type btfKind uint8
+
+// Equivalents of the BTF_KIND_* constants.
+const (
+ kindUnknown btfKind = iota
+ kindInt
+ kindPointer
+ kindArray
+ kindStruct
+ kindUnion
+ kindEnum
+ kindForward
+ kindTypedef
+ kindVolatile
+ kindConst
+ kindRestrict
+ // Added ~4.20
+ kindFunc
+ kindFuncProto
+ // Added ~5.1
+ kindVar
+ kindDatasec
+)
+
+const (
+ btfTypeKindShift = 24
+ btfTypeKindLen = 4
+ btfTypeVlenShift = 0
+ btfTypeVlenMask = 16
+)
+
+// btfType is equivalent to struct btf_type in Documentation/bpf/btf.rst.
+type btfType struct {
+ NameOff uint32
+ /* "info" bits arrangement
+ * bits 0-15: vlen (e.g. # of struct's members)
+ * bits 16-23: unused
+ * bits 24-27: kind (e.g. int, ptr, array...etc)
+ * bits 28-30: unused
+ * bit 31: kind_flag, currently used by
+ * struct, union and fwd
+ */
+ Info uint32
+ /* "size" is used by INT, ENUM, STRUCT and UNION.
+ * "size" tells the size of the type it is describing.
+ *
+ * "type" is used by PTR, TYPEDEF, VOLATILE, CONST, RESTRICT,
+ * FUNC and FUNC_PROTO.
+ * "type" is a type_id referring to another type.
+ */
+ SizeType uint32
+}
+
+func mask(len uint32) uint32 {
+ return (1 << len) - 1
+}
+
+func (bt *btfType) info(len, shift uint32) uint32 {
+ return (bt.Info >> shift) & mask(len)
+}
+
+func (bt *btfType) setInfo(value, len, shift uint32) {
+ bt.Info &^= mask(len) << shift
+ bt.Info |= (value & mask(len)) << shift
+}
+
+func (bt *btfType) Kind() btfKind {
+ return btfKind(bt.info(btfTypeKindLen, btfTypeKindShift))
+}
+
+func (bt *btfType) SetKind(kind btfKind) {
+ bt.setInfo(uint32(kind), btfTypeKindLen, btfTypeKindShift)
+}
+
+func (bt *btfType) Vlen() int {
+ return int(bt.info(btfTypeVlenMask, btfTypeVlenShift))
+}
+
+func (bt *btfType) SetVlen(vlen int) {
+ bt.setInfo(uint32(vlen), btfTypeVlenMask, btfTypeVlenShift)
+}
+
+func (bt *btfType) Type() TypeID {
+ // TODO: Panic here if wrong kind?
+ return TypeID(bt.SizeType)
+}
+
+func (bt *btfType) Size() uint32 {
+ // TODO: Panic here if wrong kind?
+ return bt.SizeType
+}
+
+type rawType struct {
+ btfType
+ data interface{}
+}
+
+func (rt *rawType) Marshal(w io.Writer, bo binary.ByteOrder) error {
+ if err := binary.Write(w, bo, &rt.btfType); err != nil {
+ return err
+ }
+
+ if rt.data == nil {
+ return nil
+ }
+
+ return binary.Write(w, bo, rt.data)
+}
+
+type btfArray struct {
+ Type TypeID
+ IndexType TypeID
+ Nelems uint32
+}
+
+type btfMember struct {
+ NameOff uint32
+ Type TypeID
+ Offset uint32
+}
+
+func readTypes(r io.Reader, bo binary.ByteOrder) ([]rawType, error) {
+ var (
+ header btfType
+ types []rawType
+ )
+
+ for id := TypeID(1); ; id++ {
+ if err := binary.Read(r, bo, &header); err == io.EOF {
+ return types, nil
+ } else if err != nil {
+ return nil, errors.Wrapf(err, "can't read type info for id %v", id)
+ }
+
+ var data interface{}
+ switch header.Kind() {
+ case kindInt:
+ // sizeof(uint32)
+ data = make([]byte, 4)
+ case kindPointer:
+ case kindArray:
+ data = new(btfArray)
+ case kindStruct:
+ fallthrough
+ case kindUnion:
+ data = make([]btfMember, header.Vlen())
+ case kindEnum:
+ // sizeof(struct btf_enum)
+ data = make([]byte, header.Vlen()*4*2)
+ case kindForward:
+ case kindTypedef:
+ case kindVolatile:
+ case kindConst:
+ case kindRestrict:
+ case kindFunc:
+ case kindFuncProto:
+ // sizeof(struct btf_param)
+ data = make([]byte, header.Vlen()*4*2)
+ case kindVar:
+ // sizeof(struct btf_variable)
+ data = make([]byte, 4)
+ case kindDatasec:
+ // sizeof(struct btf_var_secinfo)
+ data = make([]byte, header.Vlen()*4*3)
+ default:
+ return nil, errors.Errorf("type id %v: unknown kind: %v", id, header.Kind())
+ }
+
+ if data == nil {
+ types = append(types, rawType{header, nil})
+ continue
+ }
+
+ if err := binary.Read(r, bo, data); err != nil {
+ return nil, errors.Wrapf(err, "type id %d: kind %v: can't read %T", id, header.Kind(), data)
+ }
+
+ types = append(types, rawType{header, data})
+ }
+}
diff --git a/vendor/github.com/cilium/ebpf/internal/btf/doc.go b/vendor/github.com/cilium/ebpf/internal/btf/doc.go
new file mode 100644
index 000000000..ad2576cb2
--- /dev/null
+++ b/vendor/github.com/cilium/ebpf/internal/btf/doc.go
@@ -0,0 +1,8 @@
+// Package btf handles data encoded according to the BPF Type Format.
+//
+// The canonical documentation lives in the Linux kernel repository and is
+// available at https://www.kernel.org/doc/html/latest/bpf/btf.html
+//
+// The API is very much unstable. You should only use this via the main
+// ebpf library.
+package btf
diff --git a/vendor/github.com/cilium/ebpf/internal/btf/ext_info.go b/vendor/github.com/cilium/ebpf/internal/btf/ext_info.go
new file mode 100644
index 000000000..ab019cac7
--- /dev/null
+++ b/vendor/github.com/cilium/ebpf/internal/btf/ext_info.go
@@ -0,0 +1,184 @@
+package btf
+
+import (
+ "bytes"
+ "encoding/binary"
+ "io"
+ "io/ioutil"
+
+ "github.com/cilium/ebpf/asm"
+ "github.com/cilium/ebpf/internal"
+
+ "github.com/pkg/errors"
+)
+
+type btfExtHeader struct {
+ Magic uint16
+ Version uint8
+ Flags uint8
+ HdrLen uint32
+
+ FuncInfoOff uint32
+ FuncInfoLen uint32
+ LineInfoOff uint32
+ LineInfoLen uint32
+}
+
+func parseExtInfos(r io.ReadSeeker, bo binary.ByteOrder, strings stringTable) (funcInfo, lineInfo map[string]extInfo, err error) {
+ const expectedMagic = 0xeB9F
+
+ var header btfExtHeader
+ if err := binary.Read(r, bo, &header); err != nil {
+ return nil, nil, errors.Wrap(err, "can't read header")
+ }
+
+ if header.Magic != expectedMagic {
+ return nil, nil, errors.Errorf("incorrect magic value %v", header.Magic)
+ }
+
+ if header.Version != 1 {
+ return nil, nil, errors.Errorf("unexpected version %v", header.Version)
+ }
+
+ if header.Flags != 0 {
+ return nil, nil, errors.Errorf("unsupported flags %v", header.Flags)
+ }
+
+ remainder := int64(header.HdrLen) - int64(binary.Size(&header))
+ if remainder < 0 {
+ return nil, nil, errors.New("header is too short")
+ }
+
+ // Of course, the .BTF.ext header has different semantics than the
+ // .BTF ext header. We need to ignore non-null values.
+ _, err = io.CopyN(ioutil.Discard, r, remainder)
+ if err != nil {
+ return nil, nil, errors.Wrap(err, "header padding")
+ }
+
+ if _, err := r.Seek(int64(header.HdrLen+header.FuncInfoOff), io.SeekStart); err != nil {
+ return nil, nil, errors.Wrap(err, "can't seek to function info section")
+ }
+
+ funcInfo, err = parseExtInfo(io.LimitReader(r, int64(header.FuncInfoLen)), bo, strings)
+ if err != nil {
+ return nil, nil, errors.Wrap(err, "function info")
+ }
+
+ if _, err := r.Seek(int64(header.HdrLen+header.LineInfoOff), io.SeekStart); err != nil {
+ return nil, nil, errors.Wrap(err, "can't seek to line info section")
+ }
+
+ lineInfo, err = parseExtInfo(io.LimitReader(r, int64(header.LineInfoLen)), bo, strings)
+ if err != nil {
+ return nil, nil, errors.Wrap(err, "line info")
+ }
+
+ return funcInfo, lineInfo, nil
+}
+
+type btfExtInfoSec struct {
+ SecNameOff uint32
+ NumInfo uint32
+}
+
+type extInfoRecord struct {
+ InsnOff uint64
+ Opaque []byte
+}
+
+type extInfo struct {
+ recordSize uint32
+ records []extInfoRecord
+}
+
+func (ei extInfo) append(other extInfo, offset uint64) (extInfo, error) {
+ if other.recordSize != ei.recordSize {
+ return extInfo{}, errors.Errorf("ext_info record size mismatch, want %d (got %d)", ei.recordSize, other.recordSize)
+ }
+
+ records := make([]extInfoRecord, 0, len(ei.records)+len(other.records))
+ records = append(records, ei.records...)
+ for _, info := range other.records {
+ records = append(records, extInfoRecord{
+ InsnOff: info.InsnOff + offset,
+ Opaque: info.Opaque,
+ })
+ }
+ return extInfo{ei.recordSize, records}, nil
+}
+
+func (ei extInfo) MarshalBinary() ([]byte, error) {
+ if len(ei.records) == 0 {
+ return nil, nil
+ }
+
+ buf := bytes.NewBuffer(make([]byte, 0, int(ei.recordSize)*len(ei.records)))
+ for _, info := range ei.records {
+ // The kernel expects offsets in number of raw bpf instructions,
+ // while the ELF tracks it in bytes.
+ insnOff := uint32(info.InsnOff / asm.InstructionSize)
+ if err := binary.Write(buf, internal.NativeEndian, insnOff); err != nil {
+ return nil, errors.Wrap(err, "can't write instruction offset")
+ }
+
+ buf.Write(info.Opaque)
+ }
+
+ return buf.Bytes(), nil
+}
+
+func parseExtInfo(r io.Reader, bo binary.ByteOrder, strings stringTable) (map[string]extInfo, error) {
+ var recordSize uint32
+ if err := binary.Read(r, bo, &recordSize); err != nil {
+ return nil, errors.Wrap(err, "can't read record size")
+ }
+
+ if recordSize < 4 {
+ // Need at least insnOff
+ return nil, errors.New("record size too short")
+ }
+
+ result := make(map[string]extInfo)
+ for {
+ var infoHeader btfExtInfoSec
+ if err := binary.Read(r, bo, &infoHeader); err == io.EOF {
+ return result, nil
+ } else if err != nil {
+ return nil, errors.Wrap(err, "can't read ext info header")
+ }
+
+ secName, err := strings.Lookup(infoHeader.SecNameOff)
+ if err != nil {
+ return nil, errors.Wrap(err, "can't get section name")
+ }
+
+ if infoHeader.NumInfo == 0 {
+ return nil, errors.Errorf("section %s has invalid number of records", secName)
+ }
+
+ var records []extInfoRecord
+ for i := uint32(0); i < infoHeader.NumInfo; i++ {
+ var byteOff uint32
+ if err := binary.Read(r, bo, &byteOff); err != nil {
+ return nil, errors.Wrapf(err, "section %v: can't read extended info offset", secName)
+ }
+
+ buf := make([]byte, int(recordSize-4))
+ if _, err := io.ReadFull(r, buf); err != nil {
+ return nil, errors.Wrapf(err, "section %v: can't read record", secName)
+ }
+
+ if byteOff%asm.InstructionSize != 0 {
+ return nil, errors.Errorf("section %v: offset %v is not aligned with instruction size", secName, byteOff)
+ }
+
+ records = append(records, extInfoRecord{uint64(byteOff), buf})
+ }
+
+ result[secName] = extInfo{
+ recordSize,
+ records,
+ }
+ }
+}
diff --git a/vendor/github.com/cilium/ebpf/internal/btf/strings.go b/vendor/github.com/cilium/ebpf/internal/btf/strings.go
new file mode 100644
index 000000000..c0337649e
--- /dev/null
+++ b/vendor/github.com/cilium/ebpf/internal/btf/strings.go
@@ -0,0 +1,60 @@
+package btf
+
+import (
+ "bytes"
+ "io"
+ "io/ioutil"
+
+ "github.com/pkg/errors"
+)
+
+type stringTable []byte
+
+func readStringTable(r io.Reader) (stringTable, error) {
+ contents, err := ioutil.ReadAll(r)
+ if err != nil {
+ return nil, errors.Wrap(err, "can't read string table")
+ }
+
+ if len(contents) < 1 {
+ return nil, errors.New("string table is empty")
+ }
+
+ if contents[0] != '\x00' {
+ return nil, errors.New("first item in string table is non-empty")
+ }
+
+ if contents[len(contents)-1] != '\x00' {
+ return nil, errors.New("string table isn't null terminated")
+ }
+
+ return stringTable(contents), nil
+}
+
+func (st stringTable) Lookup(offset uint32) (string, error) {
+ if int64(offset) > int64(^uint(0)>>1) {
+ return "", errors.Errorf("offset %d overflows int", offset)
+ }
+
+ pos := int(offset)
+ if pos >= len(st) {
+ return "", errors.Errorf("offset %d is out of bounds", offset)
+ }
+
+ if pos > 0 && st[pos-1] != '\x00' {
+ return "", errors.Errorf("offset %d isn't start of a string", offset)
+ }
+
+ str := st[pos:]
+ end := bytes.IndexByte(str, '\x00')
+ if end == -1 {
+ return "", errors.Errorf("offset %d isn't null terminated", offset)
+ }
+
+ return string(str[:end]), nil
+}
+
+func (st stringTable) LookupName(offset uint32) (Name, error) {
+ str, err := st.Lookup(offset)
+ return Name(str), err
+}
diff --git a/vendor/github.com/cilium/ebpf/internal/btf/types.go b/vendor/github.com/cilium/ebpf/internal/btf/types.go
new file mode 100644
index 000000000..c49cb8621
--- /dev/null
+++ b/vendor/github.com/cilium/ebpf/internal/btf/types.go
@@ -0,0 +1,550 @@
+package btf
+
+import (
+ "math"
+
+ "github.com/pkg/errors"
+)
+
+const maxTypeDepth = 32
+
+// TypeID identifies a type in a BTF section.
+type TypeID uint32
+
+// ID implements part of the Type interface.
+func (tid TypeID) ID() TypeID {
+ return tid
+}
+
+// Type represents a type described by BTF.
+type Type interface {
+ ID() TypeID
+
+ // Make a copy of the type, without copying Type members.
+ copy() Type
+
+ walk(*copyStack)
+}
+
+// Name identifies a type.
+//
+// Anonymous types have an empty name.
+type Name string
+
+func (n Name) name() string {
+ return string(n)
+}
+
+// Void is the unit type of BTF.
+type Void struct{}
+
+func (v Void) ID() TypeID { return 0 }
+func (v Void) copy() Type { return Void{} }
+func (v Void) walk(*copyStack) {}
+
+// Int is an integer of a given length.
+type Int struct {
+ TypeID
+ Name
+
+ // The size of the integer in bytes.
+ Size uint32
+}
+
+func (i *Int) size() uint32 { return i.Size }
+func (i *Int) walk(*copyStack) {}
+func (i *Int) copy() Type {
+ cpy := *i
+ return &cpy
+}
+
+// Pointer is a pointer to another type.
+type Pointer struct {
+ TypeID
+ Target Type
+}
+
+func (p *Pointer) size() uint32 { return 8 }
+func (p *Pointer) walk(cs *copyStack) { cs.push(&p.Target) }
+func (p *Pointer) copy() Type {
+ cpy := *p
+ return &cpy
+}
+
+// Array is an array with a fixed number of elements.
+type Array struct {
+ TypeID
+ Type Type
+ Nelems uint32
+}
+
+func (arr *Array) walk(cs *copyStack) { cs.push(&arr.Type) }
+func (arr *Array) copy() Type {
+ cpy := *arr
+ return &cpy
+}
+
+// Struct is a compound type of consecutive members.
+type Struct struct {
+ TypeID
+ Name
+ // The size of the struct including padding, in bytes
+ Size uint32
+ Members []Member
+}
+
+func (s *Struct) size() uint32 { return s.Size }
+
+func (s *Struct) walk(cs *copyStack) {
+ for i := range s.Members {
+ cs.push(&s.Members[i].Type)
+ }
+}
+
+func (s *Struct) copy() Type {
+ cpy := *s
+ cpy.Members = copyMembers(cpy.Members)
+ return &cpy
+}
+
+// Union is a compound type where members occupy the same memory.
+type Union struct {
+ TypeID
+ Name
+ // The size of the union including padding, in bytes.
+ Size uint32
+ Members []Member
+}
+
+func (u *Union) size() uint32 { return u.Size }
+
+func (u *Union) walk(cs *copyStack) {
+ for i := range u.Members {
+ cs.push(&u.Members[i].Type)
+ }
+}
+
+func (u *Union) copy() Type {
+ cpy := *u
+ cpy.Members = copyMembers(cpy.Members)
+ return &cpy
+}
+
+// Member is part of a Struct or Union.
+//
+// It is not a valid Type.
+type Member struct {
+ Name
+ Type Type
+ Offset uint32
+}
+
+func copyMembers(in []Member) []Member {
+ cpy := make([]Member, 0, len(in))
+ for _, member := range in {
+ cpy = append(cpy, member)
+ }
+ return cpy
+}
+
+// Enum lists possible values.
+type Enum struct {
+ TypeID
+ Name
+}
+
+func (e *Enum) size() uint32 { return 4 }
+func (e *Enum) walk(*copyStack) {}
+func (e *Enum) copy() Type {
+ cpy := *e
+ return &cpy
+}
+
+// Fwd is a forward declaration of a Type.
+type Fwd struct {
+ TypeID
+ Name
+}
+
+func (f *Fwd) walk(*copyStack) {}
+func (f *Fwd) copy() Type {
+ cpy := *f
+ return &cpy
+}
+
+// Typedef is an alias of a Type.
+type Typedef struct {
+ TypeID
+ Name
+ Type Type
+}
+
+func (td *Typedef) walk(cs *copyStack) { cs.push(&td.Type) }
+func (td *Typedef) copy() Type {
+ cpy := *td
+ return &cpy
+}
+
+// Volatile is a modifier.
+type Volatile struct {
+ TypeID
+ Type Type
+}
+
+func (v *Volatile) walk(cs *copyStack) { cs.push(&v.Type) }
+func (v *Volatile) copy() Type {
+ cpy := *v
+ return &cpy
+}
+
+// Const is a modifier.
+type Const struct {
+ TypeID
+ Type Type
+}
+
+func (c *Const) walk(cs *copyStack) { cs.push(&c.Type) }
+func (c *Const) copy() Type {
+ cpy := *c
+ return &cpy
+}
+
+// Restrict is a modifier.
+type Restrict struct {
+ TypeID
+ Type Type
+}
+
+func (r *Restrict) walk(cs *copyStack) { cs.push(&r.Type) }
+func (r *Restrict) copy() Type {
+ cpy := *r
+ return &cpy
+}
+
+// Func is a function definition.
+type Func struct {
+ TypeID
+ Name
+ Type Type
+}
+
+func (f *Func) walk(cs *copyStack) { cs.push(&f.Type) }
+func (f *Func) copy() Type {
+ cpy := *f
+ return &cpy
+}
+
+// FuncProto is a function declaration.
+type FuncProto struct {
+ TypeID
+ Return Type
+ // Parameters not supported yet
+}
+
+func (fp *FuncProto) walk(cs *copyStack) { cs.push(&fp.Return) }
+func (fp *FuncProto) copy() Type {
+ cpy := *fp
+ return &cpy
+}
+
+// Var is a global variable.
+type Var struct {
+ TypeID
+ Name
+ Type Type
+}
+
+func (v *Var) walk(cs *copyStack) { cs.push(&v.Type) }
+func (v *Var) copy() Type {
+ cpy := *v
+ return &cpy
+}
+
+// Datasec is a global program section containing data.
+type Datasec struct {
+ TypeID
+ Name
+ Size uint32
+}
+
+func (ds *Datasec) size() uint32 { return ds.Size }
+func (ds *Datasec) walk(*copyStack) {}
+func (ds *Datasec) copy() Type {
+ cpy := *ds
+ return &cpy
+}
+
+type sizer interface {
+ size() uint32
+}
+
+var (
+ _ sizer = (*Int)(nil)
+ _ sizer = (*Pointer)(nil)
+ _ sizer = (*Struct)(nil)
+ _ sizer = (*Union)(nil)
+ _ sizer = (*Enum)(nil)
+ _ sizer = (*Datasec)(nil)
+)
+
+// Sizeof returns the size of a type in bytes.
+//
+// Returns an error if the size can't be computed.
+func Sizeof(typ Type) (int, error) {
+ var (
+ n = int64(1)
+ elem int64
+ )
+
+ for i := 0; i < maxTypeDepth; i++ {
+ switch v := typ.(type) {
+ case *Array:
+ if n > 0 && int64(v.Nelems) > math.MaxInt64/n {
+ return 0, errors.New("overflow")
+ }
+
+ // Arrays may be of zero length, which allows
+ // n to be zero as well.
+ n *= int64(v.Nelems)
+ typ = v.Type
+ continue
+
+ case sizer:
+ elem = int64(v.size())
+
+ case *Typedef:
+ typ = v.Type
+ continue
+ case *Volatile:
+ typ = v.Type
+ continue
+ case *Const:
+ typ = v.Type
+ continue
+ case *Restrict:
+ typ = v.Type
+ continue
+
+ default:
+ return 0, errors.Errorf("unrecognized type %T", typ)
+ }
+
+ if n > 0 && elem > math.MaxInt64/n {
+ return 0, errors.New("overflow")
+ }
+
+ size := n * elem
+ if int64(int(size)) != size {
+ return 0, errors.New("overflow")
+ }
+
+ return int(size), nil
+ }
+
+ return 0, errors.New("exceeded type depth")
+}
+
+// copy a Type recursively.
+//
+// typ may form a cycle.
+func copyType(typ Type) Type {
+ var (
+ copies = make(map[Type]Type)
+ work copyStack
+ )
+
+ for t := &typ; t != nil; t = work.pop() {
+ // *t is the identity of the type.
+ if cpy := copies[*t]; cpy != nil {
+ *t = cpy
+ continue
+ }
+
+ cpy := (*t).copy()
+ copies[*t] = cpy
+ *t = cpy
+
+ // Mark any nested types for copying.
+ cpy.walk(&work)
+ }
+
+ return typ
+}
+
+// copyStack keeps track of pointers to types which still
+// need to be copied.
+type copyStack []*Type
+
+// push adds a type to the stack.
+func (cs *copyStack) push(t *Type) {
+ *cs = append(*cs, t)
+}
+
+// pop returns the topmost Type, or nil.
+func (cs *copyStack) pop() *Type {
+ n := len(*cs)
+ if n == 0 {
+ return nil
+ }
+
+ t := (*cs)[n-1]
+ *cs = (*cs)[:n-1]
+ return t
+}
+
+type namer interface {
+ name() string
+}
+
+var _ namer = Name("")
+
+// inflateRawTypes takes a list of raw btf types linked via type IDs, and turns
+// it into a graph of Types connected via pointers.
+//
+// Returns a map of named types (so, where NameOff is non-zero). Since BTF ignores
+// compilation units, multiple types may share the same name. A Type may form a
+// cyclic graph by pointing at itself.
+func inflateRawTypes(rawTypes []rawType, rawStrings stringTable) (namedTypes map[string][]Type, err error) {
+ type fixup struct {
+ id TypeID
+ typ *Type
+ }
+
+ var fixups []fixup
+ convertMembers := func(raw []btfMember) ([]Member, error) {
+ // NB: The fixup below relies on pre-allocating this array to
+ // work, since otherwise append might re-allocate members.
+ members := make([]Member, 0, len(raw))
+ for i, btfMember := range raw {
+ name, err := rawStrings.LookupName(btfMember.NameOff)
+ if err != nil {
+ return nil, errors.Wrapf(err, "can't get name for member %d", i)
+ }
+ members = append(members, Member{
+ Name: name,
+ Offset: btfMember.Offset,
+ })
+ }
+ for i := range members {
+ fixups = append(fixups, fixup{raw[i].Type, &members[i].Type})
+ }
+ return members, nil
+ }
+
+ types := make([]Type, 0, len(rawTypes))
+ types = append(types, Void{})
+ namedTypes = make(map[string][]Type)
+
+ for i, raw := range rawTypes {
+ var (
+ // Void is defined to always be type ID 0, and is thus
+ // omitted from BTF.
+ id = TypeID(i + 1)
+ typ Type
+ )
+
+ name, err := rawStrings.LookupName(raw.NameOff)
+ if err != nil {
+ return nil, errors.Wrapf(err, "can't get name for type id %d", id)
+ }
+
+ switch raw.Kind() {
+ case kindInt:
+ typ = &Int{id, name, raw.Size()}
+
+ case kindPointer:
+ ptr := &Pointer{id, nil}
+ fixups = append(fixups, fixup{raw.Type(), &ptr.Target})
+ typ = ptr
+
+ case kindArray:
+ btfArr := raw.data.(*btfArray)
+
+ // IndexType is unused according to btf.rst.
+ // Don't make it available right now.
+ arr := &Array{id, nil, btfArr.Nelems}
+ fixups = append(fixups, fixup{btfArr.Type, &arr.Type})
+ typ = arr
+
+ case kindStruct:
+ members, err := convertMembers(raw.data.([]btfMember))
+ if err != nil {
+ return nil, errors.Wrapf(err, "struct %s (id %d)", name, id)
+ }
+ typ = &Struct{id, name, raw.Size(), members}
+
+ case kindUnion:
+ members, err := convertMembers(raw.data.([]btfMember))
+ if err != nil {
+ return nil, errors.Wrapf(err, "union %s (id %d)", name, id)
+ }
+ typ = &Union{id, name, raw.Size(), members}
+
+ case kindEnum:
+ typ = &Enum{id, name}
+
+ case kindForward:
+ typ = &Fwd{id, name}
+
+ case kindTypedef:
+ typedef := &Typedef{id, name, nil}
+ fixups = append(fixups, fixup{raw.Type(), &typedef.Type})
+ typ = typedef
+
+ case kindVolatile:
+ volatile := &Volatile{id, nil}
+ fixups = append(fixups, fixup{raw.Type(), &volatile.Type})
+ typ = volatile
+
+ case kindConst:
+ cnst := &Const{id, nil}
+ fixups = append(fixups, fixup{raw.Type(), &cnst.Type})
+ typ = cnst
+
+ case kindRestrict:
+ restrict := &Restrict{id, nil}
+ fixups = append(fixups, fixup{raw.Type(), &restrict.Type})
+ typ = restrict
+
+ case kindFunc:
+ fn := &Func{id, name, nil}
+ fixups = append(fixups, fixup{raw.Type(), &fn.Type})
+ typ = fn
+
+ case kindFuncProto:
+ fp := &FuncProto{id, nil}
+ fixups = append(fixups, fixup{raw.Type(), &fp.Return})
+ typ = fp
+
+ case kindVar:
+ v := &Var{id, name, nil}
+ fixups = append(fixups, fixup{raw.Type(), &v.Type})
+ typ = v
+
+ case kindDatasec:
+ typ = &Datasec{id, name, raw.SizeType}
+
+ default:
+ return nil, errors.Errorf("type id %d: unknown kind: %v", id, raw.Kind())
+ }
+
+ types = append(types, typ)
+
+ if namer, ok := typ.(namer); ok {
+ if name := namer.name(); name != "" {
+ namedTypes[name] = append(namedTypes[name], typ)
+ }
+ }
+ }
+
+ for _, fixup := range fixups {
+ i := int(fixup.id)
+ if i >= len(types) {
+ return nil, errors.Errorf("reference to invalid type id: %d", fixup.id)
+ }
+
+ *fixup.typ = types[i]
+ }
+
+ return namedTypes, nil
+}
diff --git a/vendor/github.com/cilium/ebpf/internal/errors.go b/vendor/github.com/cilium/ebpf/internal/errors.go
new file mode 100644
index 000000000..9590fe84e
--- /dev/null
+++ b/vendor/github.com/cilium/ebpf/internal/errors.go
@@ -0,0 +1,50 @@
+package internal
+
+import (
+ "bytes"
+ "fmt"
+ "strings"
+
+ "github.com/cilium/ebpf/internal/unix"
+ "github.com/pkg/errors"
+)
+
+// ErrorWithLog returns an error that includes logs from the
+// kernel verifier.
+//
+// logErr should be the error returned by the syscall that generated
+// the log. It is used to check for truncation of the output.
+func ErrorWithLog(err error, log []byte, logErr error) error {
+ logStr := strings.Trim(CString(log), "\t\r\n ")
+ if errors.Cause(logErr) == unix.ENOSPC {
+ logStr += " (truncated...)"
+ }
+
+ return &loadError{err, logStr}
+}
+
+type loadError struct {
+ cause error
+ log string
+}
+
+func (le *loadError) Error() string {
+ if le.log == "" {
+ return le.cause.Error()
+ }
+
+ return fmt.Sprintf("%s: %s", le.cause, le.log)
+}
+
+func (le *loadError) Cause() error {
+ return le.cause
+}
+
+// CString turns a NUL / zero terminated byte buffer into a string.
+func CString(in []byte) string {
+ inLen := bytes.IndexByte(in, 0)
+ if inLen == -1 {
+ return ""
+ }
+ return string(in[:inLen])
+}
diff --git a/vendor/github.com/cilium/ebpf/internal/fd.go b/vendor/github.com/cilium/ebpf/internal/fd.go
new file mode 100644
index 000000000..6800c84aa
--- /dev/null
+++ b/vendor/github.com/cilium/ebpf/internal/fd.go
@@ -0,0 +1,63 @@
+package internal
+
+import (
+ "runtime"
+ "strconv"
+
+ "github.com/cilium/ebpf/internal/unix"
+
+ "github.com/pkg/errors"
+)
+
+var ErrClosedFd = errors.New("use of closed file descriptor")
+
+type FD struct {
+ raw int64
+}
+
+func NewFD(value uint32) *FD {
+ fd := &FD{int64(value)}
+ runtime.SetFinalizer(fd, (*FD).Close)
+ return fd
+}
+
+func (fd *FD) String() string {
+ return strconv.FormatInt(fd.raw, 10)
+}
+
+func (fd *FD) Value() (uint32, error) {
+ if fd.raw < 0 {
+ return 0, ErrClosedFd
+ }
+
+ return uint32(fd.raw), nil
+}
+
+func (fd *FD) Close() error {
+ if fd.raw < 0 {
+ return nil
+ }
+
+ value := int(fd.raw)
+ fd.raw = -1
+
+ fd.Forget()
+ return unix.Close(value)
+}
+
+func (fd *FD) Forget() {
+ runtime.SetFinalizer(fd, nil)
+}
+
+func (fd *FD) Dup() (*FD, error) {
+ if fd.raw < 0 {
+ return nil, ErrClosedFd
+ }
+
+ dup, err := unix.FcntlInt(uintptr(fd.raw), unix.F_DUPFD_CLOEXEC, 0)
+ if err != nil {
+ return nil, errors.Wrap(err, "can't dup fd")
+ }
+
+ return NewFD(uint32(dup)), nil
+}
diff --git a/vendor/github.com/cilium/ebpf/internal/feature.go b/vendor/github.com/cilium/ebpf/internal/feature.go
new file mode 100644
index 000000000..f7497d37f
--- /dev/null
+++ b/vendor/github.com/cilium/ebpf/internal/feature.go
@@ -0,0 +1,85 @@
+package internal
+
+import (
+ "fmt"
+ "sync"
+
+ "github.com/pkg/errors"
+)
+
+// UnsupportedFeatureError is returned by FeatureTest() functions.
+type UnsupportedFeatureError struct {
+ // The minimum Linux mainline version required for this feature.
+ // Used for the error string, and for sanity checking during testing.
+ MinimumVersion Version
+
+ // The name of the feature that isn't supported.
+ Name string
+}
+
+func (ufe *UnsupportedFeatureError) Error() string {
+ return fmt.Sprintf("%s not supported (requires >= %s)", ufe.Name, ufe.MinimumVersion)
+}
+
+// FeatureTest wraps a function so that it is run at most once.
+//
+// name should identify the tested feature, while version must be in the
+// form Major.Minor[.Patch].
+//
+// Returns a descriptive UnsupportedFeatureError if the feature is not available.
+func FeatureTest(name, version string, fn func() bool) func() error {
+ v, err := NewVersion(version)
+ if err != nil {
+ return func() error { return err }
+ }
+
+ var (
+ once sync.Once
+ result error
+ )
+
+ return func() error {
+ once.Do(func() {
+ if !fn() {
+ result = &UnsupportedFeatureError{
+ MinimumVersion: v,
+ Name: name,
+ }
+ }
+ })
+ return result
+ }
+}
+
+// A Version in the form Major.Minor.Patch.
+type Version [3]uint16
+
+// NewVersion creates a version from a string like "Major.Minor.Patch".
+//
+// Patch is optional.
+func NewVersion(ver string) (Version, error) {
+ var major, minor, patch uint16
+ n, _ := fmt.Sscanf(ver, "%d.%d.%d", &major, &minor, &patch)
+ if n < 2 {
+ return Version{}, errors.Errorf("invalid version: %s", ver)
+ }
+ return Version{major, minor, patch}, nil
+}
+
+func (v Version) String() string {
+ if v[2] == 0 {
+ return fmt.Sprintf("v%d.%d", v[0], v[1])
+ }
+ return fmt.Sprintf("v%d.%d.%d", v[0], v[1], v[2])
+}
+
+// Less returns true if the version is less than another version.
+func (v Version) Less(other Version) bool {
+ for i, a := range v {
+ if a == other[i] {
+ continue
+ }
+ return a < other[i]
+ }
+ return false
+}
diff --git a/vendor/github.com/cilium/ebpf/internal/io.go b/vendor/github.com/cilium/ebpf/internal/io.go
new file mode 100644
index 000000000..756e86119
--- /dev/null
+++ b/vendor/github.com/cilium/ebpf/internal/io.go
@@ -0,0 +1,16 @@
+package internal
+
+import "github.com/pkg/errors"
+
+// DiscardZeroes makes sure that all written bytes are zero
+// before discarding them.
+type DiscardZeroes struct{}
+
+func (DiscardZeroes) Write(p []byte) (int, error) {
+ for _, b := range p {
+ if b != 0 {
+ return 0, errors.New("encountered non-zero byte")
+ }
+ }
+ return len(p), nil
+}
diff --git a/vendor/github.com/cilium/ebpf/internal/ptr.go b/vendor/github.com/cilium/ebpf/internal/ptr.go
new file mode 100644
index 000000000..e79b5aa00
--- /dev/null
+++ b/vendor/github.com/cilium/ebpf/internal/ptr.go
@@ -0,0 +1,26 @@
+package internal
+
+import "unsafe"
+
+// NewPointer creates a 64-bit pointer from an unsafe Pointer.
+func NewPointer(ptr unsafe.Pointer) Pointer {
+ return Pointer{ptr: ptr}
+}
+
+// NewSlicePointer creates a 64-bit pointer from a byte slice.
+func NewSlicePointer(buf []byte) Pointer {
+ if len(buf) == 0 {
+ return Pointer{}
+ }
+
+ return Pointer{ptr: unsafe.Pointer(&buf[0])}
+}
+
+// NewStringPointer creates a 64-bit pointer from a string.
+func NewStringPointer(str string) Pointer {
+ if str == "" {
+ return Pointer{}
+ }
+
+ return Pointer{ptr: unsafe.Pointer(&[]byte(str)[0])}
+}
diff --git a/vendor/github.com/cilium/ebpf/internal/ptr_32_be.go b/vendor/github.com/cilium/ebpf/internal/ptr_32_be.go
new file mode 100644
index 000000000..a56fbcc8e
--- /dev/null
+++ b/vendor/github.com/cilium/ebpf/internal/ptr_32_be.go
@@ -0,0 +1,14 @@
+// +build armbe mips mips64p32
+
+package internal
+
+import (
+ "unsafe"
+)
+
+// Pointer wraps an unsafe.Pointer to be 64bit to
+// conform to the syscall specification.
+type Pointer struct {
+ pad uint32
+ ptr unsafe.Pointer
+}
diff --git a/vendor/github.com/cilium/ebpf/internal/ptr_32_le.go b/vendor/github.com/cilium/ebpf/internal/ptr_32_le.go
new file mode 100644
index 000000000..be2ecfca7
--- /dev/null
+++ b/vendor/github.com/cilium/ebpf/internal/ptr_32_le.go
@@ -0,0 +1,14 @@
+// +build 386 amd64p32 arm mipsle mips64p32le
+
+package internal
+
+import (
+ "unsafe"
+)
+
+// Pointer wraps an unsafe.Pointer to be 64bit to
+// conform to the syscall specification.
+type Pointer struct {
+ ptr unsafe.Pointer
+ pad uint32
+}
diff --git a/vendor/github.com/cilium/ebpf/internal/ptr_64.go b/vendor/github.com/cilium/ebpf/internal/ptr_64.go
new file mode 100644
index 000000000..69452dceb
--- /dev/null
+++ b/vendor/github.com/cilium/ebpf/internal/ptr_64.go
@@ -0,0 +1,14 @@
+// +build !386,!amd64p32,!arm,!mipsle,!mips64p32le
+// +build !armbe,!mips,!mips64p32
+
+package internal
+
+import (
+ "unsafe"
+)
+
+// Pointer wraps an unsafe.Pointer to be 64bit to
+// conform to the syscall specification.
+type Pointer struct {
+ ptr unsafe.Pointer
+}
diff --git a/vendor/github.com/cilium/ebpf/internal/syscall.go b/vendor/github.com/cilium/ebpf/internal/syscall.go
new file mode 100644
index 000000000..b32cf3bce
--- /dev/null
+++ b/vendor/github.com/cilium/ebpf/internal/syscall.go
@@ -0,0 +1,23 @@
+package internal
+
+import (
+ "runtime"
+ "unsafe"
+
+ "github.com/cilium/ebpf/internal/unix"
+)
+
+// BPF wraps SYS_BPF.
+//
+// Any pointers contained in attr must use the Pointer type from this package.
+func BPF(cmd int, attr unsafe.Pointer, size uintptr) (uintptr, error) {
+ r1, _, errNo := unix.Syscall(unix.SYS_BPF, uintptr(cmd), uintptr(attr), size)
+ runtime.KeepAlive(attr)
+
+ var err error
+ if errNo != 0 {
+ err = errNo
+ }
+
+ return r1, err
+}
diff --git a/vendor/github.com/cilium/ebpf/internal/unix/types_linux.go b/vendor/github.com/cilium/ebpf/internal/unix/types_linux.go
index 003907b02..169309667 100644
--- a/vendor/github.com/cilium/ebpf/internal/unix/types_linux.go
+++ b/vendor/github.com/cilium/ebpf/internal/unix/types_linux.go
@@ -117,3 +117,11 @@ type PerfEventAttr = linux.PerfEventAttr
func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
return linux.PerfEventOpen(attr, pid, cpu, groupFd, flags)
}
+
+// Utsname is a wrapper
+type Utsname = linux.Utsname
+
+// Uname is a wrapper
+func Uname(buf *Utsname) (err error) {
+ return linux.Uname(buf)
+}
diff --git a/vendor/github.com/cilium/ebpf/internal/unix/types_other.go b/vendor/github.com/cilium/ebpf/internal/unix/types_other.go
index a327f2a59..57a514da7 100644
--- a/vendor/github.com/cilium/ebpf/internal/unix/types_other.go
+++ b/vendor/github.com/cilium/ebpf/internal/unix/types_other.go
@@ -181,3 +181,13 @@ type PerfEventAttr struct {
func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
return 0, errNonLinux
}
+
+// Utsname is a wrapper
+type Utsname struct {
+ Release [65]byte
+}
+
+// Uname is a wrapper
+func Uname(buf *Utsname) (err error) {
+ return errNonLinux
+}
diff --git a/vendor/github.com/cilium/ebpf/linker.go b/vendor/github.com/cilium/ebpf/linker.go
index da556c226..25f2ab947 100644
--- a/vendor/github.com/cilium/ebpf/linker.go
+++ b/vendor/github.com/cilium/ebpf/linker.go
@@ -2,23 +2,35 @@ package ebpf
import (
"github.com/cilium/ebpf/asm"
+ "github.com/cilium/ebpf/internal/btf"
+ "github.com/pkg/errors"
)
// link resolves bpf-to-bpf calls.
//
-// Each section may contain multiple functions / labels, and is only linked
+// Each library may contain multiple functions / labels, and is only linked
// if the program being edited references one of these functions.
//
-// Sections must not require linking themselves.
-func link(insns asm.Instructions, sections ...asm.Instructions) (asm.Instructions, error) {
- for _, section := range sections {
- var err error
- insns, err = linkSection(insns, section)
+// Libraries must not require linking themselves.
+func link(prog *ProgramSpec, libs []*ProgramSpec) error {
+ for _, lib := range libs {
+ insns, err := linkSection(prog.Instructions, lib.Instructions)
if err != nil {
- return nil, err
+ return errors.Wrapf(err, "linking %s", lib.Name)
+ }
+
+ if len(insns) == len(prog.Instructions) {
+ continue
+ }
+
+ prog.Instructions = insns
+ if prog.BTF != nil && lib.BTF != nil {
+ if err := btf.ProgramAppend(prog.BTF, lib.BTF); err != nil {
+ return errors.Wrapf(err, "linking BTF of %s", lib.Name)
+ }
}
}
- return insns, nil
+ return nil
}
func linkSection(insns, section asm.Instructions) (asm.Instructions, error) {
diff --git a/vendor/github.com/cilium/ebpf/map.go b/vendor/github.com/cilium/ebpf/map.go
index 1570291f0..86eff1aef 100644
--- a/vendor/github.com/cilium/ebpf/map.go
+++ b/vendor/github.com/cilium/ebpf/map.go
@@ -2,9 +2,9 @@ package ebpf
import (
"fmt"
- "unsafe"
"github.com/cilium/ebpf/internal"
+ "github.com/cilium/ebpf/internal/btf"
"github.com/cilium/ebpf/internal/unix"
"github.com/pkg/errors"
@@ -20,8 +20,12 @@ type MapSpec struct {
ValueSize uint32
MaxEntries uint32
Flags uint32
+
// InnerMap is used as a template for ArrayOfMaps and HashOfMaps
InnerMap *MapSpec
+
+ // The BTF associated with this map.
+ BTF *btf.Map
}
func (ms *MapSpec) String() string {
@@ -50,7 +54,7 @@ func (ms *MapSpec) Copy() *MapSpec {
// if you require custom encoding.
type Map struct {
name string
- fd *bpfFD
+ fd *internal.FD
abi MapABI
// Per CPU maps return values larger than the size in the spec
fullValueSize int
@@ -63,11 +67,11 @@ func NewMapFromFD(fd int) (*Map, error) {
if fd < 0 {
return nil, errors.New("invalid fd")
}
- bpfFd := newBPFFD(uint32(fd))
+ bpfFd := internal.NewFD(uint32(fd))
name, abi, err := newMapABIFromFd(bpfFd)
if err != nil {
- bpfFd.forget()
+ bpfFd.Forget()
return nil, err
}
return newMap(bpfFd, name, abi)
@@ -78,30 +82,47 @@ func NewMapFromFD(fd int) (*Map, error) {
// Creating a map for the first time will perform feature detection
// by creating small, temporary maps.
func NewMap(spec *MapSpec) (*Map, error) {
+ if spec.BTF == nil {
+ return newMapWithBTF(spec, nil)
+ }
+
+ handle, err := btf.NewHandle(btf.MapSpec(spec.BTF))
+ if err != nil && !btf.IsNotSupported(err) {
+ return nil, errors.Wrap(err, "can't load BTF")
+ }
+
+ return newMapWithBTF(spec, handle)
+}
+
+func newMapWithBTF(spec *MapSpec, handle *btf.Handle) (*Map, error) {
if spec.Type != ArrayOfMaps && spec.Type != HashOfMaps {
- return createMap(spec, nil)
+ return createMap(spec, nil, handle)
}
if spec.InnerMap == nil {
return nil, errors.Errorf("%s requires InnerMap", spec.Type)
}
- template, err := createMap(spec.InnerMap, nil)
+ template, err := createMap(spec.InnerMap, nil, handle)
if err != nil {
return nil, err
}
defer template.Close()
- return createMap(spec, template.fd)
+ return createMap(spec, template.fd, handle)
}
-func createMap(spec *MapSpec, inner *bpfFD) (*Map, error) {
+func createMap(spec *MapSpec, inner *internal.FD, handle *btf.Handle) (*Map, error) {
spec = spec.Copy()
switch spec.Type {
case ArrayOfMaps:
fallthrough
case HashOfMaps:
+ if err := haveNestedMaps(); err != nil {
+ return nil, err
+ }
+
if spec.ValueSize != 0 && spec.ValueSize != 4 {
return nil, errors.Errorf("ValueSize must be zero or four for map of map")
}
@@ -136,18 +157,24 @@ func createMap(spec *MapSpec, inner *bpfFD) (*Map, error) {
if inner != nil {
var err error
- attr.innerMapFd, err = inner.value()
+ attr.innerMapFd, err = inner.Value()
if err != nil {
return nil, errors.Wrap(err, "map create")
}
}
+ if handle != nil && spec.BTF != nil {
+ attr.btfFd = uint32(handle.FD())
+ attr.btfKeyTypeID = btf.MapKey(spec.BTF).ID()
+ attr.btfValueTypeID = btf.MapValue(spec.BTF).ID()
+ }
+
name, err := newBPFObjName(spec.Name)
if err != nil {
return nil, errors.Wrap(err, "map create")
}
- if haveObjName.Result() {
+ if haveObjName() == nil {
attr.mapName = name
}
@@ -159,7 +186,7 @@ func createMap(spec *MapSpec, inner *bpfFD) (*Map, error) {
return newMap(fd, spec.Name, newMapABIFromSpec(spec))
}
-func newMap(fd *bpfFD, name string, abi *MapABI) (*Map, error) {
+func newMap(fd *internal.FD, name string, abi *MapABI) (*Map, error) {
m := &Map{
name,
fd,
@@ -247,12 +274,28 @@ func (m *Map) Lookup(key, valueOut interface{}) error {
}
}
+// LookupAndDelete retrieves and deletes a value from a Map.
+func (m *Map) LookupAndDelete(key, valueOut interface{}) error {
+ valuePtr, valueBytes := makeBuffer(valueOut, m.fullValueSize)
+
+ keyPtr, err := marshalPtr(key, int(m.abi.KeySize))
+ if err != nil {
+ return errors.WithMessage(err, "can't marshal key")
+ }
+
+ if err := bpfMapLookupAndDelete(m.fd, keyPtr, valuePtr); err != nil {
+ return errors.WithMessage(err, "lookup and delete and delete failed")
+ }
+
+ return unmarshalBytes(valueOut, valueBytes)
+}
+
// LookupBytes gets a value from Map.
//
// Returns a nil value if a key doesn't exist.
func (m *Map) LookupBytes(key interface{}) ([]byte, error) {
valueBytes := make([]byte, m.fullValueSize)
- valuePtr := newPtr(unsafe.Pointer(&valueBytes[0]))
+ valuePtr := internal.NewSlicePointer(valueBytes)
err := m.lookup(key, valuePtr)
if IsNotExist(err) {
@@ -262,7 +305,7 @@ func (m *Map) LookupBytes(key interface{}) ([]byte, error) {
return valueBytes, err
}
-func (m *Map) lookup(key interface{}, valueOut syscallPtr) error {
+func (m *Map) lookup(key interface{}, valueOut internal.Pointer) error {
keyPtr, err := marshalPtr(key, int(m.abi.KeySize))
if err != nil {
return errors.WithMessage(err, "can't marshal key")
@@ -300,7 +343,7 @@ func (m *Map) Update(key, value interface{}, flags MapUpdateFlags) error {
return errors.WithMessage(err, "can't marshal key")
}
- var valuePtr syscallPtr
+ var valuePtr internal.Pointer
if m.abi.Type.hasPerCPUValue() {
valuePtr, err = marshalPerCPUValue(value, int(m.abi.ValueSize))
} else {
@@ -351,7 +394,7 @@ func (m *Map) NextKey(key, nextKeyOut interface{}) error {
// Use Iterate if you want to traverse all entries in the map.
func (m *Map) NextKeyBytes(key interface{}) ([]byte, error) {
nextKey := make([]byte, m.abi.KeySize)
- nextKeyPtr := newPtr(unsafe.Pointer(&nextKey[0]))
+ nextKeyPtr := internal.NewSlicePointer(nextKey)
err := m.nextKey(key, nextKeyPtr)
if IsNotExist(err) {
@@ -361,9 +404,9 @@ func (m *Map) NextKeyBytes(key interface{}) ([]byte, error) {
return nextKey, err
}
-func (m *Map) nextKey(key interface{}, nextKeyOut syscallPtr) error {
+func (m *Map) nextKey(key interface{}, nextKeyOut internal.Pointer) error {
var (
- keyPtr syscallPtr
+ keyPtr internal.Pointer
err error
)
@@ -396,14 +439,14 @@ func (m *Map) Close() error {
return nil
}
- return m.fd.close()
+ return m.fd.Close()
}
// FD gets the file descriptor of the Map.
//
// Calling this function is invalid after Close has been called.
func (m *Map) FD() int {
- fd, err := m.fd.value()
+ fd, err := m.fd.Value()
if err != nil {
// Best effort: -1 is the number most likely to be an
// invalid file descriptor.
@@ -424,7 +467,7 @@ func (m *Map) Clone() (*Map, error) {
return nil, nil
}
- dup, err := m.fd.dup()
+ dup, err := m.fd.Dup()
if err != nil {
return nil, errors.Wrap(err, "can't clone map")
}
@@ -450,7 +493,7 @@ func LoadPinnedMap(fileName string) (*Map, error) {
}
name, abi, err := newMapABIFromFd(fd)
if err != nil {
- _ = fd.close()
+ _ = fd.Close()
return nil, err
}
return newMap(fd, name, abi)
@@ -480,7 +523,7 @@ func unmarshalMap(buf []byte) (*Map, error) {
name, abi, err := newMapABIFromFd(fd)
if err != nil {
- _ = fd.close()
+ _ = fd.Close()
return nil, err
}
@@ -489,7 +532,7 @@ func unmarshalMap(buf []byte) (*Map, error) {
// MarshalBinary implements BinaryMarshaler.
func (m *Map) MarshalBinary() ([]byte, error) {
- fd, err := m.fd.value()
+ fd, err := m.fd.Value()
if err != nil {
return nil, err
}
diff --git a/vendor/github.com/cilium/ebpf/marshalers.go b/vendor/github.com/cilium/ebpf/marshalers.go
index 44ba27330..64b7d4de7 100644
--- a/vendor/github.com/cilium/ebpf/marshalers.go
+++ b/vendor/github.com/cilium/ebpf/marshalers.go
@@ -13,17 +13,24 @@ import (
"github.com/pkg/errors"
)
-func marshalPtr(data interface{}, length int) (syscallPtr, error) {
+func marshalPtr(data interface{}, length int) (internal.Pointer, error) {
+ if data == nil {
+ if length == 0 {
+ return internal.NewPointer(nil), nil
+ }
+ return internal.Pointer{}, errors.New("can't use nil as key of map")
+ }
+
if ptr, ok := data.(unsafe.Pointer); ok {
- return newPtr(ptr), nil
+ return internal.NewPointer(ptr), nil
}
buf, err := marshalBytes(data, length)
if err != nil {
- return syscallPtr{}, err
+ return internal.Pointer{}, err
}
- return newPtr(unsafe.Pointer(&buf[0])), nil
+ return internal.NewSlicePointer(buf), nil
}
func marshalBytes(data interface{}, length int) (buf []byte, err error) {
@@ -52,13 +59,13 @@ func marshalBytes(data interface{}, length int) (buf []byte, err error) {
return buf, nil
}
-func makeBuffer(dst interface{}, length int) (syscallPtr, []byte) {
+func makeBuffer(dst interface{}, length int) (internal.Pointer, []byte) {
if ptr, ok := dst.(unsafe.Pointer); ok {
- return newPtr(ptr), nil
+ return internal.NewPointer(ptr), nil
}
buf := make([]byte, length)
- return newPtr(unsafe.Pointer(&buf[0])), buf
+ return internal.NewSlicePointer(buf), buf
}
func unmarshalBytes(data interface{}, buf []byte) error {
@@ -99,21 +106,21 @@ func unmarshalBytes(data interface{}, buf []byte) error {
// Values are initialized to zero if the slice has less elements than CPUs.
//
// slice must have a type like []elementType.
-func marshalPerCPUValue(slice interface{}, elemLength int) (syscallPtr, error) {
+func marshalPerCPUValue(slice interface{}, elemLength int) (internal.Pointer, error) {
sliceType := reflect.TypeOf(slice)
if sliceType.Kind() != reflect.Slice {
- return syscallPtr{}, errors.New("per-CPU value requires slice")
+ return internal.Pointer{}, errors.New("per-CPU value requires slice")
}
possibleCPUs, err := internal.PossibleCPUs()
if err != nil {
- return syscallPtr{}, err
+ return internal.Pointer{}, err
}
sliceValue := reflect.ValueOf(slice)
sliceLen := sliceValue.Len()
if sliceLen > possibleCPUs {
- return syscallPtr{}, errors.Errorf("per-CPU value exceeds number of CPUs")
+ return internal.Pointer{}, errors.Errorf("per-CPU value exceeds number of CPUs")
}
alignedElemLength := align(elemLength, 8)
@@ -123,14 +130,14 @@ func marshalPerCPUValue(slice interface{}, elemLength int) (syscallPtr, error) {
elem := sliceValue.Index(i).Interface()
elemBytes, err := marshalBytes(elem, elemLength)
if err != nil {
- return syscallPtr{}, err
+ return internal.Pointer{}, err
}
offset := i * alignedElemLength
copy(buf[offset:offset+elemLength], elemBytes)
}
- return newPtr(unsafe.Pointer(&buf[0])), nil
+ return internal.NewSlicePointer(buf), nil
}
// unmarshalPerCPUValue decodes a buffer into a slice containing one value per
diff --git a/vendor/github.com/cilium/ebpf/prog.go b/vendor/github.com/cilium/ebpf/prog.go
index 91b5b1b15..08ef4fa46 100644
--- a/vendor/github.com/cilium/ebpf/prog.go
+++ b/vendor/github.com/cilium/ebpf/prog.go
@@ -10,15 +10,12 @@ import (
"github.com/cilium/ebpf/asm"
"github.com/cilium/ebpf/internal"
+ "github.com/cilium/ebpf/internal/btf"
"github.com/cilium/ebpf/internal/unix"
"github.com/pkg/errors"
)
-var (
- errNotSupported = errors.New("ebpf: not supported by kernel")
-)
-
const (
// Number of bytes to pad the output buffer for BPF_PROG_TEST_RUN.
// This is currently the maximum of spare space allocated for SKB
@@ -50,6 +47,11 @@ type ProgramSpec struct {
Instructions asm.Instructions
License string
KernelVersion uint32
+
+ // The BTF associated with this program. Changing Instructions
+ // will most likely invalidate the contained data, and may
+ // result in errors when attempting to load it into the kernel.
+ BTF *btf.Program
}
// Copy returns a copy of the spec.
@@ -72,7 +74,7 @@ type Program struct {
// otherwise it is empty.
VerifierLog string
- fd *bpfFD
+ fd *internal.FD
name string
abi ProgramABI
}
@@ -90,7 +92,20 @@ func NewProgram(spec *ProgramSpec) (*Program, error) {
// Loading a program for the first time will perform
// feature detection by loading small, temporary programs.
func NewProgramWithOptions(spec *ProgramSpec, opts ProgramOptions) (*Program, error) {
- attr, err := convertProgramSpec(spec, haveObjName.Result())
+ if spec.BTF == nil {
+ return newProgramWithBTF(spec, nil, opts)
+ }
+
+ handle, err := btf.NewHandle(btf.ProgramSpec(spec.BTF))
+ if err != nil && !btf.IsNotSupported(err) {
+ return nil, errors.Wrap(err, "can't load BTF")
+ }
+
+ return newProgramWithBTF(spec, handle, opts)
+}
+
+func newProgramWithBTF(spec *ProgramSpec, btf *btf.Handle, opts ProgramOptions) (*Program, error) {
+ attr, err := convertProgramSpec(spec, btf)
if err != nil {
return nil, err
}
@@ -105,55 +120,51 @@ func NewProgramWithOptions(spec *ProgramSpec, opts ProgramOptions) (*Program, er
logBuf = make([]byte, logSize)
attr.logLevel = opts.LogLevel
attr.logSize = uint32(len(logBuf))
- attr.logBuf = newPtr(unsafe.Pointer(&logBuf[0]))
+ attr.logBuf = internal.NewSlicePointer(logBuf)
}
fd, err := bpfProgLoad(attr)
if err == nil {
prog := newProgram(fd, spec.Name, &ProgramABI{spec.Type})
- prog.VerifierLog = convertCString(logBuf)
+ prog.VerifierLog = internal.CString(logBuf)
return prog, nil
}
- truncated := errors.Cause(err) == unix.ENOSPC
if opts.LogLevel == 0 {
// Re-run with the verifier enabled to get better error messages.
logBuf = make([]byte, logSize)
attr.logLevel = 1
attr.logSize = uint32(len(logBuf))
- attr.logBuf = newPtr(unsafe.Pointer(&logBuf[0]))
-
- _, nerr := bpfProgLoad(attr)
- truncated = errors.Cause(nerr) == unix.ENOSPC
- }
+ attr.logBuf = internal.NewSlicePointer(logBuf)
- logs := convertCString(logBuf)
- if truncated {
- logs += "\n(truncated...)"
+ _, logErr := bpfProgLoad(attr)
+ err = internal.ErrorWithLog(err, logBuf, logErr)
}
- return nil, &loadError{err, logs}
+ return nil, errors.Wrap(err, "can't load program")
}
// NewProgramFromFD creates a program from a raw fd.
//
// You should not use fd after calling this function.
+//
+// Requires at least Linux 4.11.
func NewProgramFromFD(fd int) (*Program, error) {
if fd < 0 {
return nil, errors.New("invalid fd")
}
- bpfFd := newBPFFD(uint32(fd))
+ bpfFd := internal.NewFD(uint32(fd))
name, abi, err := newProgramABIFromFd(bpfFd)
if err != nil {
- bpfFd.forget()
+ bpfFd.Forget()
return nil, err
}
return newProgram(bpfFd, name, abi), nil
}
-func newProgram(fd *bpfFD, name string, abi *ProgramABI) *Program {
+func newProgram(fd *internal.FD, name string, abi *ProgramABI) *Program {
return &Program{
name: name,
fd: fd,
@@ -161,7 +172,7 @@ func newProgram(fd *bpfFD, name string, abi *ProgramABI) *Program {
}
}
-func convertProgramSpec(spec *ProgramSpec, includeName bool) (*bpfProgLoadAttr, error) {
+func convertProgramSpec(spec *ProgramSpec, handle *btf.Handle) (*bpfProgLoadAttr, error) {
if len(spec.Instructions) == 0 {
return nil, errors.New("Instructions cannot be empty")
}
@@ -178,13 +189,12 @@ func convertProgramSpec(spec *ProgramSpec, includeName bool) (*bpfProgLoadAttr,
bytecode := buf.Bytes()
insCount := uint32(len(bytecode) / asm.InstructionSize)
- lic := []byte(spec.License)
attr := &bpfProgLoadAttr{
progType: spec.Type,
expectedAttachType: spec.AttachType,
insCount: insCount,
- instructions: newPtr(unsafe.Pointer(&bytecode[0])),
- license: newPtr(unsafe.Pointer(&lic[0])),
+ instructions: internal.NewSlicePointer(bytecode),
+ license: internal.NewStringPointer(spec.License),
}
name, err := newBPFObjName(spec.Name)
@@ -192,10 +202,30 @@ func convertProgramSpec(spec *ProgramSpec, includeName bool) (*bpfProgLoadAttr,
return nil, err
}
- if includeName {
+ if haveObjName() == nil {
attr.progName = name
}
+ if handle != nil && spec.BTF != nil {
+ attr.progBTFFd = uint32(handle.FD())
+
+ recSize, bytes, err := btf.ProgramLineInfos(spec.BTF)
+ if err != nil {
+ return nil, errors.Wrap(err, "can't get BTF line infos")
+ }
+ attr.lineInfoRecSize = recSize
+ attr.lineInfoCnt = uint32(uint64(len(bytes)) / uint64(recSize))
+ attr.lineInfo = internal.NewSlicePointer(bytes)
+
+ recSize, bytes, err = btf.ProgramFuncInfos(spec.BTF)
+ if err != nil {
+ return nil, errors.Wrap(err, "can't get BTF function infos")
+ }
+ attr.funcInfoRecSize = recSize
+ attr.funcInfoCnt = uint32(uint64(len(bytes)) / uint64(recSize))
+ attr.funcInfo = internal.NewSlicePointer(bytes)
+ }
+
return attr, nil
}
@@ -215,7 +245,7 @@ func (p *Program) ABI() ProgramABI {
//
// It is invalid to call this function after Close has been called.
func (p *Program) FD() int {
- fd, err := p.fd.value()
+ fd, err := p.fd.Value()
if err != nil {
// Best effort: -1 is the number most likely to be an
// invalid file descriptor.
@@ -235,7 +265,7 @@ func (p *Program) Clone() (*Program, error) {
return nil, nil
}
- dup, err := p.fd.dup()
+ dup, err := p.fd.Dup()
if err != nil {
return nil, errors.Wrap(err, "can't clone program")
}
@@ -256,7 +286,7 @@ func (p *Program) Close() error {
return nil
}
- return p.fd.close()
+ return p.fd.Close()
}
// Test runs the Program in the kernel with the given input and returns the
@@ -268,7 +298,7 @@ func (p *Program) Close() error {
// This function requires at least Linux 4.12.
func (p *Program) Test(in []byte) (uint32, []byte, error) {
ret, out, _, err := p.testRun(in, 1)
- return ret, out, err
+ return ret, out, errors.Wrap(err, "can't test program")
}
// Benchmark runs the Program with the given input for a number of times
@@ -280,42 +310,43 @@ func (p *Program) Test(in []byte) (uint32, []byte, error) {
// This function requires at least Linux 4.12.
func (p *Program) Benchmark(in []byte, repeat int) (uint32, time.Duration, error) {
ret, _, total, err := p.testRun(in, repeat)
- return ret, total, err
+ return ret, total, errors.Wrap(err, "can't benchmark program")
}
-var noProgTestRun = featureTest{
- Fn: func() bool {
- prog, err := NewProgram(&ProgramSpec{
- Type: SocketFilter,
- Instructions: asm.Instructions{
- asm.LoadImm(asm.R0, 0, asm.DWord),
- asm.Return(),
- },
- License: "MIT",
- })
- if err != nil {
- // This may be because we lack sufficient permissions, etc.
- return false
- }
- defer prog.Close()
+var haveProgTestRun = internal.FeatureTest("BPF_PROG_TEST_RUN", "4.12", func() bool {
+ prog, err := NewProgram(&ProgramSpec{
+ Type: SocketFilter,
+ Instructions: asm.Instructions{
+ asm.LoadImm(asm.R0, 0, asm.DWord),
+ asm.Return(),
+ },
+ License: "MIT",
+ })
+ if err != nil {
+ // This may be because we lack sufficient permissions, etc.
+ return false
+ }
+ defer prog.Close()
- fd, err := prog.fd.value()
- if err != nil {
- return false
- }
+ fd, err := prog.fd.Value()
+ if err != nil {
+ return false
+ }
- // Programs require at least 14 bytes input
- in := make([]byte, 14)
- attr := bpfProgTestRunAttr{
- fd: fd,
- dataSizeIn: uint32(len(in)),
- dataIn: newPtr(unsafe.Pointer(&in[0])),
- }
+ // Programs require at least 14 bytes input
+ in := make([]byte, 14)
+ attr := bpfProgTestRunAttr{
+ fd: fd,
+ dataSizeIn: uint32(len(in)),
+ dataIn: internal.NewSlicePointer(in),
+ }
- _, err = bpfCall(_ProgTestRun, unsafe.Pointer(&attr), unsafe.Sizeof(attr))
- return errors.Cause(err) == unix.EINVAL
- },
-}
+ _, err = internal.BPF(_ProgTestRun, unsafe.Pointer(&attr), unsafe.Sizeof(attr))
+
+ // Check for EINVAL specifically, rather than err != nil since we
+ // otherwise misdetect due to insufficient permissions.
+ return errors.Cause(err) != unix.EINVAL
+})
func (p *Program) testRun(in []byte, repeat int) (uint32, []byte, time.Duration, error) {
if uint(repeat) > math.MaxUint32 {
@@ -330,8 +361,8 @@ func (p *Program) testRun(in []byte, repeat int) (uint32, []byte, time.Duration,
return 0, nil, 0, fmt.Errorf("input is too long")
}
- if noProgTestRun.Result() {
- return 0, nil, 0, errNotSupported
+ if err := haveProgTestRun(); err != nil {
+ return 0, nil, 0, err
}
// Older kernels ignore the dataSizeOut argument when copying to user space.
@@ -341,7 +372,7 @@ func (p *Program) testRun(in []byte, repeat int) (uint32, []byte, time.Duration,
// See https://patchwork.ozlabs.org/cover/1006822/
out := make([]byte, len(in)+outputPad)
- fd, err := p.fd.value()
+ fd, err := p.fd.Value()
if err != nil {
return 0, nil, 0, err
}
@@ -350,12 +381,12 @@ func (p *Program) testRun(in []byte, repeat int) (uint32, []byte, time.Duration,
fd: fd,
dataSizeIn: uint32(len(in)),
dataSizeOut: uint32(len(out)),
- dataIn: newPtr(unsafe.Pointer(&in[0])),
- dataOut: newPtr(unsafe.Pointer(&out[0])),
+ dataIn: internal.NewSlicePointer(in),
+ dataOut: internal.NewSlicePointer(out),
repeat: uint32(repeat),
}
- _, err = bpfCall(_ProgTestRun, unsafe.Pointer(&attr), unsafe.Sizeof(attr))
+ _, err = internal.BPF(_ProgTestRun, unsafe.Pointer(&attr), unsafe.Sizeof(attr))
if err != nil {
return 0, nil, 0, errors.Wrap(err, "can't run test")
}
@@ -386,7 +417,7 @@ func unmarshalProgram(buf []byte) (*Program, error) {
name, abi, err := newProgramABIFromFd(fd)
if err != nil {
- _ = fd.close()
+ _ = fd.Close()
return nil, err
}
@@ -395,7 +426,7 @@ func unmarshalProgram(buf []byte) (*Program, error) {
// MarshalBinary implements BinaryMarshaler.
func (p *Program) MarshalBinary() ([]byte, error) {
- value, err := p.fd.value()
+ value, err := p.fd.Value()
if err != nil {
return nil, err
}
@@ -411,7 +442,7 @@ func (p *Program) Attach(fd int, typ AttachType, flags AttachFlags) error {
return errors.New("invalid fd")
}
- pfd, err := p.fd.value()
+ pfd, err := p.fd.Value()
if err != nil {
return err
}
@@ -432,7 +463,7 @@ func (p *Program) Detach(fd int, typ AttachType, flags AttachFlags) error {
return errors.New("invalid fd")
}
- pfd, err := p.fd.value()
+ pfd, err := p.fd.Value()
if err != nil {
return err
}
@@ -448,6 +479,8 @@ func (p *Program) Detach(fd int, typ AttachType, flags AttachFlags) error {
}
// LoadPinnedProgram loads a Program from a BPF file.
+//
+// Requires at least Linux 4.11.
func LoadPinnedProgram(fileName string) (*Program, error) {
fd, err := bpfGetObject(fileName)
if err != nil {
@@ -456,8 +489,8 @@ func LoadPinnedProgram(fileName string) (*Program, error) {
name, abi, err := newProgramABIFromFd(fd)
if err != nil {
- _ = fd.close()
- return nil, err
+ _ = fd.Close()
+ return nil, errors.Wrapf(err, "can't get ABI for %s", fileName)
}
return newProgram(fd, name, abi), nil
@@ -479,24 +512,9 @@ func SanitizeName(name string, replacement rune) string {
}, name)
}
-type loadError struct {
- cause error
- verifierLog string
-}
-
-func (le *loadError) Error() string {
- if le.verifierLog == "" {
- return fmt.Sprintf("failed to load program: %s", le.cause)
- }
- return fmt.Sprintf("failed to load program: %s: %s", le.cause, le.verifierLog)
-}
-
-func (le *loadError) Cause() error {
- return le.cause
-}
-
// IsNotSupported returns true if an error occurred because
// the kernel does not have support for a specific feature.
func IsNotSupported(err error) bool {
- return errors.Cause(err) == errNotSupported
+ _, notSupported := errors.Cause(err).(*internal.UnsupportedFeatureError)
+ return notSupported
}
diff --git a/vendor/github.com/cilium/ebpf/ptr_32_be.go b/vendor/github.com/cilium/ebpf/ptr_32_be.go
deleted file mode 100644
index 775774436..000000000
--- a/vendor/github.com/cilium/ebpf/ptr_32_be.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// +build armbe mips mips64p32
-
-package ebpf
-
-import (
- "unsafe"
-)
-
-// ptr wraps an unsafe.Pointer to be 64bit to
-// conform to the syscall specification.
-type syscallPtr struct {
- pad uint32
- ptr unsafe.Pointer
-}
diff --git a/vendor/github.com/cilium/ebpf/ptr_32_le.go b/vendor/github.com/cilium/ebpf/ptr_32_le.go
deleted file mode 100644
index 14b805e92..000000000
--- a/vendor/github.com/cilium/ebpf/ptr_32_le.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// +build 386 amd64p32 arm mipsle mips64p32le
-
-package ebpf
-
-import (
- "unsafe"
-)
-
-// ptr wraps an unsafe.Pointer to be 64bit to
-// conform to the syscall specification.
-type syscallPtr struct {
- ptr unsafe.Pointer
- pad uint32
-}
diff --git a/vendor/github.com/cilium/ebpf/ptr_64.go b/vendor/github.com/cilium/ebpf/ptr_64.go
deleted file mode 100644
index c897d7273..000000000
--- a/vendor/github.com/cilium/ebpf/ptr_64.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// +build !386,!amd64p32,!arm,!mipsle,!mips64p32le
-// +build !armbe,!mips,!mips64p32
-
-package ebpf
-
-import (
- "unsafe"
-)
-
-// ptr wraps an unsafe.Pointer to be 64bit to
-// conform to the syscall specification.
-type syscallPtr struct {
- ptr unsafe.Pointer
-}
diff --git a/vendor/github.com/cilium/ebpf/run-tests.sh b/vendor/github.com/cilium/ebpf/run-tests.sh
index 9859e26dc..30f974407 100644
--- a/vendor/github.com/cilium/ebpf/run-tests.sh
+++ b/vendor/github.com/cilium/ebpf/run-tests.sh
@@ -12,10 +12,13 @@ if [[ "${1:-}" = "--in-vm" ]]; then
mount -t bpf bpf /sys/fs/bpf
export CGO_ENABLED=0
+ export GOFLAGS=-mod=readonly
+ export GOPROXY=file:///run/go-proxy
+ export GOCACHE=/run/go-cache
export HOME="$home"
echo Running tests...
- /usr/local/bin/go test -mod=vendor -coverprofile="$1/coverage.txt" -covermode=atomic -v ./...
+ /usr/local/bin/go test -coverprofile="$1/coverage.txt" -covermode=atomic -v ./...
touch "$1/success"
exit 0
fi
@@ -25,7 +28,7 @@ export GO111MODULE=on
# Pull all dependencies, so that we can run tests without the
# vm having network access.
-go mod vendor
+go mod download
# Use sudo if /dev/kvm isn't accessible by the current user.
sudo=""
@@ -50,7 +53,11 @@ test -e "${tmp_dir}/${kernel}" || {
}
echo Testing on ${kernel_version}
-$sudo virtme-run --kimg "${tmp_dir}/${kernel}" --memory 256M --pwd --rwdir=/run/output="${output}" --script-sh "$(realpath "$0") --in-vm /run/output" --qemu-opts -smp 2
+$sudo virtme-run --kimg "${tmp_dir}/${kernel}" --memory 256M --pwd \
+ --rwdir=/run/output="${output}" \
+ --rodir=/run/go-proxy="$(go env GOPATH)/pkg/mod/cache/download" \
+ --rwdir=/run/go-cache="$(go env GOCACHE)" \
+ --script-sh "$(realpath "$0") --in-vm /run/output" --qemu-opts -smp 2
if [[ ! -e "${output}/success" ]]; then
echo "Test failed on ${kernel_version}"
diff --git a/vendor/github.com/cilium/ebpf/syscalls.go b/vendor/github.com/cilium/ebpf/syscalls.go
index 68abd3bc6..70f8c127a 100644
--- a/vendor/github.com/cilium/ebpf/syscalls.go
+++ b/vendor/github.com/cilium/ebpf/syscalls.go
@@ -1,71 +1,17 @@
package ebpf
import (
- "bytes"
"path/filepath"
- "runtime"
- "strconv"
"strings"
"unsafe"
+ "github.com/cilium/ebpf/internal"
+ "github.com/cilium/ebpf/internal/btf"
"github.com/cilium/ebpf/internal/unix"
"github.com/pkg/errors"
)
-var errClosedFd = errors.New("use of closed file descriptor")
-
-type bpfFD struct {
- raw int64
-}
-
-func newBPFFD(value uint32) *bpfFD {
- fd := &bpfFD{int64(value)}
- runtime.SetFinalizer(fd, (*bpfFD).close)
- return fd
-}
-
-func (fd *bpfFD) String() string {
- return strconv.FormatInt(fd.raw, 10)
-}
-
-func (fd *bpfFD) value() (uint32, error) {
- if fd.raw < 0 {
- return 0, errClosedFd
- }
-
- return uint32(fd.raw), nil
-}
-
-func (fd *bpfFD) close() error {
- if fd.raw < 0 {
- return nil
- }
-
- value := int(fd.raw)
- fd.raw = -1
-
- fd.forget()
- return unix.Close(value)
-}
-
-func (fd *bpfFD) forget() {
- runtime.SetFinalizer(fd, nil)
-}
-
-func (fd *bpfFD) dup() (*bpfFD, error) {
- if fd.raw < 0 {
- return nil, errClosedFd
- }
-
- dup, err := unix.FcntlInt(uintptr(fd.raw), unix.F_DUPFD_CLOEXEC, 0)
- if err != nil {
- return nil, errors.Wrap(err, "can't dup fd")
- }
-
- return newBPFFD(uint32(dup)), nil
-}
-
// bpfObjName is a null-terminated string made up of
// 'A-Za-z0-9_' characters.
type bpfObjName [unix.BPF_OBJ_NAME_LEN]byte
@@ -98,21 +44,25 @@ func invalidBPFObjNameChar(char rune) bool {
}
type bpfMapCreateAttr struct {
- mapType MapType
- keySize uint32
- valueSize uint32
- maxEntries uint32
- flags uint32
- innerMapFd uint32 // since 4.12 56f668dfe00d
- numaNode uint32 // since 4.14 96eabe7a40aa
- mapName bpfObjName // since 4.15 ad5b177bd73f
+ mapType MapType
+ keySize uint32
+ valueSize uint32
+ maxEntries uint32
+ flags uint32
+ innerMapFd uint32 // since 4.12 56f668dfe00d
+ numaNode uint32 // since 4.14 96eabe7a40aa
+ mapName bpfObjName // since 4.15 ad5b177bd73f
+ mapIfIndex uint32
+ btfFd uint32
+ btfKeyTypeID btf.TypeID
+ btfValueTypeID btf.TypeID
}
type bpfMapOpAttr struct {
mapFd uint32
padding uint32
- key syscallPtr
- value syscallPtr
+ key internal.Pointer
+ value internal.Pointer
flags uint64
}
@@ -127,7 +77,7 @@ type bpfMapInfo struct {
}
type bpfPinObjAttr struct {
- fileName syscallPtr
+ fileName internal.Pointer
fd uint32
padding uint32
}
@@ -135,16 +85,23 @@ type bpfPinObjAttr struct {
type bpfProgLoadAttr struct {
progType ProgramType
insCount uint32
- instructions syscallPtr
- license syscallPtr
+ instructions internal.Pointer
+ license internal.Pointer
logLevel uint32
logSize uint32
- logBuf syscallPtr
+ logBuf internal.Pointer
kernelVersion uint32 // since 4.1 2541517c32be
progFlags uint32 // since 4.11 e07b98d9bffe
progName bpfObjName // since 4.15 067cae47771c
progIfIndex uint32 // since 4.15 1f6f4cb7ba21
expectedAttachType AttachType // since 4.17 5e43f899b03a
+ progBTFFd uint32
+ funcInfoRecSize uint32
+ funcInfo internal.Pointer
+ funcInfoCnt uint32
+ lineInfoRecSize uint32
+ lineInfo internal.Pointer
+ lineInfoCnt uint32
}
type bpfProgInfo struct {
@@ -153,12 +110,12 @@ type bpfProgInfo struct {
tag [unix.BPF_TAG_SIZE]byte
jitedLen uint32
xlatedLen uint32
- jited syscallPtr
- xlated syscallPtr
+ jited internal.Pointer
+ xlated internal.Pointer
loadTime uint64 // since 4.15 cb4d2b3f03d8
createdByUID uint32
nrMapIDs uint32
- mapIds syscallPtr
+ mapIds internal.Pointer
name bpfObjName
}
@@ -167,8 +124,8 @@ type bpfProgTestRunAttr struct {
retval uint32
dataSizeIn uint32
dataSizeOut uint32
- dataIn syscallPtr
- dataOut syscallPtr
+ dataIn internal.Pointer
+ dataOut internal.Pointer
repeat uint32
duration uint32
}
@@ -183,7 +140,7 @@ type bpfProgAlterAttr struct {
type bpfObjGetInfoByFDAttr struct {
fd uint32
infoLen uint32
- info syscallPtr // May be either bpfMapInfo or bpfProgInfo
+ info internal.Pointer // May be either bpfMapInfo or bpfProgInfo
}
type bpfGetFDByIDAttr struct {
@@ -191,13 +148,9 @@ type bpfGetFDByIDAttr struct {
next uint32
}
-func newPtr(ptr unsafe.Pointer) syscallPtr {
- return syscallPtr{ptr: ptr}
-}
-
-func bpfProgLoad(attr *bpfProgLoadAttr) (*bpfFD, error) {
+func bpfProgLoad(attr *bpfProgLoadAttr) (*internal.FD, error) {
for {
- fd, err := bpfCall(_ProgLoad, unsafe.Pointer(attr), unsafe.Sizeof(*attr))
+ fd, err := internal.BPF(_ProgLoad, unsafe.Pointer(attr), unsafe.Sizeof(*attr))
// As of ~4.20 the verifier can be interrupted by a signal,
// and returns EAGAIN in that case.
if err == unix.EAGAIN {
@@ -208,26 +161,69 @@ func bpfProgLoad(attr *bpfProgLoadAttr) (*bpfFD, error) {
return nil, err
}
- return newBPFFD(uint32(fd)), nil
+ return internal.NewFD(uint32(fd)), nil
}
}
func bpfProgAlter(cmd int, attr *bpfProgAlterAttr) error {
- _, err := bpfCall(cmd, unsafe.Pointer(attr), unsafe.Sizeof(*attr))
+ _, err := internal.BPF(cmd, unsafe.Pointer(attr), unsafe.Sizeof(*attr))
return err
}
-func bpfMapCreate(attr *bpfMapCreateAttr) (*bpfFD, error) {
- fd, err := bpfCall(_MapCreate, unsafe.Pointer(attr), unsafe.Sizeof(*attr))
+func bpfMapCreate(attr *bpfMapCreateAttr) (*internal.FD, error) {
+ fd, err := internal.BPF(_MapCreate, unsafe.Pointer(attr), unsafe.Sizeof(*attr))
if err != nil {
return nil, err
}
- return newBPFFD(uint32(fd)), nil
+ return internal.NewFD(uint32(fd)), nil
+}
+
+var haveNestedMaps = internal.FeatureTest("nested maps", "4.12", func() bool {
+ inner, err := bpfMapCreate(&bpfMapCreateAttr{
+ mapType: Array,
+ keySize: 4,
+ valueSize: 4,
+ maxEntries: 1,
+ })
+ if err != nil {
+ return false
+ }
+ defer inner.Close()
+
+ innerFd, _ := inner.Value()
+ nested, err := bpfMapCreate(&bpfMapCreateAttr{
+ mapType: ArrayOfMaps,
+ keySize: 4,
+ valueSize: 4,
+ maxEntries: 1,
+ innerMapFd: innerFd,
+ })
+ if err != nil {
+ return false
+ }
+
+ _ = nested.Close()
+ return true
+})
+
+func bpfMapLookupElem(m *internal.FD, key, valueOut internal.Pointer) error {
+ fd, err := m.Value()
+ if err != nil {
+ return err
+ }
+
+ attr := bpfMapOpAttr{
+ mapFd: fd,
+ key: key,
+ value: valueOut,
+ }
+ _, err = internal.BPF(_MapLookupElem, unsafe.Pointer(&attr), unsafe.Sizeof(attr))
+ return err
}
-func bpfMapLookupElem(m *bpfFD, key, valueOut syscallPtr) error {
- fd, err := m.value()
+func bpfMapLookupAndDelete(m *internal.FD, key, valueOut internal.Pointer) error {
+ fd, err := m.Value()
if err != nil {
return err
}
@@ -237,12 +233,12 @@ func bpfMapLookupElem(m *bpfFD, key, valueOut syscallPtr) error {
key: key,
value: valueOut,
}
- _, err = bpfCall(_MapLookupElem, unsafe.Pointer(&attr), unsafe.Sizeof(attr))
+ _, err = internal.BPF(_MapLookupAndDeleteElem, unsafe.Pointer(&attr), unsafe.Sizeof(attr))
return err
}
-func bpfMapUpdateElem(m *bpfFD, key, valueOut syscallPtr, flags uint64) error {
- fd, err := m.value()
+func bpfMapUpdateElem(m *internal.FD, key, valueOut internal.Pointer, flags uint64) error {
+ fd, err := m.Value()
if err != nil {
return err
}
@@ -253,12 +249,12 @@ func bpfMapUpdateElem(m *bpfFD, key, valueOut syscallPtr, flags uint64) error {
value: valueOut,
flags: flags,
}
- _, err = bpfCall(_MapUpdateElem, unsafe.Pointer(&attr), unsafe.Sizeof(attr))
+ _, err = internal.BPF(_MapUpdateElem, unsafe.Pointer(&attr), unsafe.Sizeof(attr))
return err
}
-func bpfMapDeleteElem(m *bpfFD, key syscallPtr) error {
- fd, err := m.value()
+func bpfMapDeleteElem(m *internal.FD, key internal.Pointer) error {
+ fd, err := m.Value()
if err != nil {
return err
}
@@ -267,12 +263,12 @@ func bpfMapDeleteElem(m *bpfFD, key syscallPtr) error {
mapFd: fd,
key: key,
}
- _, err = bpfCall(_MapDeleteElem, unsafe.Pointer(&attr), unsafe.Sizeof(attr))
+ _, err = internal.BPF(_MapDeleteElem, unsafe.Pointer(&attr), unsafe.Sizeof(attr))
return err
}
-func bpfMapGetNextKey(m *bpfFD, key, nextKeyOut syscallPtr) error {
- fd, err := m.value()
+func bpfMapGetNextKey(m *internal.FD, key, nextKeyOut internal.Pointer) error {
+ fd, err := m.Value()
if err != nil {
return err
}
@@ -282,13 +278,13 @@ func bpfMapGetNextKey(m *bpfFD, key, nextKeyOut syscallPtr) error {
key: key,
value: nextKeyOut,
}
- _, err = bpfCall(_MapGetNextKey, unsafe.Pointer(&attr), unsafe.Sizeof(attr))
+ _, err = internal.BPF(_MapGetNextKey, unsafe.Pointer(&attr), unsafe.Sizeof(attr))
return err
}
const bpfFSType = 0xcafe4a11
-func bpfPinObject(fileName string, fd *bpfFD) error {
+func bpfPinObject(fileName string, fd *internal.FD) error {
dirName := filepath.Dir(fileName)
var statfs unix.Statfs_t
if err := unix.Statfs(dirName, &statfs); err != nil {
@@ -298,30 +294,30 @@ func bpfPinObject(fileName string, fd *bpfFD) error {
return errors.Errorf("%s is not on a bpf filesystem", fileName)
}
- value, err := fd.value()
+ value, err := fd.Value()
if err != nil {
return err
}
- _, err = bpfCall(_ObjPin, unsafe.Pointer(&bpfPinObjAttr{
- fileName: newPtr(unsafe.Pointer(&[]byte(fileName)[0])),
+ _, err = internal.BPF(_ObjPin, unsafe.Pointer(&bpfPinObjAttr{
+ fileName: internal.NewStringPointer(fileName),
fd: value,
}), 16)
return errors.Wrapf(err, "pin object %s", fileName)
}
-func bpfGetObject(fileName string) (*bpfFD, error) {
- ptr, err := bpfCall(_ObjGet, unsafe.Pointer(&bpfPinObjAttr{
- fileName: newPtr(unsafe.Pointer(&[]byte(fileName)[0])),
+func bpfGetObject(fileName string) (*internal.FD, error) {
+ ptr, err := internal.BPF(_ObjGet, unsafe.Pointer(&bpfPinObjAttr{
+ fileName: internal.NewStringPointer(fileName),
}), 16)
if err != nil {
return nil, errors.Wrapf(err, "get object %s", fileName)
}
- return newBPFFD(uint32(ptr)), nil
+ return internal.NewFD(uint32(ptr)), nil
}
-func bpfGetObjectInfoByFD(fd *bpfFD, info unsafe.Pointer, size uintptr) error {
- value, err := fd.value()
+func bpfGetObjectInfoByFD(fd *internal.FD, info unsafe.Pointer, size uintptr) error {
+ value, err := fd.Value()
if err != nil {
return err
}
@@ -330,91 +326,69 @@ func bpfGetObjectInfoByFD(fd *bpfFD, info unsafe.Pointer, size uintptr) error {
attr := bpfObjGetInfoByFDAttr{
fd: value,
infoLen: uint32(size),
- info: newPtr(info),
+ info: internal.NewPointer(info),
}
- _, err = bpfCall(_ObjGetInfoByFD, unsafe.Pointer(&attr), unsafe.Sizeof(attr))
- return errors.Wrapf(err, "fd %d", value)
+ _, err = internal.BPF(_ObjGetInfoByFD, unsafe.Pointer(&attr), unsafe.Sizeof(attr))
+ return errors.Wrapf(err, "fd %d", fd)
}
-func bpfGetProgInfoByFD(fd *bpfFD) (*bpfProgInfo, error) {
+func bpfGetProgInfoByFD(fd *internal.FD) (*bpfProgInfo, error) {
var info bpfProgInfo
err := bpfGetObjectInfoByFD(fd, unsafe.Pointer(&info), unsafe.Sizeof(info))
return &info, errors.Wrap(err, "can't get program info")
}
-func bpfGetMapInfoByFD(fd *bpfFD) (*bpfMapInfo, error) {
+func bpfGetMapInfoByFD(fd *internal.FD) (*bpfMapInfo, error) {
var info bpfMapInfo
err := bpfGetObjectInfoByFD(fd, unsafe.Pointer(&info), unsafe.Sizeof(info))
- return &info, errors.Wrap(err, "can't get map info:")
+ return &info, errors.Wrap(err, "can't get map info")
}
-var haveObjName = featureTest{
- Fn: func() bool {
- name, err := newBPFObjName("feature_test")
- if err != nil {
- // This really is a fatal error, but it should be caught
- // by the unit tests not working.
- return false
- }
+var haveObjName = internal.FeatureTest("object names", "4.15", func() bool {
+ name, err := newBPFObjName("feature_test")
+ if err != nil {
+ // This really is a fatal error, but it should be caught
+ // by the unit tests not working.
+ return false
+ }
- attr := bpfMapCreateAttr{
- mapType: Array,
- keySize: 4,
- valueSize: 4,
- maxEntries: 1,
- mapName: name,
- }
+ attr := bpfMapCreateAttr{
+ mapType: Array,
+ keySize: 4,
+ valueSize: 4,
+ maxEntries: 1,
+ mapName: name,
+ }
- fd, err := bpfMapCreate(&attr)
- if err != nil {
- return false
- }
+ fd, err := bpfMapCreate(&attr)
+ if err != nil {
+ return false
+ }
- _ = fd.close()
- return true
- },
-}
+ _ = fd.Close()
+ return true
+})
-func bpfGetMapFDByID(id uint32) (*bpfFD, error) {
+func bpfGetMapFDByID(id uint32) (*internal.FD, error) {
// available from 4.13
attr := bpfGetFDByIDAttr{
id: id,
}
- ptr, err := bpfCall(_MapGetFDByID, unsafe.Pointer(&attr), unsafe.Sizeof(attr))
+ ptr, err := internal.BPF(_MapGetFDByID, unsafe.Pointer(&attr), unsafe.Sizeof(attr))
if err != nil {
return nil, errors.Wrapf(err, "can't get fd for map id %d", id)
}
- return newBPFFD(uint32(ptr)), nil
+ return internal.NewFD(uint32(ptr)), nil
}
-func bpfGetProgramFDByID(id uint32) (*bpfFD, error) {
+func bpfGetProgramFDByID(id uint32) (*internal.FD, error) {
// available from 4.13
attr := bpfGetFDByIDAttr{
id: id,
}
- ptr, err := bpfCall(_ProgGetFDByID, unsafe.Pointer(&attr), unsafe.Sizeof(attr))
+ ptr, err := internal.BPF(_ProgGetFDByID, unsafe.Pointer(&attr), unsafe.Sizeof(attr))
if err != nil {
return nil, errors.Wrapf(err, "can't get fd for program id %d", id)
}
- return newBPFFD(uint32(ptr)), nil
-}
-
-func bpfCall(cmd int, attr unsafe.Pointer, size uintptr) (uintptr, error) {
- r1, _, errNo := unix.Syscall(unix.SYS_BPF, uintptr(cmd), uintptr(attr), size)
- runtime.KeepAlive(attr)
-
- var err error
- if errNo != 0 {
- err = errNo
- }
-
- return r1, err
-}
-
-func convertCString(in []byte) string {
- inLen := bytes.IndexByte(in, 0)
- if inLen == -1 {
- return ""
- }
- return string(in[:inLen])
+ return internal.NewFD(uint32(ptr)), nil
}
diff --git a/vendor/github.com/cilium/ebpf/types.go b/vendor/github.com/cilium/ebpf/types.go
index 0daf9a715..6a0228dc7 100644
--- a/vendor/github.com/cilium/ebpf/types.go
+++ b/vendor/github.com/cilium/ebpf/types.go
@@ -57,6 +57,30 @@ const (
// HashOfMaps - Each item in the hash map is another map. The inner map mustn't be a map of maps
// itself.
HashOfMaps
+ // DevMap - Specialized map to store references to network devices.
+ DevMap
+ // SockMap - Specialized map to store references to sockets.
+ SockMap
+ // CPUMap - Specialized map to store references to CPUs.
+ CPUMap
+ // XSKMap - Specialized map for XDP programs to store references to open sockets.
+ XSKMap
+ // SockHash - Specialized hash to store references to sockets.
+ SockHash
+ // CGroupStorage - Special map for CGroups.
+ CGroupStorage
+ // ReusePortSockArray - Specialized map to store references to sockets that can be reused.
+ ReusePortSockArray
+ // PerCPUCGroupStorage - Special per CPU map for CGroups.
+ PerCPUCGroupStorage
+ // Queue - FIFO storage for BPF programs.
+ Queue
+ // Stack - LIFO storage for BPF programs.
+ Stack
+ // SkStorage - Specialized map for local storage at SK for BPF programs.
+ SkStorage
+ // DevMapHash - Hash-based indexing scheme for references to network devices.
+ DevMapHash
)
// hasPerCPUValue returns true if the Map stores a value per CPU.
@@ -84,6 +108,13 @@ const (
_ProgGetFDByID
_MapGetFDByID
_ObjGetInfoByFD
+ _ProgQuery
+ _RawTracepointOpen
+ _BTFLoad
+ _BTFGetFDByID
+ _TaskFDQuery
+ _MapLookupAndDeleteElem
+ _MapFreeze
)
const (
@@ -149,6 +180,8 @@ const (
RawTracepointWritable
// CGroupSockopt program
CGroupSockopt
+ // Tracing program
+ Tracing
)
// AttachType of the eBPF program, needed to differentiate allowed context accesses in
@@ -183,6 +216,9 @@ const (
AttachCGroupUDP6Recvmsg
AttachCGroupGetsockopt
AttachCGroupSetsockopt
+ AttachTraceRawTp
+ AttachTraceFEntry
+ AttachTraceFExit
)
// AttachFlags of the eBPF program used in BPF_PROG_ATTACH command
diff --git a/vendor/github.com/cilium/ebpf/types_string.go b/vendor/github.com/cilium/ebpf/types_string.go
index 4813437ec..f41ba77df 100644
--- a/vendor/github.com/cilium/ebpf/types_string.go
+++ b/vendor/github.com/cilium/ebpf/types_string.go
@@ -22,11 +22,23 @@ func _() {
_ = x[LPMTrie-11]
_ = x[ArrayOfMaps-12]
_ = x[HashOfMaps-13]
+ _ = x[DevMap-14]
+ _ = x[SockMap-15]
+ _ = x[CPUMap-16]
+ _ = x[XSKMap-17]
+ _ = x[SockHash-18]
+ _ = x[CGroupStorage-19]
+ _ = x[ReusePortSockArray-20]
+ _ = x[PerCPUCGroupStorage-21]
+ _ = x[Queue-22]
+ _ = x[Stack-23]
+ _ = x[SkStorage-24]
+ _ = x[DevMapHash-25]
}
-const _MapType_name = "UnspecifiedMapHashArrayProgramArrayPerfEventArrayPerCPUHashPerCPUArrayStackTraceCGroupArrayLRUHashLRUCPUHashLPMTrieArrayOfMapsHashOfMaps"
+const _MapType_name = "UnspecifiedMapHashArrayProgramArrayPerfEventArrayPerCPUHashPerCPUArrayStackTraceCGroupArrayLRUHashLRUCPUHashLPMTrieArrayOfMapsHashOfMapsDevMapSockMapCPUMapXSKMapSockHashCGroupStorageReusePortSockArrayPerCPUCGroupStorageQueueStackSkStorageDevMapHash"
-var _MapType_index = [...]uint8{0, 14, 18, 23, 35, 49, 59, 70, 80, 91, 98, 108, 115, 126, 136}
+var _MapType_index = [...]uint8{0, 14, 18, 23, 35, 49, 59, 70, 80, 91, 98, 108, 115, 126, 136, 142, 149, 155, 161, 169, 182, 200, 219, 224, 229, 238, 248}
func (i MapType) String() string {
if i >= MapType(len(_MapType_index)-1) {
@@ -64,11 +76,12 @@ func _() {
_ = x[CGroupSysctl-23]
_ = x[RawTracepointWritable-24]
_ = x[CGroupSockopt-25]
+ _ = x[Tracing-26]
}
-const _ProgramType_name = "UnspecifiedProgramSocketFilterKprobeSchedCLSSchedACTTracePointXDPPerfEventCGroupSKBCGroupSockLWTInLWTOutLWTXmitSockOpsSkSKBCGroupDeviceSkMsgRawTracepointCGroupSockAddrLWTSeg6LocalLircMode2SkReuseportFlowDissectorCGroupSysctlRawTracepointWritableCGroupSockopt"
+const _ProgramType_name = "UnspecifiedProgramSocketFilterKprobeSchedCLSSchedACTTracePointXDPPerfEventCGroupSKBCGroupSockLWTInLWTOutLWTXmitSockOpsSkSKBCGroupDeviceSkMsgRawTracepointCGroupSockAddrLWTSeg6LocalLircMode2SkReuseportFlowDissectorCGroupSysctlRawTracepointWritableCGroupSockoptTracing"
-var _ProgramType_index = [...]uint16{0, 18, 30, 36, 44, 52, 62, 65, 74, 83, 93, 98, 104, 111, 118, 123, 135, 140, 153, 167, 179, 188, 199, 212, 224, 245, 258}
+var _ProgramType_index = [...]uint16{0, 18, 30, 36, 44, 52, 62, 65, 74, 83, 93, 98, 104, 111, 118, 123, 135, 140, 153, 167, 179, 188, 199, 212, 224, 245, 258, 265}
func (i ProgramType) String() string {
if i >= ProgramType(len(_ProgramType_index)-1) {
diff --git a/vendor/github.com/containerd/continuity/AUTHORS b/vendor/github.com/containerd/continuity/AUTHORS
new file mode 100644
index 000000000..376ceb93d
--- /dev/null
+++ b/vendor/github.com/containerd/continuity/AUTHORS
@@ -0,0 +1,40 @@
+Aaron Lehmann
+Akash Gupta
+Akihiro Suda
+Akihiro Suda
+Akihiro Suda
+Andrew Pennebaker
+Brandon Philips
+Brian Goff
+Christopher Jones
+Daniel, Dao Quang Minh
+Darren Stahl
+Derek McGowan
+Derek McGowan
+Edward Pilatowicz
+Ian Campbell
+Ivan Markin
+Justin Cormack
+Justin Cummins
+Kasper Fabæch Brandt
+Kir Kolyshkin
+Michael Crosby
+Michael Crosby
+Michael Wan
+Mike Brown
+Niels de Vos
+Phil Estes
+Phil Estes
+Samuel Karp
+Sam Whited
+Sebastiaan van Stijn
+Shengjing Zhu
+Stephen J Day
+Tibor Vass
+Tobias Klauser
+Tom Faulhaber
+Tonis Tiigi
+Trevor Porter
+Wei Fu
+Wilbert van de Ridder
+Xiaodong Ye
diff --git a/vendor/github.com/containerd/continuity/LICENSE b/vendor/github.com/containerd/continuity/LICENSE
new file mode 100644
index 000000000..584149b6e
--- /dev/null
+++ b/vendor/github.com/containerd/continuity/LICENSE
@@ -0,0 +1,191 @@
+
+ Apache License
+ Version 2.0, January 2004
+ https://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ Copyright The containerd 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
+
+ https://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/vendor/github.com/containerd/continuity/pathdriver/path_driver.go b/vendor/github.com/containerd/continuity/pathdriver/path_driver.go
new file mode 100644
index 000000000..b0d5a6b56
--- /dev/null
+++ b/vendor/github.com/containerd/continuity/pathdriver/path_driver.go
@@ -0,0 +1,101 @@
+/*
+ Copyright The containerd 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 pathdriver
+
+import (
+ "path/filepath"
+)
+
+// PathDriver provides all of the path manipulation functions in a common
+// interface. The context should call these and never use the `filepath`
+// package or any other package to manipulate paths.
+type PathDriver interface {
+ Join(paths ...string) string
+ IsAbs(path string) bool
+ Rel(base, target string) (string, error)
+ Base(path string) string
+ Dir(path string) string
+ Clean(path string) string
+ Split(path string) (dir, file string)
+ Separator() byte
+ Abs(path string) (string, error)
+ Walk(string, filepath.WalkFunc) error
+ FromSlash(path string) string
+ ToSlash(path string) string
+ Match(pattern, name string) (matched bool, err error)
+}
+
+// pathDriver is a simple default implementation calls the filepath package.
+type pathDriver struct{}
+
+// LocalPathDriver is the exported pathDriver struct for convenience.
+var LocalPathDriver PathDriver = &pathDriver{}
+
+func (*pathDriver) Join(paths ...string) string {
+ return filepath.Join(paths...)
+}
+
+func (*pathDriver) IsAbs(path string) bool {
+ return filepath.IsAbs(path)
+}
+
+func (*pathDriver) Rel(base, target string) (string, error) {
+ return filepath.Rel(base, target)
+}
+
+func (*pathDriver) Base(path string) string {
+ return filepath.Base(path)
+}
+
+func (*pathDriver) Dir(path string) string {
+ return filepath.Dir(path)
+}
+
+func (*pathDriver) Clean(path string) string {
+ return filepath.Clean(path)
+}
+
+func (*pathDriver) Split(path string) (dir, file string) {
+ return filepath.Split(path)
+}
+
+func (*pathDriver) Separator() byte {
+ return filepath.Separator
+}
+
+func (*pathDriver) Abs(path string) (string, error) {
+ return filepath.Abs(path)
+}
+
+// Note that filepath.Walk calls os.Stat, so if the context wants to
+// to call Driver.Stat() for Walk, they need to create a new struct that
+// overrides this method.
+func (*pathDriver) Walk(root string, walkFn filepath.WalkFunc) error {
+ return filepath.Walk(root, walkFn)
+}
+
+func (*pathDriver) FromSlash(path string) string {
+ return filepath.FromSlash(path)
+}
+
+func (*pathDriver) ToSlash(path string) string {
+ return filepath.ToSlash(path)
+}
+
+func (*pathDriver) Match(pattern, name string) (bool, error) {
+ return filepath.Match(pattern, name)
+}
diff --git a/vendor/github.com/containerd/ttrpc/go.mod b/vendor/github.com/containerd/ttrpc/go.mod
deleted file mode 100644
index 2b662a70d..000000000
--- a/vendor/github.com/containerd/ttrpc/go.mod
+++ /dev/null
@@ -1,13 +0,0 @@
-module github.com/containerd/ttrpc
-
-go 1.12
-
-require (
- github.com/gogo/protobuf v1.2.1
- github.com/pkg/errors v0.8.1
- github.com/prometheus/procfs v0.0.0-20190522114515-bc1a522cf7b1
- github.com/sirupsen/logrus v1.4.2
- golang.org/x/sys v0.0.0-20190522044717-8097e1b27ff5
- google.golang.org/genproto v0.0.0-20190522204451-c2c4e71fbf69
- google.golang.org/grpc v1.21.0
-)
diff --git a/vendor/github.com/containerd/ttrpc/go.sum b/vendor/github.com/containerd/ttrpc/go.sum
deleted file mode 100644
index 66aa0b120..000000000
--- a/vendor/github.com/containerd/ttrpc/go.sum
+++ /dev/null
@@ -1,60 +0,0 @@
-cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
-github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
-github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
-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/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE=
-github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
-github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
-github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
-github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg=
-github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
-github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
-github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
-github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
-github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
-github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
-github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
-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/prometheus/procfs v0.0.0-20190522114515-bc1a522cf7b1 h1:Lo6mRUjdS99f3zxYOUalftWHUoOGaDRqFk1+j0Q57/I=
-github.com/prometheus/procfs v0.0.0-20190522114515-bc1a522cf7b1/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
-github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4=
-github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
-github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
-github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
-golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
-golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
-golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
-golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
-golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
-golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/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-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190522044717-8097e1b27ff5 h1:f005F/Jl5JLP036x7QIvUVhNTqxvSYwFIiyOh2q12iU=
-golang.org/x/sys v0.0.0-20190522044717-8097e1b27ff5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
-golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
-google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
-google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
-google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
-google.golang.org/genproto v0.0.0-20190522204451-c2c4e71fbf69 h1:4rNOqY4ULrKzS6twXa619uQgI7h9PaVd4ZhjFQ7C5zs=
-google.golang.org/genproto v0.0.0-20190522204451-c2c4e71fbf69/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s=
-google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
-google.golang.org/grpc v1.21.0 h1:G+97AoqBnmZIT91cLG/EkCoK9NSelj64P8bOHHNmGn0=
-google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
-honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
diff --git a/vendor/github.com/deislabs/oras/pkg/auth/docker/client.go b/vendor/github.com/deislabs/oras/pkg/auth/docker/client.go
index ff7732739..69343d7c2 100644
--- a/vendor/github.com/deislabs/oras/pkg/auth/docker/client.go
+++ b/vendor/github.com/deislabs/oras/pkg/auth/docker/client.go
@@ -21,15 +21,7 @@ type Client struct {
// Credentials are read from the first config and fall backs to next.
// All changes will only be written to the first config file.
func NewClient(configPaths ...string) (auth.Client, error) {
- var configs []*configfile.ConfigFile
- for _, path := range configPaths {
- cfg, err := loadConfigFile(path)
- if err != nil {
- return nil, errors.Wrap(err, path)
- }
- configs = append(configs, cfg)
- }
- if len(configs) == 0 {
+ if len(configPaths) == 0 {
cfg, err := config.Load(config.Dir())
if err != nil {
return nil, err
@@ -37,7 +29,19 @@ func NewClient(configPaths ...string) (auth.Client, error) {
if !cfg.ContainsAuth() {
cfg.CredentialsStore = credentials.DetectDefaultStore(cfg.CredentialsStore)
}
- configs = []*configfile.ConfigFile{cfg}
+
+ return &Client{
+ configs: []*configfile.ConfigFile{cfg},
+ }, nil
+ }
+
+ var configs []*configfile.ConfigFile
+ for _, path := range configPaths {
+ cfg, err := loadConfigFile(path)
+ if err != nil {
+ return nil, errors.Wrap(err, path)
+ }
+ configs = append(configs, cfg)
}
return &Client{
diff --git a/vendor/github.com/deislabs/oras/pkg/content/consts.go b/vendor/github.com/deislabs/oras/pkg/content/consts.go
index bda9e5f81..cf374c2af 100644
--- a/vendor/github.com/deislabs/oras/pkg/content/consts.go
+++ b/vendor/github.com/deislabs/oras/pkg/content/consts.go
@@ -1,6 +1,9 @@
package content
-import ocispec "github.com/opencontainers/image-spec/specs-go/v1"
+import (
+ "github.com/opencontainers/go-digest"
+ ocispec "github.com/opencontainers/image-spec/specs-go/v1"
+)
const (
// DefaultBlobMediaType specifies the default blob media type
@@ -26,3 +29,14 @@ const (
// Reference: https://github.com/opencontainers/image-spec/blob/master/image-layout.md#indexjson-file
OCIImageIndexFile = "index.json"
)
+
+const (
+ // DefaultBlocksize default size of each slice of bytes read in each write through in gunzipand untar.
+ // Simply uses the same size as io.Copy()
+ DefaultBlocksize = 32768
+)
+
+const (
+ // what you get for a blank digest
+ BlankHash = digest.Digest("sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855")
+)
diff --git a/vendor/github.com/deislabs/oras/pkg/content/decompressstore.go b/vendor/github.com/deislabs/oras/pkg/content/decompressstore.go
new file mode 100644
index 000000000..11804355c
--- /dev/null
+++ b/vendor/github.com/deislabs/oras/pkg/content/decompressstore.go
@@ -0,0 +1,143 @@
+package content
+
+import (
+ "context"
+ "errors"
+ "strings"
+
+ ctrcontent "github.com/containerd/containerd/content"
+)
+
+// DecompressStore store to decompress content and extract from tar, if needed, wrapping
+// another store. By default, a FileStore will simply take each artifact and write it to
+// a file, as a MemoryStore will do into memory. If the artifact is gzipped or tarred,
+// you might want to store the actual object inside tar or gzip. Wrap your Store
+// with DecompressStore, and it will check the media-type and, if relevant,
+// gunzip and/or untar.
+//
+// For example:
+//
+// fileStore := NewFileStore(rootPath)
+// decompressStore := store.NewDecompressStore(fileStore, WithBlocksize(blocksize))
+//
+// The above example works if there is no tar, i.e. each artifact is just a single file, perhaps gzipped,
+// or if there is only one file in each tar archive. In other words, when each content.Writer has only one target output stream.
+// However, if you have multiple files in each tar archive, each archive of which is an artifact layer, then
+// you need a way to select how to handle each file in the tar archive. In other words, when each content.Writer has more than one
+// target output stream. In that case, use the following example:
+//
+// multiStore := NewMultiStore(rootPath) // some store that can handle different filenames
+// decompressStore := store.NewDecompressStore(multiStore, WithBlocksize(blocksize), WithMultiWriterIngester())
+//
+type DecompressStore struct {
+ ingester ctrcontent.Ingester
+ blocksize int
+ multiWriterIngester bool
+}
+
+func NewDecompressStore(ingester ctrcontent.Ingester, opts ...WriterOpt) DecompressStore {
+ // we have to reprocess the opts to find the blocksize
+ var wOpts WriterOpts
+ for _, opt := range opts {
+ if err := opt(&wOpts); err != nil {
+ // TODO: we probably should handle errors here
+ continue
+ }
+ }
+
+ return DecompressStore{ingester, wOpts.Blocksize, wOpts.MultiWriterIngester}
+}
+
+// Writer get a writer
+func (d DecompressStore) Writer(ctx context.Context, opts ...ctrcontent.WriterOpt) (ctrcontent.Writer, error) {
+ // the logic is straightforward:
+ // - if there is a desc in the opts, and the mediatype is tar or tar+gzip, then pass the correct decompress writer
+ // - else, pass the regular writer
+ var (
+ writer ctrcontent.Writer
+ err error
+ multiIngester MultiWriterIngester
+ ok bool
+ )
+
+ // check to see if we are supposed to use a MultiWriterIngester
+ if d.multiWriterIngester {
+ multiIngester, ok = d.ingester.(MultiWriterIngester)
+ if !ok {
+ return nil, errors.New("configured to use multiwriter ingester, but ingester does not implement multiwriter")
+ }
+ }
+
+ // we have to reprocess the opts to find the desc
+ var wOpts ctrcontent.WriterOpts
+ for _, opt := range opts {
+ if err := opt(&wOpts); err != nil {
+ return nil, err
+ }
+ }
+ // figure out if compression and/or archive exists
+ desc := wOpts.Desc
+ // before we pass it down, we need to strip anything we are removing here
+ // and possibly update the digest, since the store indexes things by digest
+ hasGzip, hasTar, modifiedMediaType := checkCompression(desc.MediaType)
+ wOpts.Desc.MediaType = modifiedMediaType
+ opts = append(opts, ctrcontent.WithDescriptor(wOpts.Desc))
+ // determine if we pass it blocksize, only if positive
+ writerOpts := []WriterOpt{}
+ if d.blocksize > 0 {
+ writerOpts = append(writerOpts, WithBlocksize(d.blocksize))
+ }
+
+ writer, err = d.ingester.Writer(ctx, opts...)
+ if err != nil {
+ return nil, err
+ }
+
+ // do we need to wrap with an untar writer?
+ if hasTar {
+ // if not multiingester, get a regular writer
+ if multiIngester == nil {
+ writer = NewUntarWriter(writer, writerOpts...)
+ } else {
+ writers, err := multiIngester.Writers(ctx, opts...)
+ if err != nil {
+ return nil, err
+ }
+ writer = NewUntarWriterByName(writers, writerOpts...)
+ }
+ }
+ if hasGzip {
+ if writer == nil {
+ writer, err = d.ingester.Writer(ctx, opts...)
+ if err != nil {
+ return nil, err
+ }
+ }
+ writer = NewGunzipWriter(writer, writerOpts...)
+ }
+ return writer, nil
+}
+
+// checkCompression check if the mediatype uses gzip compression or tar.
+// Returns if it has gzip and/or tar, as well as the base media type without
+// those suffixes.
+func checkCompression(mediaType string) (gzip, tar bool, mt string) {
+ mt = mediaType
+ gzipSuffix := "+gzip"
+ gzipAltSuffix := ".gzip"
+ tarSuffix := ".tar"
+ switch {
+ case strings.HasSuffix(mt, gzipSuffix):
+ mt = mt[:len(mt)-len(gzipSuffix)]
+ gzip = true
+ case strings.HasSuffix(mt, gzipAltSuffix):
+ mt = mt[:len(mt)-len(gzipAltSuffix)]
+ gzip = true
+ }
+
+ if strings.HasSuffix(mt, tarSuffix) {
+ mt = mt[:len(mt)-len(tarSuffix)]
+ tar = true
+ }
+ return
+}
diff --git a/vendor/github.com/deislabs/oras/pkg/content/file.go b/vendor/github.com/deislabs/oras/pkg/content/file.go
index 77b13335c..67d2e00f3 100644
--- a/vendor/github.com/deislabs/oras/pkg/content/file.go
+++ b/vendor/github.com/deislabs/oras/pkg/content/file.go
@@ -31,19 +31,28 @@ type FileStore struct {
// Reproducible enables stripping times from added files
Reproducible bool
- root string
- descriptor *sync.Map // map[digest.Digest]ocispec.Descriptor
- pathMap *sync.Map
- tmpFiles *sync.Map
+ root string
+ descriptor *sync.Map // map[digest.Digest]ocispec.Descriptor
+ pathMap *sync.Map
+ tmpFiles *sync.Map
+ ignoreNoName bool
}
// NewFileStore creats a new file store
-func NewFileStore(rootPath string) *FileStore {
+func NewFileStore(rootPath string, opts ...WriterOpt) *FileStore {
+ // we have to process the opts to find if they told us to change defaults
+ wOpts := DefaultWriterOpts()
+ for _, opt := range opts {
+ if err := opt(&wOpts); err != nil {
+ continue
+ }
+ }
return &FileStore{
- root: rootPath,
- descriptor: &sync.Map{},
- pathMap: &sync.Map{},
- tmpFiles: &sync.Map{},
+ root: rootPath,
+ descriptor: &sync.Map{},
+ pathMap: &sync.Map{},
+ tmpFiles: &sync.Map{},
+ ignoreNoName: wOpts.IgnoreNoName,
}
}
@@ -198,7 +207,14 @@ func (s *FileStore) Writer(ctx context.Context, opts ...content.WriterOpt) (cont
name, ok := ResolveName(desc)
if !ok {
- return nil, ErrNoName
+ // if we were not told to ignore NoName, then return an error
+ if !s.ignoreNoName {
+ return nil, ErrNoName
+ }
+
+ // just return a nil writer - we do not want to calculate the hash, so just use
+ // whatever was passed in the descriptor
+ return NewIoContentWriter(ioutil.Discard, WithOutputHash(desc.Digest)), nil
}
path, err := s.resolveWritePath(name)
if err != nil {
diff --git a/vendor/github.com/deislabs/oras/pkg/content/gunzip.go b/vendor/github.com/deislabs/oras/pkg/content/gunzip.go
new file mode 100644
index 000000000..73526b261
--- /dev/null
+++ b/vendor/github.com/deislabs/oras/pkg/content/gunzip.go
@@ -0,0 +1,57 @@
+package content
+
+import (
+ "compress/gzip"
+ "fmt"
+ "io"
+
+ "github.com/containerd/containerd/content"
+)
+
+// NewGunzipWriter wrap a writer with a gunzip, so that the stream is gunzipped
+//
+// By default, it calculates the hash when writing. If the option `skipHash` is true,
+// it will skip doing the hash. Skipping the hash is intended to be used only
+// if you are confident about the validity of the data being passed to the writer,
+// and wish to save on the hashing time.
+func NewGunzipWriter(writer content.Writer, opts ...WriterOpt) content.Writer {
+ // process opts for default
+ wOpts := DefaultWriterOpts()
+ for _, opt := range opts {
+ if err := opt(&wOpts); err != nil {
+ return nil
+ }
+ }
+ return NewPassthroughWriter(writer, func(r io.Reader, w io.Writer, done chan<- error) {
+ gr, err := gzip.NewReader(r)
+ if err != nil {
+ done <- fmt.Errorf("error creating gzip reader: %v", err)
+ return
+ }
+ // write out the uncompressed data
+ b := make([]byte, wOpts.Blocksize, wOpts.Blocksize)
+ for {
+ var n int
+ n, err = gr.Read(b)
+ if err != nil && err != io.EOF {
+ err = fmt.Errorf("GunzipWriter data read error: %v\n", err)
+ break
+ }
+ l := n
+ if n > len(b) {
+ l = len(b)
+ }
+ if _, err2 := w.Write(b[:l]); err2 != nil {
+ err = fmt.Errorf("GunzipWriter: error writing to underlying writer: %v", err2)
+ break
+ }
+ if err == io.EOF {
+ // clear the error
+ err = nil
+ break
+ }
+ }
+ gr.Close()
+ done <- err
+ }, opts...)
+}
diff --git a/vendor/github.com/deislabs/oras/pkg/content/iowriter.go b/vendor/github.com/deislabs/oras/pkg/content/iowriter.go
new file mode 100644
index 000000000..4ad04ac68
--- /dev/null
+++ b/vendor/github.com/deislabs/oras/pkg/content/iowriter.go
@@ -0,0 +1,97 @@
+package content
+
+import (
+ "context"
+ "io"
+ "io/ioutil"
+
+ "github.com/containerd/containerd/content"
+ "github.com/opencontainers/go-digest"
+)
+
+// IoContentWriter writer that wraps an io.Writer, so the results can be streamed to
+// an open io.Writer. For example, can be used to pull a layer and write it to a file, or device.
+type IoContentWriter struct {
+ writer io.Writer
+ digester digest.Digester
+ size int64
+ hash *digest.Digest
+}
+
+// NewIoContentWriter create a new IoContentWriter.
+//
+// By default, it calculates the hash when writing. If the option `skipHash` is true,
+// it will skip doing the hash. Skipping the hash is intended to be used only
+// if you are confident about the validity of the data being passed to the writer,
+// and wish to save on the hashing time.
+func NewIoContentWriter(writer io.Writer, opts ...WriterOpt) content.Writer {
+ w := writer
+ if w == nil {
+ w = ioutil.Discard
+ }
+ // process opts for default
+ wOpts := DefaultWriterOpts()
+ for _, opt := range opts {
+ if err := opt(&wOpts); err != nil {
+ return nil
+ }
+ }
+ ioc := &IoContentWriter{
+ writer: w,
+ digester: digest.Canonical.Digester(),
+ // we take the OutputHash, since the InputHash goes to the passthrough writer,
+ // which then passes the processed output to us
+ hash: wOpts.OutputHash,
+ }
+ return NewPassthroughWriter(ioc, func(r io.Reader, w io.Writer, done chan<- error) {
+ // write out the data to the io writer
+ var (
+ err error
+ )
+ // we could use io.Copy, but calling it with the default blocksize is identical to
+ // io.CopyBuffer. Otherwise, we would need some way to let the user flag "I want to use
+ // io.Copy", when it should not matter to them
+ b := make([]byte, wOpts.Blocksize, wOpts.Blocksize)
+ _, err = io.CopyBuffer(w, r, b)
+ done <- err
+ }, opts...)
+}
+
+func (w *IoContentWriter) Write(p []byte) (n int, err error) {
+ n, err = w.writer.Write(p)
+ if err != nil {
+ return 0, err
+ }
+ w.size += int64(n)
+ if w.hash == nil {
+ w.digester.Hash().Write(p[:n])
+ }
+ return
+}
+
+func (w *IoContentWriter) Close() error {
+ return nil
+}
+
+// Digest may return empty digest or panics until committed.
+func (w *IoContentWriter) Digest() digest.Digest {
+ return w.digester.Digest()
+}
+
+// Commit commits the blob (but no roll-back is guaranteed on an error).
+// size and expected can be zero-value when unknown.
+// Commit always closes the writer, even on error.
+// ErrAlreadyExists aborts the writer.
+func (w *IoContentWriter) Commit(ctx context.Context, size int64, expected digest.Digest, opts ...content.Opt) error {
+ return nil
+}
+
+// Status returns the current state of write
+func (w *IoContentWriter) Status() (content.Status, error) {
+ return content.Status{}, nil
+}
+
+// Truncate updates the size of the target blob
+func (w *IoContentWriter) Truncate(size int64) error {
+ return nil
+}
diff --git a/vendor/github.com/deislabs/oras/pkg/content/multireader.go b/vendor/github.com/deislabs/oras/pkg/content/multireader.go
new file mode 100644
index 000000000..fb9cf8bfb
--- /dev/null
+++ b/vendor/github.com/deislabs/oras/pkg/content/multireader.go
@@ -0,0 +1,40 @@
+package content
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/containerd/containerd/content"
+ ocispec "github.com/opencontainers/image-spec/specs-go/v1"
+)
+
+// MultiReader store to read content from multiple stores. It finds the content by asking each underlying
+// store to find the content, which it does based on the hash.
+//
+// Example:
+// fileStore := NewFileStore(rootPath)
+// memoryStore := NewMemoryStore()
+// // load up content in fileStore and memoryStore
+// multiStore := MultiReader([]content.Provider{fileStore, memoryStore})
+//
+// You now can use multiStore anywhere that content.Provider is accepted
+type MultiReader struct {
+ stores []content.Provider
+}
+
+// AddStore add a store to read from
+func (m *MultiReader) AddStore(store ...content.Provider) {
+ m.stores = append(m.stores, store...)
+}
+
+// ReaderAt get a reader
+func (m MultiReader) ReaderAt(ctx context.Context, desc ocispec.Descriptor) (content.ReaderAt, error) {
+ for _, store := range m.stores {
+ r, err := store.ReaderAt(ctx, desc)
+ if r != nil && err == nil {
+ return r, nil
+ }
+ }
+ // we did not find any
+ return nil, fmt.Errorf("not found")
+}
diff --git a/vendor/github.com/deislabs/oras/pkg/content/multiwriter.go b/vendor/github.com/deislabs/oras/pkg/content/multiwriter.go
new file mode 100644
index 000000000..526587d3b
--- /dev/null
+++ b/vendor/github.com/deislabs/oras/pkg/content/multiwriter.go
@@ -0,0 +1,16 @@
+package content
+
+import (
+ "context"
+
+ ctrcontent "github.com/containerd/containerd/content"
+)
+
+// MultiWriterIngester an ingester that can provide a single writer or multiple writers for a single
+// descriptor. Useful when the target of a descriptor can have multiple items within it, e.g. a layer
+// that is a tar file with multiple files, each of which should go to a different stream, some of which
+// should not be handled at all.
+type MultiWriterIngester interface {
+ ctrcontent.Ingester
+ Writers(ctx context.Context, opts ...ctrcontent.WriterOpt) (func(string) (ctrcontent.Writer, error), error)
+}
diff --git a/vendor/github.com/deislabs/oras/pkg/content/oci.go b/vendor/github.com/deislabs/oras/pkg/content/oci.go
index 57c56ef17..626802325 100644
--- a/vendor/github.com/deislabs/oras/pkg/content/oci.go
+++ b/vendor/github.com/deislabs/oras/pkg/content/oci.go
@@ -98,6 +98,8 @@ func (s *OCIStore) AddReference(name string, desc ocispec.Descriptor) {
}
if _, ok := s.nameMap[name]; ok {
+ s.nameMap[name] = desc
+
for i, ref := range s.index.Manifests {
if name == ref.Annotations[ocispec.AnnotationRefName] {
s.index.Manifests[i] = desc
@@ -107,11 +109,12 @@ func (s *OCIStore) AddReference(name string, desc ocispec.Descriptor) {
// Process should not reach here.
// Fallthrough to `Add` scenario and recover.
+ s.index.Manifests = append(s.index.Manifests, desc)
+ return
}
s.index.Manifests = append(s.index.Manifests, desc)
s.nameMap[name] = desc
- return
}
// DeleteReference deletes an reference from index.
diff --git a/vendor/github.com/deislabs/oras/pkg/content/opts.go b/vendor/github.com/deislabs/oras/pkg/content/opts.go
new file mode 100644
index 000000000..cea4f1bdf
--- /dev/null
+++ b/vendor/github.com/deislabs/oras/pkg/content/opts.go
@@ -0,0 +1,97 @@
+package content
+
+import (
+ "errors"
+
+ "github.com/opencontainers/go-digest"
+)
+
+type WriterOpts struct {
+ InputHash *digest.Digest
+ OutputHash *digest.Digest
+ Blocksize int
+ MultiWriterIngester bool
+ IgnoreNoName bool
+}
+
+type WriterOpt func(*WriterOpts) error
+
+func DefaultWriterOpts() WriterOpts {
+ return WriterOpts{
+ InputHash: nil,
+ OutputHash: nil,
+ Blocksize: DefaultBlocksize,
+ IgnoreNoName: true,
+ }
+}
+
+// WithInputHash provide the expected input hash to a writer. Writers
+// may suppress their own calculation of a hash on the stream, taking this
+// hash instead. If the Writer processes the data before passing it on to another
+// Writer layer, this is the hash of the *input* stream.
+//
+// To have a blank hash, use WithInputHash(BlankHash).
+func WithInputHash(hash digest.Digest) WriterOpt {
+ return func(w *WriterOpts) error {
+ w.InputHash = &hash
+ return nil
+ }
+}
+
+// WithOutputHash provide the expected output hash to a writer. Writers
+// may suppress their own calculation of a hash on the stream, taking this
+// hash instead. If the Writer processes the data before passing it on to another
+// Writer layer, this is the hash of the *output* stream.
+//
+// To have a blank hash, use WithInputHash(BlankHash).
+func WithOutputHash(hash digest.Digest) WriterOpt {
+ return func(w *WriterOpts) error {
+ w.OutputHash = &hash
+ return nil
+ }
+}
+
+// WithBlocksize set the blocksize used by the processor of data.
+// The default is DefaultBlocksize, which is the same as that used by io.Copy.
+// Includes a safety check to ensure the caller doesn't actively set it to <= 0.
+func WithBlocksize(blocksize int) WriterOpt {
+ return func(w *WriterOpts) error {
+ if blocksize <= 0 {
+ return errors.New("blocksize must be greater than or equal to 0")
+ }
+ w.Blocksize = blocksize
+ return nil
+ }
+}
+
+// WithMultiWriterIngester the passed ingester also implements MultiWriter
+// and should be used as such. If this is set to true, but the ingester does not
+// implement MultiWriter, calling Writer should return an error.
+func WithMultiWriterIngester() WriterOpt {
+ return func(w *WriterOpts) error {
+ w.MultiWriterIngester = true
+ return nil
+ }
+}
+
+// WithErrorOnNoName some ingesters, when creating a Writer, do not return an error if
+// the descriptor does not have a valid name on the descriptor. Passing WithErrorOnNoName
+// tells the writer to return an error instead of passing the data to a nil writer.
+func WithErrorOnNoName() WriterOpt {
+ return func(w *WriterOpts) error {
+ w.IgnoreNoName = false
+ return nil
+ }
+}
+
+// WithIgnoreNoName some ingesters, when creating a Writer, return an error if
+// the descriptor does not have a valid name on the descriptor. Passing WithIgnoreNoName
+// tells the writer not to return an error, but rather to pass the data to a nil writer.
+//
+// Deprecated: Use WithErrorOnNoName
+func WithIgnoreNoName() WriterOpt {
+ return func(w *WriterOpts) error {
+ w.IgnoreNoName = true
+ return nil
+ }
+}
diff --git a/vendor/github.com/deislabs/oras/pkg/content/passthrough.go b/vendor/github.com/deislabs/oras/pkg/content/passthrough.go
new file mode 100644
index 000000000..09b7e6ea9
--- /dev/null
+++ b/vendor/github.com/deislabs/oras/pkg/content/passthrough.go
@@ -0,0 +1,271 @@
+package content
+
+import (
+ "context"
+ "errors"
+ "io"
+ "time"
+
+ "github.com/containerd/containerd/content"
+ "github.com/opencontainers/go-digest"
+)
+
+// PassthroughWriter takes an input stream and passes it through to an underlying writer,
+// while providing the ability to manipulate the stream before it gets passed through
+type PassthroughWriter struct {
+ writer content.Writer
+ pipew *io.PipeWriter
+ digester digest.Digester
+ size int64
+ underlyingWriter *underlyingWriter
+ reader *io.PipeReader
+ hash *digest.Digest
+ done chan error
+}
+
+// NewPassthroughWriter creates a pass-through writer that allows for processing
+// the content via an arbitrary function. The function should do whatever processing it
+// wants, reading from the Reader to the Writer. When done, it must indicate via
+// sending an error or nil to the Done
+func NewPassthroughWriter(writer content.Writer, f func(r io.Reader, w io.Writer, done chan<- error), opts ...WriterOpt) content.Writer {
+ // process opts for default
+ wOpts := DefaultWriterOpts()
+ for _, opt := range opts {
+ if err := opt(&wOpts); err != nil {
+ return nil
+ }
+ }
+
+ r, w := io.Pipe()
+ pw := &PassthroughWriter{
+ writer: writer,
+ pipew: w,
+ digester: digest.Canonical.Digester(),
+ underlyingWriter: &underlyingWriter{
+ writer: writer,
+ digester: digest.Canonical.Digester(),
+ hash: wOpts.OutputHash,
+ },
+ reader: r,
+ hash: wOpts.InputHash,
+ done: make(chan error, 1),
+ }
+ go f(r, pw.underlyingWriter, pw.done)
+ return pw
+}
+
+func (pw *PassthroughWriter) Write(p []byte) (n int, err error) {
+ n, err = pw.pipew.Write(p)
+ if pw.hash == nil {
+ pw.digester.Hash().Write(p[:n])
+ }
+ pw.size += int64(n)
+ return
+}
+
+func (pw *PassthroughWriter) Close() error {
+ if pw.pipew != nil {
+ pw.pipew.Close()
+ }
+ pw.writer.Close()
+ return nil
+}
+
+// Digest may return empty digest or panics until committed.
+func (pw *PassthroughWriter) Digest() digest.Digest {
+ if pw.hash != nil {
+ return *pw.hash
+ }
+ return pw.digester.Digest()
+}
+
+// Commit commits the blob (but no roll-back is guaranteed on an error).
+// size and expected can be zero-value when unknown.
+// Commit always closes the writer, even on error.
+// ErrAlreadyExists aborts the writer.
+func (pw *PassthroughWriter) Commit(ctx context.Context, size int64, expected digest.Digest, opts ...content.Opt) error {
+ if pw.pipew != nil {
+ pw.pipew.Close()
+ }
+ err := <-pw.done
+ if pw.reader != nil {
+ pw.reader.Close()
+ }
+ if err != nil && err != io.EOF {
+ return err
+ }
+
+ // Some underlying writers will validate an expected digest, so we need the option to pass it
+ // that digest. That is why we caluclate the digest of the underlying writer throughout the write process.
+ return pw.writer.Commit(ctx, pw.underlyingWriter.size, pw.underlyingWriter.Digest(), opts...)
+}
+
+// Status returns the current state of write
+func (pw *PassthroughWriter) Status() (content.Status, error) {
+ return pw.writer.Status()
+}
+
+// Truncate updates the size of the target blob
+func (pw *PassthroughWriter) Truncate(size int64) error {
+ return pw.writer.Truncate(size)
+}
+
+// underlyingWriter implementation of io.Writer to write to the underlying
+// io.Writer
+type underlyingWriter struct {
+ writer content.Writer
+ digester digest.Digester
+ size int64
+ hash *digest.Digest
+}
+
+// Write write to the underlying writer
+func (u *underlyingWriter) Write(p []byte) (int, error) {
+ n, err := u.writer.Write(p)
+ if err != nil {
+ return 0, err
+ }
+
+ if u.hash == nil {
+ u.digester.Hash().Write(p)
+ }
+ u.size += int64(len(p))
+ return n, nil
+}
+
+// Size get total size written
+func (u *underlyingWriter) Size() int64 {
+ return u.size
+}
+
+// Digest may return empty digest or panics until committed.
+func (u *underlyingWriter) Digest() digest.Digest {
+ if u.hash != nil {
+ return *u.hash
+ }
+ return u.digester.Digest()
+}
+
+// PassthroughMultiWriter single writer that passes through to multiple writers, allowing the passthrough
+// function to select which writer to use.
+type PassthroughMultiWriter struct {
+ writers []*PassthroughWriter
+ pipew *io.PipeWriter
+ digester digest.Digester
+ size int64
+ reader *io.PipeReader
+ hash *digest.Digest
+ done chan error
+ startedAt time.Time
+ updatedAt time.Time
+}
+
+func NewPassthroughMultiWriter(writers func(name string) (content.Writer, error), f func(r io.Reader, getwriter func(name string) io.Writer, done chan<- error), opts ...WriterOpt) content.Writer {
+ // process opts for default
+ wOpts := DefaultWriterOpts()
+ for _, opt := range opts {
+ if err := opt(&wOpts); err != nil {
+ return nil
+ }
+ }
+
+ r, w := io.Pipe()
+
+ pmw := &PassthroughMultiWriter{
+ startedAt: time.Now(),
+ updatedAt: time.Now(),
+ done: make(chan error, 1),
+ digester: digest.Canonical.Digester(),
+ hash: wOpts.InputHash,
+ pipew: w,
+ reader: r,
+ }
+
+ // get our output writers
+ getwriter := func(name string) io.Writer {
+ writer, err := writers(name)
+ if err != nil || writer == nil {
+ return nil
+ }
+ pw := &PassthroughWriter{
+ writer: writer,
+ digester: digest.Canonical.Digester(),
+ underlyingWriter: &underlyingWriter{
+ writer: writer,
+ digester: digest.Canonical.Digester(),
+ hash: wOpts.OutputHash,
+ },
+ done: make(chan error, 1),
+ }
+ pmw.writers = append(pmw.writers, pw)
+ return pw.underlyingWriter
+ }
+ go f(r, getwriter, pmw.done)
+ return pmw
+}
+
+func (pmw *PassthroughMultiWriter) Write(p []byte) (n int, err error) {
+ n, err = pmw.pipew.Write(p)
+ if pmw.hash == nil {
+ pmw.digester.Hash().Write(p[:n])
+ }
+ pmw.size += int64(n)
+ pmw.updatedAt = time.Now()
+ return
+}
+
+func (pmw *PassthroughMultiWriter) Close() error {
+ pmw.pipew.Close()
+ for _, w := range pmw.writers {
+ w.Close()
+ }
+ return nil
+}
+
+// Digest may return empty digest or panics until committed.
+func (pmw *PassthroughMultiWriter) Digest() digest.Digest {
+ if pmw.hash != nil {
+ return *pmw.hash
+ }
+ return pmw.digester.Digest()
+}
+
+// Commit commits the blob (but no roll-back is guaranteed on an error).
+// size and expected can be zero-value when unknown.
+// Commit always closes the writer, even on error.
+// ErrAlreadyExists aborts the writer.
+func (pmw *PassthroughMultiWriter) Commit(ctx context.Context, size int64, expected digest.Digest, opts ...content.Opt) error {
+ pmw.pipew.Close()
+ err := <-pmw.done
+ if pmw.reader != nil {
+ pmw.reader.Close()
+ }
+ if err != nil && err != io.EOF {
+ return err
+ }
+
+ // Some underlying writers will validate an expected digest, so we need the option to pass it
+ // that digest. That is why we caluclate the digest of the underlying writer throughout the write process.
+ for _, w := range pmw.writers {
+ // maybe this should be Commit(ctx, pw.underlyingWriter.size, pw.underlyingWriter.Digest(), opts...)
+ w.done <- err
+ if err := w.Commit(ctx, size, expected, opts...); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// Status returns the current state of write
+func (pmw *PassthroughMultiWriter) Status() (content.Status, error) {
+ return content.Status{
+ StartedAt: pmw.startedAt,
+ UpdatedAt: pmw.updatedAt,
+ Total: pmw.size,
+ }, nil
+}
+
+// Truncate updates the size of the target blob, but cannot do anything with a multiwriter
+func (pmw *PassthroughMultiWriter) Truncate(size int64) error {
+ return errors.New("truncate unavailable on multiwriter")
+}
diff --git a/vendor/github.com/deislabs/oras/pkg/content/untar.go b/vendor/github.com/deislabs/oras/pkg/content/untar.go
new file mode 100644
index 000000000..805a4677d
--- /dev/null
+++ b/vendor/github.com/deislabs/oras/pkg/content/untar.go
@@ -0,0 +1,142 @@
+package content
+
+import (
+ "archive/tar"
+ "fmt"
+ "io"
+
+ "github.com/containerd/containerd/content"
+)
+
+// NewUntarWriter wrap a writer with an untar, so that the stream is untarred
+//
+// By default, it calculates the hash when writing. If the option `skipHash` is true,
+// it will skip doing the hash. Skipping the hash is intended to be used only
+// if you are confident about the validity of the data being passed to the writer,
+// and wish to save on the hashing time.
+func NewUntarWriter(writer content.Writer, opts ...WriterOpt) content.Writer {
+ // process opts for default
+ wOpts := DefaultWriterOpts()
+ for _, opt := range opts {
+ if err := opt(&wOpts); err != nil {
+ return nil
+ }
+ }
+
+ return NewPassthroughWriter(writer, func(r io.Reader, w io.Writer, done chan<- error) {
+ tr := tar.NewReader(r)
+ var err error
+ for {
+ _, err := tr.Next()
+ if err == io.EOF {
+ // clear the error, since we do not pass an io.EOF
+ err = nil
+ break // End of archive
+ }
+ if err != nil {
+ // pass the error on
+ err = fmt.Errorf("UntarWriter tar file header read error: %v", err)
+ break
+ }
+ // write out the untarred data
+ // we can handle io.EOF, just go to the next file
+ // any other errors should stop and get reported
+ b := make([]byte, wOpts.Blocksize, wOpts.Blocksize)
+ for {
+ var n int
+ n, err = tr.Read(b)
+ if err != nil && err != io.EOF {
+ err = fmt.Errorf("UntarWriter file data read error: %v\n", err)
+ break
+ }
+ l := n
+ if n > len(b) {
+ l = len(b)
+ }
+ if _, err2 := w.Write(b[:l]); err2 != nil {
+ err = fmt.Errorf("UntarWriter error writing to underlying writer: %v", err2)
+ break
+ }
+ if err == io.EOF {
+ // go to the next file
+ break
+ }
+ }
+ // did we break with a non-nil and non-EOF error?
+ if err != nil && err != io.EOF {
+ break
+ }
+ }
+ done <- err
+ }, opts...)
+}
+
+// NewUntarWriterByName wrap multiple writers with an untar, so that the stream is untarred and passed
+// to the appropriate writer, based on the filename. If a filename is not found, it is up to the called func
+// to determine how to process it.
+func NewUntarWriterByName(writers func(string) (content.Writer, error), opts ...WriterOpt) content.Writer {
+ // process opts for default
+ wOpts := DefaultWriterOpts()
+ for _, opt := range opts {
+ if err := opt(&wOpts); err != nil {
+ return nil
+ }
+ }
+
+ // need a PassthroughMultiWriter here
+ return NewPassthroughMultiWriter(writers, func(r io.Reader, getwriter func(name string) io.Writer, done chan<- error) {
+ tr := tar.NewReader(r)
+ var err error
+ for {
+ header, err := tr.Next()
+ if err == io.EOF {
+ // clear the error, since we do not pass an io.EOF
+ err = nil
+ break // End of archive
+ }
+ if err != nil {
+ // pass the error on
+ err = fmt.Errorf("UntarWriter tar file header read error: %v", err)
+ break
+ }
+ // get the filename
+ filename := header.Name
+
+ // get the writer for this filename
+ w := getwriter(filename)
+ if w == nil {
+ continue
+ }
+
+ // write out the untarred data
+ // we can handle io.EOF, just go to the next file
+ // any other errors should stop and get reported
+ b := make([]byte, wOpts.Blocksize, wOpts.Blocksize)
+ for {
+ var n int
+ n, err = tr.Read(b)
+ if err != nil && err != io.EOF {
+ err = fmt.Errorf("UntarWriter file data read error: %v\n", err)
+ break
+ }
+ l := n
+ if n > len(b) {
+ l = len(b)
+ }
+ if _, err2 := w.Write(b[:l]); err2 != nil {
+ err = fmt.Errorf("UntarWriter error writing to underlying writer at for name '%s': %v", filename, err2)
+ break
+ }
+ if err == io.EOF {
+ // go to the next file
+ break
+ }
+ }
+ // did we break with a non-nil and non-EOF error?
+ if err != nil && err != io.EOF {
+ break
+ }
+ }
+ done <- err
+ }, opts...)
+}
diff --git a/vendor/github.com/deislabs/oras/pkg/content/utils.go b/vendor/github.com/deislabs/oras/pkg/content/utils.go
index d4095d1dd..656dee201 100644
--- a/vendor/github.com/deislabs/oras/pkg/content/utils.go
+++ b/vendor/github.com/deislabs/oras/pkg/content/utils.go
@@ -101,15 +101,24 @@ func extractTarDirectory(root, prefix string, r io.Reader) error {
// Name check
name := header.Name
- path, err := filepath.Rel(prefix, name)
+ path, err := ensureBasePath(root, prefix, name)
if err != nil {
return err
}
- if strings.HasPrefix(path, "../") {
- return fmt.Errorf("%q does not have prefix %q", name, prefix)
- }
path = filepath.Join(root, path)
+ // Link check
+ switch header.Typeflag {
+ case tar.TypeLink, tar.TypeSymlink:
+ link := header.Linkname
+ if !filepath.IsAbs(link) {
+ link = filepath.Join(filepath.Dir(name), link)
+ }
+ if _, err := ensureBasePath(root, prefix, link); err != nil {
+ return err
+ }
+ }
+
// Create content
switch header.Typeflag {
case tar.TypeReg:
@@ -132,6 +141,34 @@ func extractTarDirectory(root, prefix string, r io.Reader) error {
}
}
+// ensureBasePath ensures the target path is in the base path,
+// returning its relative path to the base path.
+func ensureBasePath(root, base, target string) (string, error) {
+ path, err := filepath.Rel(base, target)
+ if err != nil {
+ return "", err
+ }
+ cleanPath := filepath.ToSlash(filepath.Clean(path))
+ if cleanPath == ".." || strings.HasPrefix(cleanPath, "../") {
+ return "", fmt.Errorf("%q is outside of %q", target, base)
+ }
+
+ // No symbolic link allowed in the relative path
+ dir := filepath.Dir(path)
+ for dir != "." {
+ if info, err := os.Lstat(filepath.Join(root, dir)); err != nil {
+ if !os.IsNotExist(err) {
+ return "", err
+ }
+ } else if info.Mode()&os.ModeSymlink != 0 {
+ return "", fmt.Errorf("no symbolic link allowed between %q and %q", base, target)
+ }
+ dir = filepath.Dir(dir)
+ }
+
+ return path, nil
+}
+
func writeFile(path string, r io.Reader, perm os.FileMode) error {
file, err := os.OpenFile(path, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, perm)
if err != nil {
diff --git a/vendor/github.com/deislabs/oras/pkg/oras/errors.go b/vendor/github.com/deislabs/oras/pkg/oras/errors.go
index 1812a060e..1645bce0f 100644
--- a/vendor/github.com/deislabs/oras/pkg/oras/errors.go
+++ b/vendor/github.com/deislabs/oras/pkg/oras/errors.go
@@ -8,7 +8,6 @@ import (
// Common errors
var (
ErrResolverUndefined = errors.New("resolver undefined")
- ErrEmptyDescriptors = errors.New("empty descriptors")
)
// Path validation related errors
diff --git a/vendor/github.com/deislabs/oras/pkg/oras/pull.go b/vendor/github.com/deislabs/oras/pkg/oras/pull.go
index d578e7bdf..0463db66a 100644
--- a/vendor/github.com/deislabs/oras/pkg/oras/pull.go
+++ b/vendor/github.com/deislabs/oras/pkg/oras/pull.go
@@ -61,7 +61,7 @@ func fetchContent(ctx context.Context, fetcher remotes.Fetcher, desc ocispec.Des
store := opts.contentProvideIngester
if store == nil {
- store = newHybridStoreFromIngester(ingester)
+ store = newHybridStoreFromIngester(ingester, opts.cachedMediaTypes)
}
handlers := []images.Handler{
filterHandler(opts, opts.allowedMediaTypes...),
diff --git a/vendor/github.com/deislabs/oras/pkg/oras/pull_opts.go b/vendor/github.com/deislabs/oras/pkg/oras/pull_opts.go
index 2e604fabc..7dcb104bf 100644
--- a/vendor/github.com/deislabs/oras/pkg/oras/pull_opts.go
+++ b/vendor/github.com/deislabs/oras/pkg/oras/pull_opts.go
@@ -2,10 +2,14 @@ package oras
import (
"context"
+ "fmt"
+ "io"
+ "sync"
orascontent "github.com/deislabs/oras/pkg/content"
"github.com/containerd/containerd/images"
+ "github.com/opencontainers/go-digest"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"golang.org/x/sync/semaphore"
)
@@ -17,6 +21,7 @@ type pullOpts struct {
callbackHandlers []images.Handler
contentProvideIngester orascontent.ProvideIngester
filterName func(ocispec.Descriptor) bool
+ cachedMediaTypes []string
}
// PullOpt allows callers to set options on the oras pull
@@ -24,8 +29,26 @@ type PullOpt func(o *pullOpts) error
func pullOptsDefaults() *pullOpts {
return &pullOpts{
- dispatch: images.Dispatch,
- filterName: filterName,
+ dispatch: images.Dispatch,
+ filterName: filterName,
+ cachedMediaTypes: []string{ocispec.MediaTypeImageManifest, ocispec.MediaTypeImageIndex},
+ }
+}
+
+// WithCachedMediaTypes sets the media types normally cached in memory when pulling.
+func WithCachedMediaTypes(cachedMediaTypes ...string) PullOpt {
+ return func(o *pullOpts) error {
+ o.cachedMediaTypes = cachedMediaTypes
+ return nil
+ }
+}
+
+// WithAdditionalCachedMediaTypes adds media types normally cached in memory when pulling.
+// This does not replace the default media types, but appends to them
+func WithAdditionalCachedMediaTypes(cachedMediaTypes ...string) PullOpt {
+ return func(o *pullOpts) error {
+ o.cachedMediaTypes = append(o.cachedMediaTypes, cachedMediaTypes...)
+ return nil
}
}
@@ -87,3 +110,26 @@ func WithPullEmptyNameAllowed() PullOpt {
return nil
}
}
+
+// WithPullStatusTrack report results to stdout
+func WithPullStatusTrack(writer io.Writer) PullOpt {
+ return WithPullCallbackHandler(pullStatusTrack(writer))
+}
+
+func pullStatusTrack(writer io.Writer) images.Handler {
+ var printLock sync.Mutex
+ return images.HandlerFunc(func(ctx context.Context, desc ocispec.Descriptor) ([]ocispec.Descriptor, error) {
+ if name, ok := orascontent.ResolveName(desc); ok {
+ digestString := desc.Digest.String()
+ if err := desc.Digest.Validate(); err == nil {
+ if algo := desc.Digest.Algorithm(); algo == digest.SHA256 {
+ digestString = desc.Digest.Encoded()[:12]
+ }
+ }
+ printLock.Lock()
+ defer printLock.Unlock()
+ fmt.Fprintln(writer, "Downloaded", digestString, name)
+ }
+ return nil, nil
+ })
+}
diff --git a/vendor/github.com/deislabs/oras/pkg/oras/push.go b/vendor/github.com/deislabs/oras/pkg/oras/push.go
index be773bedf..9d9271ec4 100644
--- a/vendor/github.com/deislabs/oras/pkg/oras/push.go
+++ b/vendor/github.com/deislabs/oras/pkg/oras/push.go
@@ -18,9 +18,6 @@ func Push(ctx context.Context, resolver remotes.Resolver, ref string, provider c
if resolver == nil {
return ocispec.Descriptor{}, ErrResolverUndefined
}
- if len(descriptors) == 0 {
- return ocispec.Descriptor{}, ErrEmptyDescriptors
- }
opt := pushOptsDefaults()
for _, o := range opts {
if err := o(opt); err != nil {
@@ -60,7 +57,7 @@ func Push(ctx context.Context, resolver remotes.Resolver, ref string, provider c
//func pack(store *hybridStore, descriptors []ocispec.Descriptor, opts *pushOpts) (ocispec.Descriptor, error) {
func pack(provider content.Provider, descriptors []ocispec.Descriptor, opts *pushOpts) (ocispec.Descriptor, content.Store, error) {
- store := newHybridStoreFromProvider(provider)
+ store := newHybridStoreFromProvider(provider, nil)
// Config
var config ocispec.Descriptor
@@ -87,6 +84,9 @@ func pack(provider content.Provider, descriptors []ocispec.Descriptor, opts *pus
return *opts.manifest, store, nil
}
+ if descriptors == nil {
+ descriptors = []ocispec.Descriptor{} // make it an empty array to prevent potential server-side bugs
+ }
manifest := ocispec.Manifest{
Versioned: specs.Versioned{
SchemaVersion: 2, // historical value. does not pertain to OCI or docker version
diff --git a/vendor/github.com/deislabs/oras/pkg/oras/push_opts.go b/vendor/github.com/deislabs/oras/pkg/oras/push_opts.go
index 090620540..90d5716e0 100644
--- a/vendor/github.com/deislabs/oras/pkg/oras/push_opts.go
+++ b/vendor/github.com/deislabs/oras/pkg/oras/push_opts.go
@@ -1,8 +1,12 @@
package oras
import (
+ "context"
+ "fmt"
+ "io"
"path/filepath"
"strings"
+ "sync"
"github.com/containerd/containerd/images"
orascontent "github.com/deislabs/oras/pkg/content"
@@ -127,3 +131,20 @@ func WithPushBaseHandler(handlers ...images.Handler) PushOpt {
return nil
}
}
+
+// WithPushStatusTrack report results to a provided writer
+func WithPushStatusTrack(writer io.Writer) PushOpt {
+ return WithPushBaseHandler(pushStatusTrack(writer))
+}
+
+func pushStatusTrack(writer io.Writer) images.Handler {
+ var printLock sync.Mutex
+ return images.HandlerFunc(func(ctx context.Context, desc ocispec.Descriptor) ([]ocispec.Descriptor, error) {
+ if name, ok := orascontent.ResolveName(desc); ok {
+ printLock.Lock()
+ defer printLock.Unlock()
+ fmt.Fprintln(writer, "Uploading", desc.Digest.Encoded()[:12], name)
+ }
+ return nil, nil
+ })
+}
diff --git a/vendor/github.com/deislabs/oras/pkg/oras/store.go b/vendor/github.com/deislabs/oras/pkg/oras/store.go
index d26c53c7b..95a8ee0d5 100644
--- a/vendor/github.com/deislabs/oras/pkg/oras/store.go
+++ b/vendor/github.com/deislabs/oras/pkg/oras/store.go
@@ -3,12 +3,15 @@ package oras
import (
"context"
"errors"
+ "io"
+ "time"
orascontent "github.com/deislabs/oras/pkg/content"
"github.com/containerd/containerd/content"
"github.com/opencontainers/go-digest"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
+ "golang.org/x/sync/errgroup"
)
// ensure interface
@@ -17,22 +20,25 @@ var (
)
type hybridStore struct {
- cache *orascontent.Memorystore
- provider content.Provider
- ingester content.Ingester
+ cache *orascontent.Memorystore
+ cachedMediaTypes []string
+ provider content.Provider
+ ingester content.Ingester
}
-func newHybridStoreFromProvider(provider content.Provider) *hybridStore {
+func newHybridStoreFromProvider(provider content.Provider, cachedMediaTypes []string) *hybridStore {
return &hybridStore{
- cache: orascontent.NewMemoryStore(),
- provider: provider,
+ cache: orascontent.NewMemoryStore(),
+ cachedMediaTypes: cachedMediaTypes,
+ provider: provider,
}
}
-func newHybridStoreFromIngester(ingester content.Ingester) *hybridStore {
+func newHybridStoreFromIngester(ingester content.Ingester, cachedMediaTypes []string) *hybridStore {
return &hybridStore{
- cache: orascontent.NewMemoryStore(),
- ingester: ingester,
+ cache: orascontent.NewMemoryStore(),
+ cachedMediaTypes: cachedMediaTypes,
+ ingester: ingester,
}
}
@@ -61,8 +67,16 @@ func (s *hybridStore) Writer(ctx context.Context, opts ...content.WriterOpt) (co
}
}
- if isAllowedMediaType(wOpts.Desc.MediaType, ocispec.MediaTypeImageManifest, ocispec.MediaTypeImageIndex) || s.ingester == nil {
- return s.cache.Writer(ctx, opts...)
+ if isAllowedMediaType(wOpts.Desc.MediaType, s.cachedMediaTypes...) || s.ingester == nil {
+ cacheWriter, err := s.cache.Writer(ctx, opts...)
+ if err != nil {
+ return nil, err
+ }
+ ingesterWriter, err := s.ingester.Writer(ctx, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return newTeeWriter(wOpts.Desc, cacheWriter, ingesterWriter), nil
}
return s.ingester.Writer(ctx, opts...)
}
@@ -117,3 +131,94 @@ func (s *hybridStore) ListStatuses(ctx context.Context, filters ...string) ([]co
func (s *hybridStore) Abort(ctx context.Context, ref string) error {
return errors.New("not yet implemented: Abort (content.Store interface)")
}
+
+// teeWriter tees the content to one or more content.Writer
+type teeWriter struct {
+ writers []content.Writer
+ digester digest.Digester
+ status content.Status
+}
+
+func newTeeWriter(desc ocispec.Descriptor, writers ...content.Writer) *teeWriter {
+ now := time.Now()
+ return &teeWriter{
+ writers: writers,
+ digester: digest.Canonical.Digester(),
+ status: content.Status{
+ Total: desc.Size,
+ StartedAt: now,
+ UpdatedAt: now,
+ },
+ }
+}
+
+func (t *teeWriter) Close() error {
+ g := new(errgroup.Group)
+ for _, w := range t.writers {
+ w := w // closure issues, see https://golang.org/doc/faq#closures_and_goroutines
+ g.Go(func() error {
+ return w.Close()
+ })
+ }
+ return g.Wait()
+}
+
+func (t *teeWriter) Write(p []byte) (n int, err error) {
+ g := new(errgroup.Group)
+ for _, w := range t.writers {
+ w := w // closure issues, see https://golang.org/doc/faq#closures_and_goroutines
+ g.Go(func() error {
+ n, err := w.Write(p[:])
+ if err != nil {
+ return err
+ }
+ if n != len(p) {
+ return io.ErrShortWrite
+ }
+ return nil
+ })
+ }
+ err = g.Wait()
+ n = len(p)
+ if err != nil {
+ return n, err
+ }
+ _, _ = t.digester.Hash().Write(p[:n])
+ t.status.Offset += int64(len(p))
+ t.status.UpdatedAt = time.Now()
+
+ return n, nil
+}
+
+// Digest may return empty digest or panics until committed.
+func (t *teeWriter) Digest() digest.Digest {
+ return t.digester.Digest()
+}
+
+func (t *teeWriter) Commit(ctx context.Context, size int64, expected digest.Digest, opts ...content.Opt) error {
+ g := new(errgroup.Group)
+ for _, w := range t.writers {
+ w := w // closure issues, see https://golang.org/doc/faq#closures_and_goroutines
+ g.Go(func() error {
+ return w.Commit(ctx, size, expected, opts...)
+ })
+ }
+ return g.Wait()
+}
+
+// Status returns the current state of write
+func (t *teeWriter) Status() (content.Status, error) {
+ return t.status, nil
+}
+
+// Truncate updates the size of the target blob
+func (t *teeWriter) Truncate(size int64) error {
+ g := new(errgroup.Group)
+ for _, w := range t.writers {
+ w := w // closure issues, see https://golang.org/doc/faq#closures_and_goroutines
+ g.Go(func() error {
+ return w.Truncate(size)
+ })
+ }
+ return g.Wait()
+}
diff --git a/vendor/github.com/docker/cli/AUTHORS b/vendor/github.com/docker/cli/AUTHORS
index ecb6251ba..8990f85b5 100644
--- a/vendor/github.com/docker/cli/AUTHORS
+++ b/vendor/github.com/docker/cli/AUTHORS
@@ -8,6 +8,7 @@ Aaron.L.Xu
Abdur Rehman
Abhinandan Prativadi
Abin Shahab
+Abreto FU
Ace Tang
Addam Hardy
Adolfo Ochagavía
@@ -17,12 +18,15 @@ Adrien Folie
Ahmet Alp Balkan
Aidan Feldman
Aidan Hobson Sayers
-AJ Bowen
-Akihiro Suda
+AJ Bowen
+Akhil Mohan
+Akihiro Suda
Akim Demaille
Alan Thompson
Albert Callarisa
+Albin Kerouanton
Aleksa Sarai
+Aleksander Piotrowski
Alessandro Boch
Alex Mavrogiannis
Alex Mayer
@@ -40,6 +44,7 @@ Amir Goldstein
Amit Krishnan
Amit Shukla
Amy Lindburg
+Anca Iordache
Anda Xu
Andrea Luzzardi
Andreas Köhler
@@ -49,6 +54,7 @@ Andrew Macpherson
Andrew McDonnell
Andrew Po
Andrey Petrov
+Andrii Berehuliak
André Martins
Andy Goldstein
Andy Rothfusz
@@ -61,7 +67,9 @@ Antonis Kalipetis
Anusha Ragunathan
Ao Li
Arash Deshmeh
+Arko Dasgupta
Arnaud Porterie
+Arthur Peka
Ashwini Oruganti
Azat Khuyiyakhmetov
Bardia Keyoumarsi
@@ -87,6 +95,7 @@ Brent Salisbury
Bret Fisher
Brian (bex) Exelbierd
Brian Goff
+Brian Wieder
Bryan Bess
Bryan Boreham
Bryan Murphy
@@ -95,6 +104,7 @@ Cameron Spear
Cao Weiwei
Carlo Mion
Carlos Alexandro Becker
+Carlos de Paula
Ce Gao
Cedric Davies
Cezar Sa Espinola
@@ -128,26 +138,31 @@ Coenraad Loubser
Colin Hebert
Collin Guarino
Colm Hally
+Comical Derskeal <27731088+derskeal@users.noreply.github.com>
Corey Farrell
Corey Quon
Craig Wilhite
Cristian Staretu
Daehyeok Mun
Dafydd Crosby
+Daisuke Ito
dalanlan
Damien Nadé
Dan Cotora
+Daniel Artine
Daniel Cassidy
Daniel Dao
Daniel Farrell
Daniel Gasienica
Daniel Goosen
+Daniel Helfand
Daniel Hiltgen
Daniel J Walsh
Daniel Nephin
Daniel Norberg
Daniel Watkins
Daniel Zhang
+Daniil Nikolenko
Danny Berger
Darren Shepherd
Darren Stahl
@@ -180,13 +195,15 @@ Dima Stopel
Dimitry Andric
Ding Fei
Diogo Monica
+Djordje Lukic
Dmitry Gusev
Dmitry Smirnov
Dmitry V. Krivenok
+Dominik Braun
Don Kjer
Dong Chen
Doug Davis
-Drew Erny
+Drew Erny
Ed Costello
Elango Sivanandam
Eli Uriegas
@@ -249,6 +266,7 @@ Harald Albers
Harold Cooper
Harry Zhang
He Simei
+Hector S
Helen Xie
Henning Sprang
Henry N
@@ -256,6 +274,7 @@ Hernan Garcia
Hongbin Lu
Hu Keping
Huayi Zhang
+Hugo Gabriel Eyherabide
huqun
Huu Nguyen
Hyzhou Zhy
@@ -297,7 +316,7 @@ Jeremy Unruh
Jeremy Yallop
Jeroen Franse
Jesse Adametz
-Jessica Frazelle
+Jessica Frazelle
Jezeniel Zapanta
Jian Zhang
Jie Luo
@@ -308,6 +327,7 @@ Jimmy Song
jimmyxian
Jintao Zhang
Joao Fernandes
+Joe Abbey
Joe Doliner
Joe Gordon
Joel Handwell
@@ -317,7 +337,7 @@ Johan Euphrosine
Johannes 'fish' Ziemke
John Feminella
John Harris
-John Howard (VM)
+John Howard
John Laswell
John Maguire
John Mulhausen
@@ -326,12 +346,15 @@ John Stephens
John Tims
John V. Martinez
John Willis
+Jon Johnson
+Jonatas Baldin
Jonathan Boulle
Jonathan Lee
Jonathan Lomas
Jonathan McCrohan
Jonh Wendell
Jordan Jennings
+Jose J. Escobar <53836904+jescobar-docker@users.noreply.github.com>
Joseph Kern
Josh Bodah
Josh Chorlton
@@ -369,6 +392,7 @@ Kevin Kern
Kevin Kirsche
Kevin Meredith
Kevin Richardson
+Kevin Woblick
khaled souf
Kim Eik
Kir Kolyshkin
@@ -406,13 +430,16 @@ Luca Favatella